RobWorkProject  21.8.23-
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

Public Member Functions

virtual ~GeometryData ()
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.

TriMesh representation of this GeometryData

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

◆ isConvex()

virtual bool isConvex ( )

test if this geometry data is convex

true if convex

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

◆ toString()

static std::string toString ( GeometryType  type)

format GeometryType to string


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