RobWorkProject  24.8.23-
Public Types | Public Member Functions | List of all members
Shell Class Referenceabstract

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< ShellPtr
 Smart pointer type to Shell.
 
typedef rw::core::Ptr< const ShellCPtr
 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< GeometryDataPtr
 smart pointer type to this class
 
typedef rw::core::Ptr< const GeometryDataCPtr
 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< TriMeshgetTriMesh (bool forceCopy=true)
 gets a trimesh representation of this geometry data. More...
 
virtual rw::core::Ptr< TriMeshgetTriMesh (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 FacegetFace (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...
 

Detailed Description

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.

Member Function Documentation

◆ extremums()

virtual std::pair<double, double> extremums ( const rw::math::Vector3D< double > &  dir) const
virtual

Get the minimum and maximum values of the shell in a certain direction.

Parameters
dir[in] the direction to find extremums for.
Returns
the minimum and maximum as a pair of values.

◆ getFace() [1/2]

rw::core::Ptr<const Face> getFace ( std::size_t  idx) const
inline

Get a surface patch.

Parameters
idx[in] index of patch.
Returns
a copy of the surface patch.

◆ getFace() [2/2]

virtual void getFace ( std::size_t  idx,
GenericFace face 
) const
virtual

Get a surface patch.

Parameters
idx[in] index of patch.
face[out] existing face to copy data into.

Reimplemented in PlainQuadraticShell.

◆ getTriMesh() [1/2]

virtual rw::core::Ptr<TriMesh> getTriMesh ( bool  forceCopy = true)
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.

Returns
TriMesh representation of this GeometryData

Implements GeometryData.

◆ getTriMesh() [2/2]

virtual rw::core::Ptr<TriMesh> getTriMesh ( bool  forceCopy = true) const
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.

Returns
TriMesh representation of this GeometryData

◆ getType()

virtual GeometryType getType ( ) const
pure virtual

the type of this primitive

Implements GeometryData.

Implemented in QuadraticShell, IndexedFaceArray, and ImplicitShell.

◆ isConvex()

virtual bool isConvex ( )
pure virtual

test if this geometry data is convex

Returns
true if convex

Reimplemented from GeometryData.

Implemented in QuadraticShell, ImplicitShell, PlainQuadraticShell, IndexedQuadraticFaceArray, and IndexedFaceArray.

◆ obb()

virtual OBB obb ( ) const
virtual

Create Oriented Bounding Box (OBB) as a bounding volume for the shell.

Returns
the OBB.

◆ size()

virtual std::size_t size ( ) const
pure virtual

Get the number of surface patches in this shell.

Returns
the number of surface patches.

Implemented in QuadraticShell, ImplicitShell, PlainQuadraticShell, IndexedQuadraticFaceArray, and IndexedFaceArray.


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