RobWorkProject  23.9.11-
Public Member Functions | Protected Member Functions | List of all members
Tube Class Reference

a tube primitive. radius is in xy-plane and height is in z-axis More...

#include <Tube.hpp>

Inherits Primitive.

Public Member Functions

 Tube (float radius, float thickness, float height, int levels=16)
 Constructs tube primitive with the specified setup. More...
 
 Tube (const rw::math::Q &initQ, int levels=16)
 Constructs tube primitive based on vector with parameters. More...
 
virtual ~Tube ()
 destructor
 
float getInnerRadius () const
 Get the inner radius of the tube. More...
 
float getThickness () const
 Get the thickness of the tube. More...
 
float getHeight () const
 Get the height of the tube. More...
 
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< double > &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< double > &point)
 Check if point lies inside geometry. More...
 
- Protected Member Functions inherited from Primitive
 Primitive (int levels=20)
 Constructor. More...
 

Additional Inherited Members

- Public Types inherited from Primitive
typedef rw::core::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 , 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
 
- Static Public Member Functions inherited from GeometryData
static std::string toString (GeometryType type)
 format GeometryType to string More...
 

Detailed Description

a tube primitive. radius is in xy-plane and height is in z-axis

Constructor & Destructor Documentation

◆ Tube() [1/2]

Tube ( float  radius,
float  thickness,
float  height,
int  levels = 16 
)

Constructs tube primitive with the specified setup.

The tube is aligned with the height in the z-direction such that tube extends height/2 above and below the xy-plane.

Parameters
radius[in] inner radius of the tube.
thickness[in] thickness of the tube.
height[in] height of the cylinder.
levels[in] granularity of the mesh.

◆ Tube() [2/2]

Tube ( const rw::math::Q initQ,
int  levels = 16 
)

Constructs tube primitive based on vector with parameters.

Parameters
initQ[in] vector of (radius, height)
levels[in] granularity of the mesh

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< double > &  point)
protectedvirtual

Check if point lies inside geometry.

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

Reimplemented from Primitive.

◆ getHeight()

float getHeight ( ) const

Get the height of the tube.

Returns
the height

◆ getInnerRadius()

float getInnerRadius ( ) const

Get the inner radius of the tube.

Returns
the radius

◆ getParameters()

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

get the parameters that define this primitive

Implements Primitive.

◆ getThickness()

float getThickness ( ) const

Get the thickness of the tube.

Returns
the thickness.

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