RobWorkProject
24.8.23-
|
Abstract interface for geometric faces. More...
#include <Face.hpp>
Inherited by GenericFace, ImplicitFace, and QuadraticFace.
Public Types | |
typedef rw::core::Ptr< rw::geometry::Face > | Ptr |
Smart pointer type to Face. | |
typedef rw::core::Ptr< const rw::geometry::Face > | CPtr |
Smart pointer type to const Face. | |
Public Member Functions | |
Face () | |
Constructor. | |
virtual | ~Face () |
Destructor. | |
virtual const rw::geometry::Surface & | surface () const =0 |
Get the surface of the face. More... | |
virtual std::size_t | curveCount () const =0 |
Get the number of curves in the face. More... | |
virtual const rw::geometry::Curve & | getCurve (std::size_t i) const =0 |
Get a curve of the face. More... | |
virtual const std::vector< rw::math::Vector3D< double > > & | vertices () const =0 |
Get the vertices of the face. More... | |
virtual void | transform (const rw::math::Transform3D<> &T)=0 |
Transform the face. More... | |
virtual void | transform (const rw::math::Vector3D< double > &P)=0 |
Translation of face. More... | |
virtual rw::core::Ptr< rw::geometry::TriMesh > | getTriMesh (bool forceCopy=true) const |
Create a TriMesh representation of the face. More... | |
virtual std::pair< double, double > | extremums (const rw::math::Vector3D< double > &dir) const |
Find the extent of the surface along a specific direction. More... | |
virtual rw::geometry::OBB< double > | obb () |
Create Oriented Bounding Box. More... | |
void | setMeshResolution (double resolution) |
Set the resolution used for discretization in the getTriMesh and faceTriMesh functions. More... | |
Protected Attributes | |
double | _resolution |
Resolution used for discretization into triangle meshes. | |
Abstract interface for geometric faces.
A face consist of a surface and curves that form the boundary of the face.
For all faces there must be the same number of vertices and curves. The order of vertices and curves are ordered such that a curve at a certain index will have a corresponding start vertex at the same vertex index.
|
pure virtual |
Get the number of curves in the face.
Implemented in QuadraticFace, ImplicitFace, and GenericFace.
|
virtual |
Find the extent of the surface along a specific direction.
dir | [in] a normalized direction vector. |
|
pure virtual |
Get a curve of the face.
i | [in] the curve index, which should be less than the number returned by curveCount(). |
Implemented in QuadraticFace, ImplicitFace, and GenericFace.
|
virtual |
Create a TriMesh representation of the face.
This function relies on the resolution set with setMeshResolution. The resolution is passed on to Curve::discretizeAdaptive and Surface::setDiscretizationResolution.
forceCopy | [in] (not currently used in default implementation) |
|
virtual |
|
inline |
Set the resolution used for discretization in the getTriMesh and faceTriMesh functions.
The meaning of this parameter depends on the type of surface.
resolution | [in] the resolution parameter. |
|
pure virtual |
Get the surface of the face.
Implemented in QuadraticFace, ImplicitFace, and GenericFace.
|
pure virtual |
Transform the face.
T | [in] transform. |
Implemented in QuadraticFace, ImplicitFace, and GenericFace.
|
pure virtual |
Translation of face.
P | [in] translation vector. |
Implemented in QuadraticFace, ImplicitFace, and GenericFace.
|
pure virtual |
Get the vertices of the face.
Implemented in QuadraticFace, ImplicitFace, and GenericFace.