chrono::geometry::ChGeometry Class Referenceabstract

Description

Base class for geometric objects used for collisions and visualization.

#include <ChGeometry.h>

Inheritance diagram for chrono::geometry::ChGeometry:

Public Types

enum  GeometryType {
  NONE, SPHERE, BOX, CYLINDER,
  TRIANGLE, CAPSULE, CONE, LINE,
  LINE_ARC, LINE_BEZIER, LINE_CAM, LINE_PATH,
  LINE_POLY, LINE_SEGMENT, ROUNDED_BOX, ROUNDED_CYLINDER,
  ROUNDED_CONE, TRIANGLEMESH, TRIANGLEMESH_CONNECTED, TRIANGLEMESH_SOUP
}
 Enumeration of geometric objects.
 

Public Member Functions

 ChGeometry (const ChGeometry &source)
 
virtual ChGeometryClone () const =0
 "Virtual" copy constructor.
 
virtual GeometryType GetClassType () const
 Get the class type as unique numerical ID (faster than using ChronoRTTI mechanism). More...
 
virtual void GetBoundingBox (ChVector<> &cmin, ChVector<> &cmax, const ChMatrix33<> &rot) const
 Compute bounding box along the directions defined by the given rotation matrix. More...
 
void InflateBoundingBox (ChVector<> &cmin, ChVector<> &cmax, const ChMatrix33<> &rot) 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 ChVector 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 &marchive)
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive)
 Method to allow de serialization of transient data from archives.
 

Member Function Documentation

◆ GetBoundingBox()

void chrono::geometry::ChGeometry::GetBoundingBox ( ChVector<> &  cmin,
ChVector<> &  cmax,
const ChMatrix33<> &  rot 
) const
virtual

Compute bounding box along the directions defined by the given rotation matrix.

The default implementation returns a bounding box with zeros dimensions.

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

◆ GetBoundingSphereRadius()

double chrono::geometry::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::geometry::ChCapsule, chrono::geometry::ChEllipsoid, and chrono::geometry::ChSphere.

◆ GetClassType()


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