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:

  1. A core, specified by one of the pre-authored GJK support functions.

  2. 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.

template<typename Core>
inline const Core &getCore() const#

Get the core.

Returns:

The core.

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

static const PxU32 MAX_CORE_SIZE = sizeof(PxReal) * 6#

Maximum size of the core data in bytes.

Protected Attributes

PxGeometryType::Enum mType#