RobWorkProject
Public Types | Public Member Functions | Protected Member Functions | List of all members
Box Class Reference

a box primitive, origin is in center of box More...

#include <Box.hpp>

Inherits Primitive.

Public Types

typedef rw::common::Ptr< BoxPtr
 smart pointer type to this class
 
- Public Types inherited from Primitive
typedef rw::common::Ptr< PrimitivePtr
 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, Quadratic, UserType
}
 geometry data types
 
typedef rw::common::Ptr< GeometryDataPtr
 smart pointer type to this class
 

Public Member Functions

 Box ()
 constructor - creates a 1x1x1 sided box
 
 Box (double x, double y, double z)
 constructor More...
 
 Box (const rw::math::Q &initQ)
 constructor More...
 
virtual ~Box ()
 destructor
 
TriMesh::Ptr createMesh (int resolution) const
 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
 get the parameters that define this primitive More...
 
virtual void setParameters (const rw::math::Q &q)
 set the parameters that define this primitive More...
 
GeometryType getType () const
 the type of this primitive More...
 
- Public Member Functions inherited from Primitive
virtual ~Primitive ()
 destructor
 
TriMesh::Ptr getTriMesh (bool forceCopy=true)
 gets a trimesh representation of this geometry data. More...
 
virtual bool isConvex ()
 test if this geometry data is convex More...
 
bool isInside (const rw::math::Vector3D<> &point)
 test if a point is on the border or inside this primitive
 
- Public Member Functions inherited from GeometryData
virtual ~GeometryData ()
 Destructor.
 

Protected Member Functions

bool doIsInside (const rw::math::Vector3D<> &point)
 Check if point lies inside geometry. More...
 
- Protected Member Functions inherited from Primitive
 Primitive ()
 Constructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from GeometryData
static std::string toString (GeometryType type)
 format GeometryType to string More...
 

Detailed Description

a box primitive, origin is in center of box

Constructor & Destructor Documentation

◆ Box() [1/2]

Box ( double  x,
double  y,
double  z 
)

constructor

Parameters
x[in] width in x axis
y[in] width in y axis
z[in] width in z axis

◆ Box() [2/2]

Box ( const rw::math::Q initQ)

constructor

Parameters
initQ[in] vector with (x,y,z)

Member Function Documentation

◆ createMesh()

TriMesh::Ptr createMesh ( int  resolution) const
virtual

make a trimesh from this primitive. Use granularity to specify minimum number of line segments a half circle is split into

Parameters
resolution[in]

Implements Primitive.

◆ doIsInside()

bool doIsInside ( const rw::math::Vector3D<> &  point)
protectedvirtual

Check if point lies inside geometry.

Parameters
point[in] point to check.
Returns
true if inside geometry, false otherwise.

Reimplemented from Primitive.

◆ getParameters()

virtual rw::math::Q getParameters ( ) const
virtual

get the parameters that define this primitive

Implements Primitive.

◆ getType()

GeometryType getType ( ) const
inlinevirtual

the type of this primitive

Implements GeometryData.

◆ setParameters()

virtual void setParameters ( const rw::math::Q q)
virtual

set the parameters that define this primitive

Implements Primitive.


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