RavEngine
Loading...
Searching...
No Matches
physx::PxPoissonSampler Class Referenceabstract

Sampler to generate Poisson Samples locally on a triangle mesh or a shape. For every local addition of new samples, an individual sampling density can be used. More...

#include <PxSamplingExt.h>

Inheritance diagram for physx::PxPoissonSampler:
[legend]
Collaboration diagram for physx::PxPoissonSampler:
[legend]

Public Member Functions

virtual void setSamplingRadius (PxReal samplingRadius)=0
 
virtual void addSamples (const PxArray< PxVec3 > &samples)=0
 
virtual PxU32 removeSamples (const PxArray< PxVec3 > &samples)=0
 
virtual void addSamplesInSphere (const PxVec3 &sphereCenter, PxReal sphereRadius, bool createVolumeSamples=false)=0
 
virtual void addSamplesInBox (const PxBounds3 &axisAlignedBox, const PxQuat &boxOrientation, bool createVolumeSamples=false)=0
 
virtual const PxArray< PxVec3 > & getSamples () const =0
 
- 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)
 

Detailed Description

Sampler to generate Poisson Samples locally on a triangle mesh or a shape. For every local addition of new samples, an individual sampling density can be used.

Member Function Documentation

◆ addSamples()

virtual void physx::PxPoissonSampler::addSamples ( const PxArray< PxVec3 > &  samples)
pure virtual

Adds samples

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

Implemented in physx::TriangleMeshPoissonSampler, and physx::ShapePoissonSampler.

◆ addSamplesInBox()

virtual void physx::PxPoissonSampler::addSamplesInBox ( const PxBounds3 &  axisAlignedBox,
const PxQuat &  boxOrientation,
bool  createVolumeSamples = false 
)
pure 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.

Implemented in physx::TriangleMeshPoissonSampler, and physx::ShapePoissonSampler.

◆ addSamplesInSphere()

virtual void physx::PxPoissonSampler::addSamplesInSphere ( const PxVec3 &  sphereCenter,
PxReal  sphereRadius,
bool  createVolumeSamples = false 
)
pure 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.

Implemented in physx::TriangleMeshPoissonSampler, and physx::ShapePoissonSampler.

◆ getSamples()

virtual const PxArray< PxVec3 > & physx::PxPoissonSampler::getSamples ( ) const
pure virtual

Gets the Poisson Samples

Returns
Returns the generated Poisson Samples

Implemented in physx::TriangleMeshPoissonSampler, and physx::ShapePoissonSampler.

◆ removeSamples()

virtual PxU32 physx::PxPoissonSampler::removeSamples ( const PxArray< PxVec3 > &  samples)
pure virtual

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

Implemented in physx::TriangleMeshPoissonSampler, and physx::ShapePoissonSampler.

◆ setSamplingRadius()

virtual void physx::PxPoissonSampler::setSamplingRadius ( PxReal  samplingRadius)
pure virtual

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.

Implemented in physx::TriangleMeshPoissonSampler, and physx::ShapePoissonSampler.


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