![]() |
ReactPhysics3D
v0.10.2
C++ Physics engine library
|
This abstract class represents a concave collision shape associated with a body that is used during the narrow-phase collision detection. More...
#include <include/reactphysics3d/collision/shapes/ConcaveShape.h>
Public Member Functions | |
| ConcaveShape (CollisionShapeName name, MemoryAllocator &allocator, const Vector3 &scaling) | |
| Constructor. | |
| virtual | ~ConcaveShape () override=default |
| Destructor. | |
| ConcaveShape (const ConcaveShape &shape)=delete | |
| Deleted copy-constructor. | |
| ConcaveShape & | operator= (const ConcaveShape &shape)=delete |
| Deleted assignment operator. | |
| TriangleRaycastSide | getRaycastTestType () const |
| Return the raycast test type (front, back, front-back) | |
| void | setRaycastTestType (TriangleRaycastSide testType) |
| const Vector3 & | getScale () const |
| Return the scale of the shape. | |
| virtual void | setScale (const Vector3 &scale) |
| Set the scale of the shape. | |
| virtual Vector3 | getLocalInertiaTensor (decimal mass) const override |
| Return the local inertia tensor of the collision shape. | |
| virtual bool | isConvex () const override |
| Return true if the collision shape is convex, false if it is concave. | |
| virtual bool | isPolyhedron () const override |
| Return true if the collision shape is a polyhedron. | |
| virtual void | computeOverlappingTriangles (const AABB &localAABB, Array< Vector3 > &triangleVertices, Array< Vector3 > &triangleVerticesNormals, Array< uint32 > &shapeIds, MemoryAllocator &allocator) const =0 |
| Use a callback method on all triangles of the concave shape inside a given AABB. | |
| virtual decimal | getVolume () const override |
| Compute and return the volume of the collision shape. | |
Public Member Functions inherited from reactphysics3d::CollisionShape | |
| CollisionShape (CollisionShapeName name, CollisionShapeType type, MemoryAllocator &allocator) | |
| Constructor. | |
| virtual | ~CollisionShape ()=default |
| Destructor. | |
| CollisionShape (const CollisionShape &shape)=delete | |
| Deleted copy-constructor. | |
| CollisionShape & | operator= (const CollisionShape &shape)=delete |
| Deleted assignment operator. | |
| CollisionShapeName | getName () const |
| Return the name of the collision shape. | |
| CollisionShapeType | getType () const |
| Return the type of the collision shape. | |
| virtual AABB | getLocalBounds () const =0 |
| Return the local bounds of the shape in x, y and z directions. | |
| uint32 | getId () const |
| Return the id of the shape. | |
| virtual AABB | computeTransformedAABB (const Transform &transform) const |
| Compute the transformed AABB of the collision shape given a transform. | |
| virtual std::string | to_string () const =0 |
| Return the string representation of the shape. | |
This abstract class represents a concave collision shape associated with a body that is used during the narrow-phase collision detection.
|
pure virtual |
Use a callback method on all triangles of the concave shape inside a given AABB.
Implemented in reactphysics3d::HeightFieldShape.
|
overridevirtual |
Return the local inertia tensor of the collision shape.
| mass | Mass to use to compute the inertia tensor of the collision shape |
Implements reactphysics3d::CollisionShape.
|
overridevirtual |
Compute and return the volume of the collision shape.
Note that we approximate the volume of a concave shape with the volume of its AABB.
Implements reactphysics3d::CollisionShape.
|
overridevirtual |
Return true if the collision shape is convex, false if it is concave.
Implements reactphysics3d::CollisionShape.
|
overridevirtual |
Return true if the collision shape is a polyhedron.
Implements reactphysics3d::CollisionShape.
| RP3D_FORCE_INLINE void reactphysics3d::ConcaveShape::setRaycastTestType | ( | TriangleRaycastSide | testType | ) |
| testType | Raycast test type for the triangle (front, back, front-back) |
|
virtual |
Set the scale of the shape.
Note that you might want to recompute the inertia tensor and center of mass of the body after changing the scale of a collision shape.
Reimplemented in reactphysics3d::ConcaveMeshShape.