RobWorkProject
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, TriMesh, and TriMesh.

Public Types

enum  GeometryType {
  PointCloud, LineMesh, PlainTriMesh, IdxTriMesh,
  SpherePrim, BoxPrim, OBBPrim, AABBPrim,
  LinePrim, PointPrim, PyramidPrim, ConePrim,
  TrianglePrim, CylinderPrim, TubePrim, PlanePrim,
  RayPrim, Quadratic, UserType
}
 geometry data types
 
typedef rw::common::Ptr< GeometryDataPtr
 smart pointer type to this class
 

Public Member Functions

virtual ~GeometryData ()
 Destructor.
 
virtual GeometryType getType () const =0
 the type of this primitive
 
virtual rw::common::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::common::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 PointCloud, BREP, TriMesh, TriMesh, Shell, and Primitive.

◆ isConvex()

virtual bool isConvex ( )
inlinevirtual

test if this geometry data is convex

Returns

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

◆ 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: