This class adds the ability to track the axis-aligned bounding box for the entire model so that an entire body can be classified by which sub-domains it intersects.
|
virtual int | ClearModel () override |
| Delete all inserted geometry.
|
|
virtual bool | AddBox (std::shared_ptr< ChMaterialSurface > material, double hx, double hy, double hz, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Adds a box collision shape to the model and calculates the model's new AABB. More...
|
|
virtual bool | AddSphere (std::shared_ptr< ChMaterialSurface > material, double radius, const ChVector<> &pos=ChVector<>()) override |
| Adds a sphere collision shape to the model and calculates the model's new AABB. More...
|
|
virtual bool | AddTriangle (std::shared_ptr< ChMaterialSurface > material, ChVector<> A, ChVector<> B, ChVector<> C, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Adds a triangle collision shape to the model. More...
|
|
virtual void | GetAABB (ChVector<> &bbmin, ChVector<> &bbmax) const override |
| Gets the axis-aligned bounding box for the entire model Only valid at beginning of simulation.
|
|
virtual int | BuildModel () override |
| Builds the BV hierarchy. More...
|
|
virtual void | SyncPosition () override |
| Sets the position and orientation of the collision model as the rigid body current position.
|
|
virtual void | SetContactable (ChContactable *mc) override |
| Sets the pointer to the contactable object.
|
|
virtual bool | AddEllipsoid (std::shared_ptr< ChMaterialSurface > material, double rx, double ry, double rz, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Add an ellipsoid shape to this collision model. More...
|
|
virtual bool | AddRoundedBox (std::shared_ptr< ChMaterialSurface > material, double hx, double hy, double hz, double sphere_r, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Add a rounded box shape to this collision model. More...
|
|
virtual bool | AddCylinder (std::shared_ptr< ChMaterialSurface > material, double rx, double rz, double hy, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Add a cylinder to this collision model (default axis on Y direction). More...
|
|
virtual bool | AddRoundedCylinder (std::shared_ptr< ChMaterialSurface > material, double rx, double rz, double hy, double sphere_r, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Add a rounded cylinder to this collision model (default axis on Y direction). More...
|
|
virtual bool | AddCone (std::shared_ptr< ChMaterialSurface > material, double rx, double rz, double hy, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Add a cone to this collision model (default axis on Y direction). More...
|
|
virtual bool | AddRoundedCone (std::shared_ptr< ChMaterialSurface > material, double rx, double rz, double hy, double sphere_r, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Add a rounded cone to this collision model (default axis on Y direction). More...
|
|
virtual bool | AddCapsule (std::shared_ptr< ChMaterialSurface > material, double radius, double hlen, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Add a capsule to this collision model (default axis in Y direction). More...
|
|
virtual bool | AddConvexHull (std::shared_ptr< ChMaterialSurface > material, const std::vector< ChVector< double >> &pointlist, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Add a convex hull to this collision model. More...
|
|
virtual bool | AddTriangleMesh (std::shared_ptr< ChMaterialSurface > material, std::shared_ptr< geometry::ChTriangleMesh > trimesh, bool is_static, bool is_convex, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1), double sphereswept_thickness=0.0) override |
| Add a triangle mesh to this collision model. More...
|
|
virtual bool | AddBarrel (std::shared_ptr< ChMaterialSurface > material, double Y_low, double Y_high, double R_vert, double R_hor, double R_offset, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) override |
| Add a barrel-like shape to this collision model (main axis on Y direction). More...
|
|
virtual bool | AddCopyOfAnotherModel (ChCollisionModel *another) override |
| Add all shapes already contained in another model.
|
|
virtual ChCoordsys | GetShapePos (int index) const override |
| Return the position and orientation of the collision shape with specified index, relative to the model frame.
|
|
virtual std::vector< double > | GetShapeDimensions (int index) const override |
| Return shape characteristic dimensions. More...
|
|
ChBody * | GetBody () const |
| Return a pointer to the associated body.
|
|
void | SetBody (ChBody *body) |
| Set the pointer to the owner rigid body.
|
|
virtual bool | Add2Dpath (std::shared_ptr< ChMaterialSurface > material, std::shared_ptr< geometry::ChLinePath > mpath, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1), const double thickness=0.001) |
| Add a 2D closed line, defined on the XY plane passing by pos and aligned as rot, that defines a 2D collision shape that will collide with another 2D line of the same type if aligned on the same plane. More...
|
|
virtual bool | AddPoint (std::shared_ptr< ChMaterialSurface > material, double radius=0, const ChVector<> &pos=ChVector<>()) |
| Add a point-like sphere, that will collide with other geometries, but won't ever create contacts between them. More...
|
|
virtual bool | AddConvexHullsFromFile (std::shared_ptr< ChMaterialSurface > material, ChStreamInAscii &mstream, const ChVector<> &pos=ChVector<>(), const ChMatrix33<> &rot=ChMatrix33<>(1)) |
| Add a cluster of convex hulls specified in a '.chulls' file description. More...
|
|
ChContactable * | GetContactable () |
| Get the pointer to the contactable object.
|
|
virtual ChPhysicsItem * | GetPhysicsItem () |
| Get the pointer to the client owner ChPhysicsItem. More...
|
|
virtual void | SetFamily (int mfamily) |
| By default, all collision objects belong to family n.0, but you can set family in range 0..15. More...
|
|
virtual int | GetFamily () |
|
virtual void | SetFamilyMaskNoCollisionWithFamily (int mfamily) |
| By default, family mask is all turned on, so all families can collide with this object, but you can turn on-off some bytes of this mask so that some families do not collide. More...
|
|
virtual void | SetFamilyMaskDoCollisionWithFamily (int mfamily) |
|
virtual bool | GetFamilyMaskDoesCollisionWithFamily (int mfamily) |
| Tells if the family mask of this collision object allows for the collision with another collision object belonging to a given family. More...
|
|
virtual short int | GetFamilyGroup () const |
| Return the collision family group of this model. More...
|
|
virtual void | SetFamilyGroup (short int group) |
| Set the collision family group of this model. More...
|
|
virtual short int | GetFamilyMask () const |
| Return the collision mask for this model. More...
|
|
virtual void | SetFamilyMask (short int mask) |
| Set the collision mask for this model. More...
|
|
virtual void | SetSafeMargin (double amargin) |
| Set the suggested collision 'inward safe margin' for the shapes to be added from now on, using the AddBox, AddCylinder etc (where, if this margin is too high for some thin or small shapes, it may be clamped). More...
|
|
virtual float | GetSafeMargin () |
| Returns the inward safe margin (see SetSafeMargin() )
|
|
virtual void | SetEnvelope (double amargin) |
| Set the suggested collision outward 'envelope' (used from shapes added, from now on, to this collision model). More...
|
|
virtual float | GetEnvelope () |
| Return the outward safe margin (see SetEnvelope() )
|
|
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.
|
|
int | GetNumShapes () const |
| Return the number of collision shapes in this model.
|
|
const std::vector< std::shared_ptr< ChCollisionShape > > & | GetShapes () const |
| Get the list of collision shapes in this model.
|
|
std::shared_ptr< ChCollisionShape > | GetShape (int index) |
| Get the collision shape with specified index.
|
|
void | SetShapeMaterial (int index, std::shared_ptr< ChMaterialSurface > mat) |
| Set the contact material for the collision shape with specified index.
|
|
void | SetAllShapesMaterial (std::shared_ptr< ChMaterialSurface > mat) |
| Set the contact material for all collision shapes in the model (all shapes will share the material). More...
|
|