libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
GeometricForm Class Referenceabstract
Inheritance diagram for GeometricForm:
CircleForm ParallelepipedForm RectangleForm TriangleForm

Public Member Functions

virtual bool isPointInForm (p3d_point p)=0
 
virtual double distHToPoint (p3d_point p)=0
 
virtual double getDistanceFromPoint (p3d_point p)=0
 
virtual double getPlannarDistanceFromPoint (p3d_point p)=0
 
virtual p3d_point getRandomPointInForm ()=0
 
virtual std::vector< p3d_point > getFormGrid (double sampleRate)=0
 
virtual GeometricFormgetTransformedForm (p3d_matrix4 M)=0
 create a new form rotate by M compared to this one.
 
virtual void draw ()=0
 draw the form
 
p3d_point transformPoint (p3d_point a, p3d_matrix4 M)
 transformPoint More...
 
void transformVector (p3d_vector3 src, p3d_matrix4 M, p3d_vector3 res)
 transformVector: applies the transformation to the vector More...
 
void getNorm (p3d_vector3 v)
 

Public Attributes

std::string type
 the type of the form
 
bool isSupport
 is the form a support or not
 
std::map< std::string,
GeometricForm * > 
supportAreas
 a map of internal geometric form
 

Protected Attributes

p3d_vector3 _norm
 the form normal
 

Member Function Documentation

virtual double GeometricForm::distHToPoint ( p3d_point  p)
pure virtual
Returns
: return the distance between the form and p, in the direction of the norm TODO: for now it is just the z dist.

Implemented in ParallelepipedForm, RectangleForm, TriangleForm, and CircleForm.

virtual double GeometricForm::getDistanceFromPoint ( p3d_point  p)
pure virtual
Returns
: smallest dist between the form and p

Implemented in ParallelepipedForm, RectangleForm, CircleForm, and TriangleForm.

virtual std::vector<p3d_point> GeometricForm::getFormGrid ( double  sampleRate)
pure virtual
Returns
: create a grid inside the form and return its points

Implemented in ParallelepipedForm, RectangleForm, CircleForm, and TriangleForm.

void GeometricForm::getNorm ( p3d_vector3  v)
inline
Returns
v: a copy of the form normal
virtual double GeometricForm::getPlannarDistanceFromPoint ( p3d_point  p)
pure virtual
Returns
: smallest distance between the form and p in 2D

Implemented in ParallelepipedForm, RectangleForm, CircleForm, and TriangleForm.

virtual p3d_point GeometricForm::getRandomPointInForm ( )
pure virtual
Returns
: a point from the form

Implemented in ParallelepipedForm, RectangleForm, CircleForm, and TriangleForm.

virtual bool GeometricForm::isPointInForm ( p3d_point  p)
pure virtual
Returns
: true if p is in the form

Implemented in ParallelepipedForm, RectangleForm, TriangleForm, and CircleForm.

p3d_point GeometricForm::transformPoint ( p3d_point  a,
p3d_matrix4  M 
)

transformPoint

Returns
p3d_point Transform a point position based on the given mat4
void GeometricForm::transformVector ( p3d_vector3  src,
p3d_matrix4  M,
p3d_vector3  res 
)

transformVector: applies the transformation to the vector

Parameters
src[in]
M[in]
res[out]do not apply the translation

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