Description

Base class for geometric objects used for collisions and visualization.

#include <ChGeometry.h>

Inheritance diagram for chrono::ChGeometry:

Public Types

enum  Type {
  NONE, SPHERE, ELLIPSOID, BOX,
  CYLINDER, TRIANGLE, CAPSULE, CONE,
  LINE, LINE_ARC, LINE_BEZIER, LINE_CAM,
  LINE_PATH, LINE_POLY, LINE_SEGMENT, ROUNDED_BOX,
  ROUNDED_CYLINDER, TRIANGLEMESH, TRIANGLEMESH_CONNECTED, TRIANGLEMESH_SOUP
}
 Enumeration of geometric object types.
 

Public Member Functions

 ChGeometry (const ChGeometry &other)
 
virtual ChGeometryClone () const =0
 "Virtual" copy constructor.
 
virtual Type GetType () const
 Get the class type as an enum.
 
virtual ChAABB GetBoundingBox () const
 Compute bounding box along the directions of the shape definition frame. More...
 
void InflateBoundingBox (ChAABB &bbox) const
 Enlarge the given existing bounding box with the bounding box of this object.
 
virtual double GetBoundingSphereRadius () const
 Returns the radius of a bounding sphere for this geometry. More...
 
virtual ChVector3d Baricenter () const
 Compute center of mass.
 
virtual int GetManifoldDimension () const
 Returns the dimension of the geometry (0=point, 1=line, 2=surface, 3=solid)
 
virtual void Update ()
 Generic update of internal data.
 
virtual void ArchiveOut (ChArchiveOut &archive_out)
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIn (ChArchiveIn &archive_in)
 Method to allow de serialization of transient data from archives.
 

Member Function Documentation

◆ GetBoundingBox()

ChAABB chrono::ChGeometry::GetBoundingBox ( ) const
virtual

Compute bounding box along the directions of the shape definition frame.

The default implementation returns a bounding box with zero dimensions.

Reimplemented in chrono::ChTriangleMeshConnected, chrono::ChTriangleMesh, chrono::ChEllipsoid, chrono::ChLineBezier, chrono::ChRoundedBox, chrono::ChSphere, chrono::ChBox, chrono::ChCapsule, chrono::ChCone, chrono::ChCylinder, chrono::ChRoundedCylinder, and chrono::ChTriangle.

◆ GetBoundingSphereRadius()

double chrono::ChGeometry::GetBoundingSphereRadius ( ) const
virtual

Returns the radius of a bounding sphere for this geometry.

The default implementation returns the radius of a sphere bounding the geometry bounding box, which is not always the tightest possible.

Reimplemented in chrono::ChEllipsoid, chrono::ChRoundedBox, chrono::ChSphere, chrono::ChBox, chrono::ChCapsule, chrono::ChCone, chrono::ChCylinder, and chrono::ChRoundedCylinder.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/geometry/ChGeometry.h
  • /builds/uwsbel/chrono/src/chrono/geometry/ChGeometry.cpp