ReactPhysics3D  v0.10.1
C++ Physics engine library
reactphysics3d::ConcaveMeshShape Class Reference

This class represents a static concave mesh shape. More...

#include <include/reactphysics3d/collision/shapes/ConcaveMeshShape.h>

Inheritance diagram for reactphysics3d::ConcaveMeshShape:
reactphysics3d::ConcaveShape reactphysics3d::CollisionShape

Public Member Functions

 ConcaveMeshShape (const ConcaveMeshShape &shape)=delete
 Deleted copy-constructor.
 
ConcaveMeshShapeoperator= (const ConcaveMeshShape &shape)=delete
 Deleted assignment operator.
 
virtual void setScale (const Vector3 &scale) override
 Set the scale of the shape.
 
uint32 getNbVertices () const
 Return the number of vertices in the mesh.
 
uint32 getNbTriangles () const
 Return the number of triangles of the mesh.
 
void getTriangleVerticesIndices (uint32 triangleIndex, uint32 &outV1Index, uint32 &outV2Index, uint32 &outV3Index) const
 Return the indices of the three vertices of a given triangle in the array.
 
void getTriangleVertices (uint32 triangleIndex, Vector3 &outV1, Vector3 &outV2, Vector3 &outV3) const
 Return the coordinates of the three vertices of a given triangle face.
 
void getTriangleVerticesNormals (uint32 triangleIndex, Vector3 &outN1, Vector3 &outN2, Vector3 &outN3) const
 Return the normals of the three vertices of a given triangle face.
 
const Vector3 getVertex (uint32 vertexIndex) const
 Return the coordinates of a given vertex.
 
const Vector3getVertexNormal (uint32 vertexIndex) const
 Return the normal of a given vertex.
 
virtual AABB getLocalBounds () const override
 Return the local bounds of the shape in x, y and z directions. More...
 
virtual std::string to_string () const override
 Return the string representation of the shape.
 
- Public Member Functions inherited from reactphysics3d::ConcaveShape
 ConcaveShape (CollisionShapeName name, MemoryAllocator &allocator, const Vector3 &scaling)
 Constructor.
 
virtual ~ConcaveShape () override=default
 Destructor.
 
 ConcaveShape (const ConcaveShape &shape)=delete
 Deleted copy-constructor.
 
ConcaveShapeoperator= (const ConcaveShape &shape)=delete
 Deleted assignment operator.
 
TriangleRaycastSide getRaycastTestType () const
 Return the raycast test type (front, back, front-back)
 
void setRaycastTestType (TriangleRaycastSide testType)
 
const Vector3getScale () const
 Return the scale of the shape.
 
virtual Vector3 getLocalInertiaTensor (decimal mass) const override
 Return the local inertia tensor of the collision shape. More...
 
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 decimal getVolume () const override
 Compute and return the volume of the collision shape. More...
 
- 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.
 
CollisionShapeoperator= (const CollisionShape &shape)=delete
 Deleted assignment operator.
 
CollisionShapeName getName () const
 Return the name of the collision shape. More...
 
CollisionShapeType getType () const
 Return the type of the collision shape. More...
 
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. More...
 

Detailed Description

This class represents a static concave mesh shape.

Note that collision detection with a concave mesh shape can be very expensive. You should only use this shape for a static mesh.

Member Function Documentation

◆ getLocalBounds()

AABB ConcaveMeshShape::getLocalBounds ( ) const
overridevirtual

Return the local bounds of the shape in x, y and z directions.

Parameters
minThe minimum bounds of the shape in local-space coordinates
maxThe maximum bounds of the shape in local-space coordinates

Implements reactphysics3d::CollisionShape.


The documentation for this class was generated from the following files: