RobWorkProject
23.9.11-
|
defines an interface for a geometric shape that is defined by a set of parameters. More...
#include <Primitive.hpp>
Inherits GeometryData.
Inherited by Box, Cone, Cylinder, Line, Plane, Pyramid, Sphere, Tube, and SimpleFinger.
Public Types | |
typedef rw::core::Ptr< Primitive > | Ptr |
Smart pointer to this type of class. | |
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 | |
virtual | ~Primitive () |
destructor | |
TriMesh::Ptr | getTriMesh (bool forceCopy=true) |
gets a trimesh representation of this geometry data. More... | |
virtual TriMesh::Ptr | createMesh (int resolution) const =0 |
make a trimesh from this primitive. Use granularity to specify minimum number of line segments a half circle is split into More... | |
virtual rw::math::Q | getParameters () const =0 |
get the parameters that define this primitive | |
virtual void | setParameters (const rw::math::Q &q)=0 |
set the parameters that define this primitive | |
virtual bool | isConvex () |
test if this geometry data is convex More... | |
bool | isInside (const rw::math::Vector3D< double > &point) |
test if a point is on the border or inside this primitive | |
Public Member Functions inherited from GeometryData | |
virtual | ~GeometryData () |
Destructor. | |
virtual GeometryType | getType () const =0 |
the type of this primitive | |
Protected Member Functions | |
virtual bool | doIsInside (const rw::math::Vector3D< double > &point) |
Check if point lies inside geometry. More... | |
Primitive (int levels=20) | |
Constructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from GeometryData | |
static std::string | toString (GeometryType type) |
format GeometryType to string More... | |
defines an interface for a geometric shape that is defined by a set of parameters.
|
inlineprotected |
Constructor.
levels | [in] mesh resolution. |
|
pure virtual |
|
inlineprotectedvirtual |
|
inlinevirtual |
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.
|
inlinevirtual |