Description
Base class for geometric objects used for collisions and visualization.
#include <ChGeometry.h>
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 ChGeometry * | Clone () 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()
|
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()
|
inlinevirtual |
Get the class type as unique numerical ID (faster than using ChronoRTTI mechanism).
Each inherited class must return an unique ID.
Reimplemented in chrono::geometry::ChTriangleMeshConnected, chrono::geometry::ChLineCam, chrono::geometry::ChTriangleMeshSoup, chrono::geometry::ChTriangleMesh, chrono::geometry::ChLineArc, chrono::geometry::ChLine, chrono::geometry::ChRoundedBox, chrono::geometry::ChTriangle, chrono::geometry::ChBox, chrono::geometry::ChLineBezier, chrono::geometry::ChLinePath, chrono::geometry::ChRoundedCylinder, chrono::geometry::ChCapsule, chrono::geometry::ChCylinder, chrono::geometry::ChLinePoly, chrono::geometry::ChLineSegment, chrono::geometry::ChCone, chrono::geometry::ChEllipsoid, chrono::geometry::ChSphere, and chrono::geometry::ChRoundedCone.
◆ InflateBoundingBox()
|
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()
|
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