ReactPhysics3D: reactphysics3d::ConvexShape Class Reference

| ReactPhysics3D v0.10.2 C++ Physics engine library

Loading...
Searching...
No Matches
Public Member Functions | List of all members
reactphysics3d::ConvexShape Class Referenceabstract

This abstract class represents a convex collision shape associated with a body that is used during the narrow-phase collision detection. More...

`#include <include/reactphysics3d/collision/shapes/ConvexShape.h>`

Inheritance diagram for reactphysics3d::ConvexShape:

## Public Member Functions
| ConvexShape (CollisionShapeName name, CollisionShapeType type, MemoryAllocator &allocator, decimal margin=decimal(0.0))
| Constructor.
virtual | ~ConvexShape () override=default
| Destructor.
| ConvexShape (const ConvexShape &shape)=delete
| Deleted copy-constructor.
ConvexShape & | operator= (const ConvexShape &shape)=delete
| Deleted assignment operator.
decimal | getMargin () const
| Return the current object margin.
virtual bool | isConvex () const override
| Return true if the collision shape is convex, false if it is concave.
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 bool | isPolyhedron () const =0
| Return true if the collision shape is a polyhedron.
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 Vector3 | getLocalInertiaTensor (decimal mass) const =0
| Return the local inertia tensor of the collision shapes.
virtual decimal | getVolume () const =0
| Compute and return the volume of the collision 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.

## Detailed Description

This abstract class represents a convex collision shape associated with a body that is used during the narrow-phase collision detection.

## Member Function Documentation

## ◆ getMargin()

RP3D_FORCE_INLINE decimal reactphysics3d::ConvexShape::getMargin | ( |  | ) | const

Return the current object margin.

Returns
  The margin (in meters) around the collision shape

## ◆ isConvex()

RP3D_FORCE_INLINE bool reactphysics3d::ConvexShape::isConvex | ( |  | ) | const
| overridevirtual

Return true if the collision shape is convex, false if it is concave.

Implements reactphysics3d::CollisionShape.

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

- include/reactphysics3d/collision/shapes/ConvexShape.h
- src/collision/shapes/ConvexShape.cpp