RobWorkProject
24.8.23-
|
A shell represents the geometry of an object as a collection of non-connected faces. More...
#include <Shell.hpp>
Inherits GeometryData.
Inherited by ImplicitShell, IndexedFaceArray, and QuadraticShell.
Public Types | |
typedef rw::core::Ptr< Shell > | Ptr |
Smart pointer type to Shell. | |
typedef rw::core::Ptr< const Shell > | CPtr |
Smart pointer type to const Shell. | |
Public Types inherited from GeometryData | |
enum | GeometryType { PointCloud , LineMesh , PlainTriMesh , IdxTriMesh , SpherePrim , BoxPrim , OBBPrim , AABBPrim , LinePrim , PointPrim , PyramidPrim , ConePrim , TrianglePrim , CylinderPrim , TubePrim , PlanePrim , RayPrim , Implicit , Quadratic , UserType } |
geometry data types | |
typedef rw::core::Ptr< GeometryData > | Ptr |
smart pointer type to this class | |
typedef rw::core::Ptr< const GeometryData > | CPtr |
const smart pointer type to this class | |
Public Member Functions | |
Shell () | |
Constructor. | |
virtual | ~Shell () |
Destructor. | |
virtual GeometryType | getType () const =0 |
the type of this primitive More... | |
virtual rw::core::Ptr< TriMesh > | getTriMesh (bool forceCopy=true) |
gets a trimesh representation of this geometry data. More... | |
virtual rw::core::Ptr< TriMesh > | getTriMesh (bool forceCopy=true) const |
gets a trimesh representation of this geometry data. More... | |
virtual bool | isConvex ()=0 |
test if this geometry data is convex More... | |
virtual std::size_t | size () const =0 |
Get the number of surface patches in this shell. More... | |
rw::core::Ptr< const Face > | getFace (std::size_t idx) const |
Get a surface patch. More... | |
virtual void | getFace (std::size_t idx, GenericFace &face) const |
Get a surface patch. More... | |
virtual std::pair< double, double > | extremums (const rw::math::Vector3D< double > &dir) const |
Get the minimum and maximum values of the shell in a certain direction. More... | |
virtual OBB | obb () const |
Create Oriented Bounding Box (OBB) as a bounding volume for the shell. More... | |
Public Member Functions inherited from GeometryData | |
virtual | ~GeometryData () |
Destructor. | |
Additional Inherited Members | |
Static Public Member Functions inherited from GeometryData | |
static std::string | toString (GeometryType type) |
format GeometryType to string More... | |
A shell represents the geometry of an object as a collection of non-connected faces.
Each face is composed of a trimmed surface, the edge curves, and vertices that connects the edges. Contrary to the BREP representation, the shell representation holds no information about how each face is connected to the neighbouring faces.
|
virtual |
Get the minimum and maximum values of the shell in a certain direction.
dir | [in] the direction to find extremums for. |
|
inline |
Get a surface patch.
idx | [in] index of patch. |
|
virtual |
Get a surface patch.
idx | [in] index of patch. |
face | [out] existing face to copy data into. |
Reimplemented in PlainQuadraticShell.
|
virtual |
gets a trimesh representation of this geometry data.
The trimesh that is returned is by default a copy, which means ownership is transfered to the caller. Specifying forceCopy to false will enable copy by reference and ownership is not necesarilly transfered. This is more efficient, though pointer is only alive as long as this GeometryData is alive.
Implements GeometryData.
|
virtual |
gets a trimesh representation of this geometry data.
The trimesh that is returned is by default a copy, which means ownership is transfered to the caller. Specifying forceCopy to false will enable copy by reference and ownership is not necesarilly transfered. This is more efficient, though pointer is only alive as long as this GeometryData is alive.
|
pure virtual |
the type of this primitive
Implements GeometryData.
Implemented in QuadraticShell, IndexedFaceArray, and ImplicitShell.
|
pure virtual |
test if this geometry data is convex
Reimplemented from GeometryData.
Implemented in QuadraticShell, ImplicitShell, PlainQuadraticShell, IndexedQuadraticFaceArray, and IndexedFaceArray.
|
virtual |
|
pure virtual |
Get the number of surface patches in this shell.
Implemented in QuadraticShell, ImplicitShell, PlainQuadraticShell, IndexedQuadraticFaceArray, and IndexedFaceArray.