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 (double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax, ChMatrix33<> *Rot=nullptr) const
 Compute bounding box. More...
 
virtual void InflateBoundingBox (double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax, ChMatrix33<> *Rot=NULL) const
 Enlarge a previous existing bounding box. More...
 
virtual double Size () const
 Returns the radius of the sphere which can enclose the geometry.
 
virtual ChVector Baricenter () const
 Compute center of mass It should be overridden by inherited classes.
 
virtual void CovarianceMatrix (ChMatrix33<> &C) const
 Compute the 3x3 covariance matrix (only the diagonal and upper part) It should be overridden by inherited classes.
 
virtual int GetManifoldDimension () const
 Tells the dimension of the geometry (0=point, 1=line, 2=surface, 3=solid)
 
virtual void Update ()
 Generic update of internal data. More...
 
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()

virtual void chrono::geometry::ChGeometry::GetBoundingBox ( double &  xmin,
double &  xmax,
double &  ymin,
double &  ymax,
double &  zmin,
double &  zmax,
ChMatrix33<> *  Rot = nullptr 
) const
inlinevirtual

Compute bounding box.

If a matrix Rot is not null, it should compute bounding box along the rotated directions represented by that transformation matrix Rot. It must be overridden by inherited classes.

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

◆ GetClassType()

◆ InflateBoundingBox()

void chrono::geometry::ChGeometry::InflateBoundingBox ( double &  xmin,
double &  xmax,
double &  ymin,
double &  ymax,
double &  zmin,
double &  zmax,
ChMatrix33<> *  Rot = NULL 
) const
virtual

Enlarge a previous existing bounding box.

Usually it does not need to be overridden: base function uses GetBoundingBox() If Rot is not null, the bounding box axes are considered rotated.

◆ Update()

virtual void chrono::geometry::ChGeometry::Update ( )
inlinevirtual

Generic update of internal data.

Default, does nothing. Most often it is not needed to implement this method, but some inherited classes may implement it (ex. to update references to external data. etc.).


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