RavEngine
Loading...
Searching...
No Matches
CustomConvex Struct Reference
Inheritance diagram for CustomConvex:
[legend]
Collaboration diagram for CustomConvex:
[legend]

Public Member Functions

 CustomConvex (float margin)
 
virtual physx::PxBounds3 getLocalBounds (const physx::PxGeometry &) const
 Return local bounds.
 
virtual bool generateContacts (const physx::PxGeometry &geom0, const physx::PxGeometry &geom1, const physx::PxTransform &pose0, const physx::PxTransform &pose1, const physx::PxReal contactDistance, const physx::PxReal meshContactMargin, const physx::PxReal toleranceLength, physx::PxContactBuffer &contactBuffer) const
 Contacts generation. Generate collision contacts between two geometries in given poses.
 
virtual physx::PxU32 raycast (const physx::PxVec3 &origin, const physx::PxVec3 &unitDir, const physx::PxGeometry &geom, const physx::PxTransform &pose, physx::PxReal maxDist, physx::PxHitFlags hitFlags, physx::PxU32 maxHits, physx::PxGeomRaycastHit *rayHits, physx::PxU32 stride, physx::PxRaycastThreadContext *) const
 
virtual bool overlap (const physx::PxGeometry &geom0, const physx::PxTransform &pose0, const physx::PxGeometry &geom1, const physx::PxTransform &pose1, physx::PxOverlapThreadContext *) const
 Overlap. Test if geometries overlap.
 
virtual bool sweep (const physx::PxVec3 &unitDir, const physx::PxReal maxDist, const physx::PxGeometry &geom0, const physx::PxTransform &pose0, const physx::PxGeometry &geom1, const physx::PxTransform &pose1, physx::PxGeomSweepHit &sweepHit, physx::PxHitFlags hitFlags, const physx::PxReal inflation, physx::PxSweepThreadContext *) const
 
virtual void visualize (const physx::PxGeometry &, physx::PxRenderOutput &, const physx::PxTransform &, const physx::PxBounds3 &) const
 Visualize custom geometry for debugging. Optional.
 
virtual bool usePersistentContactManifold (const physx::PxGeometry &, physx::PxReal &) const
 Compatible with PhysX's PCM feature. Allows to optimize contact generation.
 
virtual physx::PxReal getMargin () const
 Return the user defined shape margin. Margin should be greater than or equal to 0.
 
- Public Member Functions inherited from physx::PxCustomGeometry::Callbacks
virtual Type getCustomType () const =0
 Return custom type. The type purpose is for user to differentiate custom geometries. Not used by PhysX.
 
virtual PxU32 raycast (const PxVec3 &origin, const PxVec3 &unitDir, const PxGeometry &geom, const PxTransform &pose, PxReal maxDist, PxHitFlags hitFlags, PxU32 maxHits, PxGeomRaycastHit *rayHits, PxU32 stride, PxRaycastThreadContext *threadContext) const =0
 Raycast. Cast a ray against the geometry in given pose.
 
virtual bool sweep (const PxVec3 &unitDir, const PxReal maxDist, const PxGeometry &geom0, const PxTransform &pose0, const PxGeometry &geom1, const PxTransform &pose1, PxGeomSweepHit &sweepHit, PxHitFlags hitFlags, const PxReal inflation, PxSweepThreadContext *threadContext) const =0
 Sweep. Sweep one geometry against the other.
 
virtual void computeMassProperties (const PxGeometry &geometry, PxMassProperties &massProperties) const =0
 Compute custom geometry mass properties. For geometries usable with dynamic rigidbodies.
 
- Public Member Functions inherited from physx::PxGjkQuery::Support
virtual PxVec3 supportLocal (const PxVec3 &dir) const =0
 Return the farthest point on the user defined shape's core in given direction.
 

Public Attributes

float margin
 

Member Function Documentation

◆ generateContacts()

bool CustomConvex::generateContacts ( const physx::PxGeometry &  geom0,
const physx::PxGeometry &  geom1,
const physx::PxTransform &  pose0,
const physx::PxTransform &  pose1,
const physx::PxReal  contactDistance,
const physx::PxReal  meshContactMargin,
const physx::PxReal  toleranceLength,
physx::PxContactBuffer &  contactBuffer 
) const
virtual

Contacts generation. Generate collision contacts between two geometries in given poses.

Parameters
[in]geom0This custom geometry
[in]geom1The other geometry
[in]pose0This custom geometry pose
[in]pose1The other geometry pose
[in]contactDistanceThe distance at which contacts begin to be generated between the pairs
[in]meshContactMarginThe mesh contact margin.
[in]toleranceLengthThe toleranceLength. Used for scaling distance-based thresholds internally to produce appropriate results given simulations in different units
[out]contactBufferA buffer to write contacts to.
Returns
True if there are contacts. False otherwise.

Implements physx::PxCustomGeometry::Callbacks.

◆ getLocalBounds()

PxBounds3 CustomConvex::getLocalBounds ( const physx::PxGeometry &  geometry) const
virtual

Return local bounds.

Parameters
[in]geometryThis geometry.
Returns
Bounding box in the geometry local space.

Implements physx::PxCustomGeometry::Callbacks.

◆ getMargin()

PxReal CustomConvex::getMargin ( ) const
virtual

Return the user defined shape margin. Margin should be greater than or equal to 0.

Returns
Margin.

Implements physx::PxGjkQuery::Support.

◆ overlap()

bool CustomConvex::overlap ( const physx::PxGeometry &  geom0,
const physx::PxTransform &  pose0,
const physx::PxGeometry &  geom1,
const physx::PxTransform &  pose1,
physx::PxOverlapThreadContext *  threadContext 
) const
virtual

Overlap. Test if geometries overlap.

Parameters
[in]geom0This custom geometry
[in]pose0This custom geometry pose
[in]geom1The other geometry
[in]pose1The other geometry pose
[in]threadContextOptional user-defined per-thread context.
Returns
True if there is overlap. False otherwise.

Implements physx::PxCustomGeometry::Callbacks.

◆ usePersistentContactManifold()

virtual bool CustomConvex::usePersistentContactManifold ( const physx::PxGeometry &  geometry,
physx::PxReal &  breakingThreshold 
) const
inlinevirtual

Compatible with PhysX's PCM feature. Allows to optimize contact generation.

Parameters
[in]geometryThis geometry.
[out]breakingThresholdThe threshold to trigger contacts re-generation.

Implements physx::PxCustomGeometry::Callbacks.

◆ visualize()

virtual void CustomConvex::visualize ( const physx::PxGeometry &  geometry,
physx::PxRenderOutput &  out,
const physx::PxTransform &  absPose,
const physx::PxBounds3 &  cullbox 
) const
inlinevirtual

Visualize custom geometry for debugging. Optional.

Parameters
[in]geometryThis geometry.
[in]outRender output.
[in]absPoseGeometry absolute transform.
[in]cullboxRegion to visualize.

Implements physx::PxCustomGeometry::Callbacks.


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