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

Public Member Functions

void setDimensions (int x, int y, int z)
 
int dimX () const
 
int dimY () const
 
int dimZ () const
 
void setVoxelSize (float x, float y, float z)
 
const physx::PxVec3 & voxelSize () const
 
float voxelSizeX () const
 
float voxelSizeY () const
 
float voxelSizeZ () const
 
physx::PxVec3 extents () const
 
void setVoxel (int x, int y, int z, bool yes=true)
 
bool voxel (int x, int y, int z) const
 
void clearVoxels ()
 
void setFloorVoxels (int layers)
 
void setWaveVoxels ()
 
void voxelize (const physx::PxGeometry &geom, const physx::PxTransform &pose, bool add=true)
 
physx::PxVec3 voxelPos (int x, int y, int z) const
 
void pointCoords (const physx::PxVec3 &p, int &x, int &y, int &z) const
 
void getVoxelRegion (const physx::PxBounds3 &b, int &sx, int &sy, int &sz, int &ex, int &ey, int &ez) const
 
virtual DECLARE_CUSTOM_GEOMETRY_TYPE 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 void computeMassProperties (const physx::PxGeometry &, physx::PxMassProperties &) const
 Compute custom geometry mass properties. For geometries usable with dynamic rigidbodies.
 
virtual bool usePersistentContactManifold (const physx::PxGeometry &, physx::PxReal &) const
 Compatible with PhysX's PCM feature. Allows to optimize contact generation.
 
- 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.
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Member Function Documentation

◆ computeMassProperties()

virtual void VoxelMap::computeMassProperties ( const physx::PxGeometry &  geometry,
physx::PxMassProperties &  massProperties 
) const
inlinevirtual

Compute custom geometry mass properties. For geometries usable with dynamic rigidbodies.

Parameters
[in]geometryThis geometry.
[out]massPropertiesMass properties to compute.

Implements physx::PxCustomGeometry::Callbacks.

◆ generateContacts()

bool VoxelMap::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 VoxelMap::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.

◆ overlap()

bool VoxelMap::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 VoxelMap::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()

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

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: