Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
p_Less_rotate_ccw< Point > Class Template Reference

#include <predicate_objects_on_points_2.h>

Public Member Functions

 p_Less_rotate_ccw (const Point &p)
 
bool operator() (const Point &p, const Point &q) const
 
void set_rotation_center (const Point &p)
 

Private Attributes

Point rot_point
 

Detailed Description

template<class Point>
class p_Less_rotate_ccw< Point >

Definition at line 198 of file predicate_objects_on_points_2.h.

Constructor & Destructor Documentation

p_Less_rotate_ccw ( const Point &  p)
inline

Definition at line 201 of file predicate_objects_on_points_2.h.

202  : rot_point(p)
203  {}

Member Function Documentation

bool operator() ( const Point &  p,
const Point &  q 
) const
inline

Definition at line 205 of file predicate_objects_on_points_2.h.

References collinear_are_ordered_along_line(), LEFTTURN, orientation(), RIGHTTURN, and p_Less_rotate_ccw< Point >::rot_point.

206  {
207  Orientation ori = orientation(rot_point, p, q);
208  if ( ori == LEFTTURN )
209  {
210  return true;
211  }
212  else if ( ori == RIGHTTURN )
213  {
214  return false;
215  }
216  else
217  {
218  if (p == rot_point) return false;
219  if (q == rot_point) return true;
220  if (p == q) return false;
222  }
223  }
const Orientation LEFTTURN
Definition: enum.h:66
Sign
Definition: enum.h:57
bool collinear_are_ordered_along_line(const Point_2< R > &p, const Point_2< R > &q, const Point_2< R > &r)
Orientation orientation(const Point_2< R > &p, const Point_2< R > &q, const Point_2< R > &r)
NT q
const Orientation RIGHTTURN
Definition: enum.h:67

Here is the call graph for this function:

void set_rotation_center ( const Point &  p)
inline

Member Data Documentation


The documentation for this class was generated from the following file: