PxConvexCoreGeometry
Defined in include/geometry/PxConvexCoreGeometry.h
-
class PxConvexCoreGeometry : public PxGeometry
Convex core geometry class.
This class allows users to create a variety of convex shapes. Each shape is defined by:
A core, specified by one of the pre-authored GJK support functions.
A margin, which is an arbitrary distance that extends the core.
The resulting convex shape includes both the core and the surrounding space within the margin.
Simple examples include:
A sphere: created from a point core with a non-zero margin (radius).
A capsule: created from a segment core with a non-zero margin.
Public Functions
-
inline PxConvexCoreGeometry()
Default constructor.
-
template<typename Core>
inline PxConvexCoreGeometry(const Core &core, PxReal margin = 0) Constructor.
- Template Parameters
Core – The type of the core
- Parameters
core – The core to use
margin – The margin to add around the core. Defaults to 0
-
inline PxConvexCoreGeometry(const PxConvexCoreGeometry &that)
Copy constructor.
- Parameters
that – The geometry to copy from
-
inline PxConvexCoreGeometry &operator=(const PxConvexCoreGeometry &that)
Assignment operator.
- Parameters
that – The geometry to assign from
-
inline PxConvexCore::Type getCoreType() const
Get the type of the core.
- Returns
The type of the core
-
inline const void *getCoreData() const
Get a pointer to the core data.
- Returns
A pointer to the core data.
-
inline PxReal getMargin() const
Get the margin of the convex core geometry.
- Returns
The margin size.
-
bool isValid() const
Check if the convex core geometry is valid.
- Returns
True if the geometry is valid, false otherwise.
-
inline PxGeometryType::Enum getType() const
Returns the type of the geometry.
- Returns
The type of the object.
Public Members
-
float mTypePadding
Public Static Attributes
Protected Attributes
-
PxGeometryType::Enum mType