RavEngine
Loading...
Searching...
No Matches
physx::ShapePoissonSampler Class Reference
Inheritance diagram for physx::ShapePoissonSampler:
[legend]
Collaboration diagram for physx::ShapePoissonSampler:
[legend]

Public Member Functions

 ShapePoissonSampler (const PxGeometry &geometry_, const PxTransform &transform_, const PxBounds3 &worldBounds_, PxReal r, PxI32 numSampleAttemptsAroundPoint_=30, PxU32 maxNumSamples_=0)
 
virtual void addSamplesInVolume (const PointInVolumeTester &pointInVolume, const PxVec3 &sphereCenter, PxReal sphereRadius, bool createVolumeSamples)
 
virtual void addSamplesInSphere (const PxVec3 &sphereCenter, PxReal sphereRadius, bool createVolumeSamples)
 
virtual void addSamplesInBox (const PxBounds3 &axisAlignedBox, const PxQuat &boxOrientation, bool createVolumeSamples)
 
virtual void setSamplingRadius (PxReal samplingRadius)
 
virtual void addSamples (const PxArray< PxVec3 > &samples)
 
void createVolumeSamples (const PointInVolumeTester &pointInVolume, const PxVec3 &sphereCenter, PxReal sphereRadius, PxReal randomScale, PxReal r, bool addToSparseGrid=true)
 
virtual PxU32 removeSamples (const PxArray< PxVec3 > &samples)
 
virtual const PxArray< PxVec3 > & getSamples () const
 
- 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)
 

Public Attributes

PoissonSamplerShared poissonSamplerShared
 
const PxGeometry & shape
 
const PxTransform actorGlobalPose
 
PxArray< IndexWithNormal > activeSamples
 

Member Function Documentation

◆ addSamples()

virtual void physx::ShapePoissonSampler::addSamples ( const PxArray< PxVec3 > &  samples)
inlinevirtual

Adds samples

Parameters
[in]samplesThe samples to add. Adding samples is a bit an expensive operation.

Implements physx::PxPoissonSampler.

◆ addSamplesInBox()

void physx::ShapePoissonSampler::addSamplesInBox ( const PxBounds3 &  axisAlignedBox,
const PxQuat &  boxOrientation,
bool  createVolumeSamples 
)
virtual

Adds new Poisson Samples inside the box specified

Parameters
[in]axisAlignedBoxThe axis aligned bounding box. Used to define the region where new samples get added.
[in]boxOrientationThe orientation making an oriented bounding box out of the axis aligned one. Used to define the region where new samples get added.
[in]createVolumeSamplesIf set to true, samples will also get generated inside of the mesh, not just on its surface.

Implements physx::PxPoissonSampler.

◆ addSamplesInSphere()

void physx::ShapePoissonSampler::addSamplesInSphere ( const PxVec3 &  sphereCenter,
PxReal  sphereRadius,
bool  createVolumeSamples 
)
virtual

Adds new Poisson Samples inside the sphere specified

Parameters
[in]sphereCenterThe sphere's center. Used to define the region where new samples get added.
[in]sphereRadiusThe sphere's radius. Used to define the region where new samples get added.
[in]createVolumeSamplesIf set to true, samples will also get generated inside of the mesh, not just on its surface.

Implements physx::PxPoissonSampler.

◆ getSamples()

virtual const PxArray< PxVec3 > & physx::ShapePoissonSampler::getSamples ( ) const
inlinevirtual

Gets the Poisson Samples

Returns
Returns the generated Poisson Samples

Implements physx::PxPoissonSampler.

◆ removeSamples()

virtual PxU32 physx::ShapePoissonSampler::removeSamples ( const PxArray< PxVec3 > &  samples)
inlinevirtual

Adds samples

Parameters
[in]samplesThe samples to remove. Removing samples is a bit an expensive operation.
Returns
Returns the number of removed samples. If some samples were not found, then the number of actually removed samples will be smaller than the number of samples requested to remove

Implements physx::PxPoissonSampler.

◆ setSamplingRadius()

virtual void physx::ShapePoissonSampler::setSamplingRadius ( PxReal  samplingRadius)
inlinevirtual

Sets the sampling radius

Parameters
[in]samplingRadiusThe closest distance two surface samples are allowed to have. Changing the sampling radius is a bit an expensive operation.

Implements physx::PxPoissonSampler.


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