coal 3.0.1
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
Loading...
Searching...
No Matches
coal::Cylinder Class Reference

Cylinder along Z axis. The cylinder is defined at its centroid. More...

#include <coal/shape/geometric_shapes.h>

Inheritance diagram for coal::Cylinder:
Collaboration diagram for coal::Cylinder:

Public Member Functions

 Cylinder ()
 Default constructor.
 
 Cylinder (Scalar radius_, Scalar lz_)
 
 Cylinder (const Cylinder &other)
 
Cylinderoperator= (const Cylinder &other)
 
virtual Cylinderclone () const
 Clone *this into a new Cylinder.
 
void computeLocalAABB ()
 Compute AABB.
 
NODE_TYPE getNodeType () const
 Get node type: a cylinder.
 
Scalar computeVolume () const
 compute the volume
 
Matrix3s computeMomentofInertia () const
 compute the inertia matrix, related to the origin
 
Scalar minInflationValue () const
 
std::pair< Cylinder, Transform3sinflated (const Scalar value) const
 Inflate the cylinder by an amount given by value. This value can be positive or negative but must always >= minInflationValue().
 
- Public Member Functions inherited from coal::ShapeBase
 ShapeBase ()
 
 ShapeBase (const ShapeBase &other)
  
 
ShapeBaseoperator= (const ShapeBase &other)=default
 
virtual ~ShapeBase ()
 
OBJECT_TYPE getObjectType () const
 Get object type: a geometric shape.
 
void setSweptSphereRadius (Scalar radius)
 Set radius of sphere swept around the shape. Must be >= 0.
 
Scalar getSweptSphereRadius () const
 Get radius of sphere swept around the shape. This radius is always >= 0.
 
- Public Member Functions inherited from coal::CollisionGeometry
 CollisionGeometry ()
 
 CollisionGeometry (const CollisionGeometry &other)=default
 Copy constructor.
 
virtual ~CollisionGeometry ()
 
bool operator== (const CollisionGeometry &other) const
 Equality operator.
 
bool operator!= (const CollisionGeometry &other) const
 Difference operator.
 
void * getUserData () const
 get user data in geometry
 
void setUserData (void *data)
 set user data in geometry
 
bool isOccupied () const
 whether the object is completely occupied
 
bool isFree () const
 whether the object is completely free
 
bool isUncertain () const
 whether the object has some uncertainty
 
virtual Vec3s computeCOM () const
 compute center of mass
 
virtual Matrix3s computeMomentofInertiaRelatedToCOM () const
 compute the inertia matrix, related to the com
 

Public Attributes

Scalar radius
 Radius of the cylinder.
 
Scalar halfLength
 Half Length along z axis.
 
- Public Attributes inherited from coal::CollisionGeometry
Vec3s aabb_center
 AABB center in local coordinate.
 
Scalar aabb_radius
 AABB radius.
 
AABB aabb_local
 AABB in local coordinate, used for tight AABB when only translation transform.
 
void * user_data
 pointer to user defined data specific to this object
 
Scalar cost_density
 collision cost for unit volume
 
Scalar threshold_occupied
 threshold for occupied ( >= is occupied)
 
Scalar threshold_free
 threshold for free (<= is free)
 

Additional Inherited Members

- Protected Attributes inherited from coal::ShapeBase
Scalar m_swept_sphere_radius {0}
 Radius of the sphere swept around the shape. Default value is 0. Note: this property differs from inflated method of certain derived classes (e.g. Box, Sphere, Ellipsoid, Capsule, Cone, Cylinder) in the sense that inflated returns a new shape which can be inflated but also deflated. Also, an inflated shape is not rounded. It simply has a different size. Sweeping a shape with a sphere is a different operation (a Minkowski sum), which rounds the sharp corners of a shape. The swept sphere radius is a property of the shape itself and can be manually updated between collision checks.
 

Detailed Description

Cylinder along Z axis. The cylinder is defined at its centroid.

Constructor & Destructor Documentation

◆ Cylinder() [1/3]

coal::Cylinder::Cylinder ( )
inline

Default constructor.

◆ Cylinder() [2/3]

coal::Cylinder::Cylinder ( Scalar  radius_,
Scalar  lz_ 
)
inline

◆ Cylinder() [3/3]

coal::Cylinder::Cylinder ( const Cylinder other)
inline

Member Function Documentation

◆ clone()

virtual Cylinder * coal::Cylinder::clone ( ) const
inlinevirtual

Clone *this into a new Cylinder.

Implements coal::CollisionGeometry.

◆ computeLocalAABB()

void coal::Cylinder::computeLocalAABB ( )
virtual

Compute AABB.

Implements coal::CollisionGeometry.

◆ computeMomentofInertia()

Matrix3s coal::Cylinder::computeMomentofInertia ( ) const
inlinevirtual

compute the inertia matrix, related to the origin

Reimplemented from coal::CollisionGeometry.

◆ computeVolume()

Scalar coal::Cylinder::computeVolume ( ) const
inlinevirtual

compute the volume

Reimplemented from coal::CollisionGeometry.

◆ getNodeType()

NODE_TYPE coal::Cylinder::getNodeType ( ) const
inlinevirtual

Get node type: a cylinder.

Reimplemented from coal::CollisionGeometry.

◆ inflated()

std::pair< Cylinder, Transform3s > coal::Cylinder::inflated ( const Scalar  value) const
inline

Inflate the cylinder by an amount given by value. This value can be positive or negative but must always >= minInflationValue().

Parameters
[in]valueof the shape inflation.
Returns
a new inflated cylinder and the related transform to account for the change of shape frame

◆ minInflationValue()

Scalar coal::Cylinder::minInflationValue ( ) const
inline

◆ operator=()

Cylinder & coal::Cylinder::operator= ( const Cylinder other)
inline

Member Data Documentation

◆ halfLength

Scalar coal::Cylinder::halfLength

Half Length along z axis.

◆ radius

Scalar coal::Cylinder::radius

Radius of the cylinder.


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