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:

Classes

struct  AABB
 Axis-aligned bounding box. More...
 

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 &source)
 
virtual ChGeometryClone () const =0
 "Virtual" copy constructor.
 
virtual Type GetClassType () const
 Get the class type as an enum.
 
virtual AABB GetBoundingBox (const ChMatrix33<> &rot) const
 Compute bounding box along the directions defined by the given rotation matrix. More...
 
void InflateBoundingBox (AABB &bbox, 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()

ChGeometry::AABB chrono::geometry::ChGeometry::GetBoundingBox ( 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::ChEllipsoid, chrono::geometry::ChTriangle, chrono::geometry::ChRoundedBox, chrono::geometry::ChSphere, chrono::geometry::ChBox, chrono::geometry::ChCapsule, chrono::geometry::ChCone, and chrono::geometry::ChCylinder.

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


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