RobWorkProject  23.9.11-
Public Types | Public Member Functions | Static Public Member Functions | List of all members
GeometryData Class Referenceabstract

an interface for geometry data. More...

#include <GeometryData.hpp>

Inherited by BREP, PointCloud, Primitive, Shell, and TriMesh.

Public Types

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

virtual ~GeometryData ()
 Destructor.
 
virtual GeometryType getType () const =0
 the type of this primitive
 
virtual rw::core::Ptr< TriMeshgetTriMesh (bool forceCopy=true)=0
 gets a trimesh representation of this geometry data. More...
 
virtual bool isConvex ()
 test if this geometry data is convex More...
 

Static Public Member Functions

static std::string toString (GeometryType type)
 format GeometryType to string More...
 

Detailed Description

an interface for geometry data.

Member Function Documentation

◆ getTriMesh()

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

Implemented in TriMesh, SimpleTriMesh, Primitive, PointCloud, Shell, and BREP.

◆ isConvex()

virtual bool isConvex ( )
inlinevirtual

test if this geometry data is convex

Returns
true if convex

Reimplemented in Shell, QuadraticShell, ImplicitShell, TriMesh, Primitive, PlainQuadraticShell, IndexedQuadraticFaceArray, IndexedFaceArray, and BREP.

◆ toString()

static std::string toString ( GeometryType  type)
static

format GeometryType to string

Parameters
type

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