Base class for the data needed to determine affordances of different types. More...
#include <hpp/affordance/operations.hh>
Public Member Functions | |
OperationBase () | |
If an OperationBase object is created without parameters, an affordance type called "noAffordance" is created as default, with certain default values for its member variables. More... | |
OperationBase (const double margin=0.3, const double nbTriMargin=0.3, const double minArea=0.05, const char *affordanceName="noAffordance") | |
Constructor that allows for user-defined parameters. More... | |
virtual bool | requirement (const fcl::Vec3f &normal)=0 |
Fully virtual function that will determine whether or not a given triangle normal fullfils the requirement of a child class. More... | |
Public Attributes | |
const fcl::Vec3f | zWorld_ |
The orientation of the world z axis. Needed to find potential affordance objects. More... | |
const double | margin_ |
The error margin within which the requirement function must be fullfilled. More... | |
const double | neighbouringTriangleMargin_ |
The margin for the deviation of the normal of neighbouring triangles. More... | |
const double | minArea_ |
The minimum area required for an affordance object. More... | |
const char * | affordance_ |
Name of the affordance type for which te requirement exists. More... | |
Base class for the data needed to determine affordances of different types.
For each affordance type, a child class inheriting OperationBase will have to be created.
|
inline |
If an OperationBase object is created without parameters, an affordance type called "noAffordance" is created as default, with certain default values for its member variables.
This constructor should not be used..!
|
inlineexplicit |
Constructor that allows for user-defined parameters.
Default values are given for parameters that are not defined by the user.
margin | Margin needed for the evaluation of the requirement function |
nbTriMargin | Margin between two triangles tested for a single affordance surface. If the angle between two triangles is greater than the provided margin, the triangles cannot be part of the same affordance surface. |
minArea | Minimum area needed for the formation of an affordance object |
affordanceName | The name of the affordance type |
|
pure virtual |
Fully virtual function that will determine whether or not a given triangle normal fullfils the requirement of a child class.
If yes, the tested triangle forms part of a potential affordance.
normal | Normal vector of the tested triangle. |
Implemented in hpp::affordance::LeanOperation, and hpp::affordance::SupportOperation.
const char* hpp::affordance::OperationBase::affordance_ |
Name of the affordance type for which te requirement exists.
const double hpp::affordance::OperationBase::margin_ |
The error margin within which the requirement function must be fullfilled.
Referenced by hpp::affordance::SupportOperation::requirement(), and hpp::affordance::LeanOperation::requirement().
const double hpp::affordance::OperationBase::minArea_ |
The minimum area required for an affordance object.
The total area may comprise multiple triangles.
const double hpp::affordance::OperationBase::neighbouringTriangleMargin_ |
The margin for the deviation of the normal of neighbouring triangles.
Used to determine affordance objects comprising more than one triangle.
const fcl::Vec3f hpp::affordance::OperationBase::zWorld_ |
The orientation of the world z axis. Needed to find potential affordance objects.
Referenced by hpp::affordance::SupportOperation::requirement(), and hpp::affordance::LeanOperation::requirement().