chrono::geometry::ChRoundedBox Class Reference

Description

A rounded box (sphere-swept box) geometric object for collisions and visualization.

#include <ChRoundedBox.h>

Inheritance diagram for chrono::geometry::ChRoundedBox:
Collaboration diagram for chrono::geometry::ChRoundedBox:

Public Member Functions

 ChRoundedBox (ChVector<> &mpos, ChMatrix33<> &mrot, ChVector<> &mlengths, double mradsphere)
 
 ChRoundedBox (ChVector<> &mC0, ChVector<> &mC1, ChVector<> &mC2, ChVector<> &mC3)
 
 ChRoundedBox (const ChRoundedBox &source)
 
virtual ChRoundedBoxClone () const override
 "Virtual" copy constructor (covariant return type).
 
virtual GeometryType GetClassType () const override
 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<> *bbRot=NULL) const override
 Compute bounding box. More...
 
virtual ChVector Baricenter () const override
 Computes the baricenter of the box.
 
virtual void CovarianceMatrix (ChMatrix33<> &C) const override
 Computes the covariance matrix for the box.
 
virtual void Evaluate (ChVector<> &pos, const double parU, const double parV=0., const double parW=0.) const override
 Evaluate position in cube volume.
 
virtual int GetManifoldDimension () const override
 This is a solid.
 
ChMatrix33GetRotm ()
 Access the rotation of the box.
 
ChVectorGetPos ()
 Access the position of the barycenter of the box.
 
ChVectorGetSize ()
 Access the size of the box: a vector with the three hemi-lengths (lengths divided by two!)
 
ChVector GetLengths ()
 Get the x y z lengths of this box (that is, double the Size values)
 
void SetLengths (ChVector<> &mlen)
 Set the x y z lengths of this box (that is, double the Size values)
 
ChVector GetP1 () const
 
ChVector GetP2 () const
 
ChVector GetP3 () const
 
ChVector GetP4 () const
 
ChVector GetP5 () const
 
ChVector GetP6 () const
 
ChVector GetP7 () const
 
ChVector GetP8 () const
 
ChVector GetPn (int ipoint) const
 Get the n-th corner point, with ipoint = 1...8.
 
double GetVolume ()
 Get the volume (assuming no scaling in Rot matrix)
 
virtual void ArchiveOUT (ChArchiveOut &marchive) override
 
virtual void ArchiveIN (ChArchiveIn &marchive) override
 Method to allow de serialization of transient data from archives.
 
- Public Member Functions inherited from chrono::geometry::ChGeometry
 ChGeometry (const ChGeometry &source)
 
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 void Derive (ChVector<> &dir, const double parU, const double parV=0., const double parW=0.) const
 Evaluates a tangent versor on a geometry, given parametric coordinates, if possible. More...
 
virtual void Update ()
 Generic update of internal data. More...
 

Public Attributes

ChMatrix33 Rot
 
ChVector Pos
 rotation of box
 
ChVector Size
 position of center
 
double radsphere
 box halflengths More...
 

Additional Inherited Members

- Public Types inherited from chrono::geometry::ChGeometry
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.
 

Member Function Documentation

void chrono::geometry::ChRoundedBox::GetBoundingBox ( double &  xmin,
double &  xmax,
double &  ymin,
double &  ymax,
double &  zmin,
double &  zmax,
ChMatrix33<> *  Rot = NULL 
) const
overridevirtual

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 from chrono::geometry::ChGeometry.

virtual GeometryType chrono::geometry::ChRoundedBox::GetClassType ( ) const
overridevirtual

Get the class type as unique numerical ID (faster than using ChronoRTTI mechanism).

Each inherited class must return an unique ID.

Reimplemented from chrono::geometry::ChGeometry.

Member Data Documentation

double chrono::geometry::ChRoundedBox::radsphere

box halflengths

radius of sweeping sphere