PxPoissonSampler
Defined in include/extensions/PxSamplingExt.h
Inheritance Relationships
Base Type
public PxUserAllocated
(PxUserAllocated)
Derived Type
public PxTriangleMeshPoissonSampler
(PxTriangleMeshPoissonSampler)
-
class PxPoissonSampler : public PxUserAllocated
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.
Subclassed by PxTriangleMeshPoissonSampler
Public Functions
-
virtual bool setSamplingRadius(PxReal samplingRadius) = 0
Sets the sampling radius.
- Parameters
samplingRadius – [in] The closest distance two surface samples are allowed to have. Changing the sampling radius is a bit an expensive operation.
- Returns
Returns true if the sampling was successful and false if there was a problem. Usually an internal overflow is the problem for very big meshes or very small sampling radii.
-
virtual void addSamples(const PxArray<PxVec3> &samples) = 0
Adds samples.
- Parameters
samples – [in] The samples to add. Adding samples is a bit an expensive operation.
-
virtual PxU32 removeSamples(const PxArray<PxVec3> &samples) = 0
Adds samples.
- Parameters
samples – [in] The 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
-
virtual void addSamplesInSphere(const PxVec3 &sphereCenter, PxReal sphereRadius, bool createVolumeSamples = false) = 0
Adds new Poisson Samples inside the sphere specified.
- Parameters
sphereCenter – [in] The sphere’s center. Used to define the region where new samples get added.
sphereRadius – [in] The sphere’s radius. Used to define the region where new samples get added.
createVolumeSamples – [in] If set to true, samples will also get generated inside of the mesh, not just on its surface.
-
virtual void addSamplesInBox(const PxBounds3 &axisAlignedBox, const PxQuat &boxOrientation, bool createVolumeSamples = false) = 0
Adds new Poisson Samples inside the box specified.
- Parameters
axisAlignedBox – [in] The axis aligned bounding box. Used to define the region where new samples get added.
boxOrientation – [in] The orientation making an oriented bounding box out of the axis aligned one. Used to define the region where new samples get added.
createVolumeSamples – [in] If set to true, samples will also get generated inside of the mesh, not just on its surface.
-
virtual const PxArray<PxVec3> &getSamples() const = 0
Gets the Poisson Samples.
- Returns
Returns the generated Poisson Samples
-
inline virtual ~PxPoissonSampler()
-
inline void *operator new(size_t, void *address)
-
template<typename Alloc>
inline void *operator new(size_t size, Alloc alloc, const char *fileName, int line)
-
template<typename Alloc>
inline void *operator new(size_t size, size_t, Alloc alloc, const char *fileName, int line)
-
inline void operator delete(void*, void*)
-
template<typename Alloc>
inline void operator delete(void *ptr, Alloc alloc, const char *fileName, int line)
-
inline void operator delete(void *ptr)
-
template<typename Alloc>
inline void *operator new[](size_t size, Alloc alloc, const char *fileName, int line)
-
template<typename Alloc>
inline void *operator new[](size_t size, size_t, Alloc alloc, const char *fileName, int line)
-
template<typename Alloc>
inline void operator delete[](void *ptr, Alloc alloc, const char *fileName, int line)
-
inline void operator delete[](void *ptr)
-
virtual bool setSamplingRadius(PxReal samplingRadius) = 0