PxTriangleMeshPoissonSampler
Defined in include/extensions/PxSamplingExt.h
Inheritance Relationships
Base Type
public PxPoissonSampler
(PxPoissonSampler)
-
class PxTriangleMeshPoissonSampler : public virtual PxPoissonSampler
Sampler to generate Poisson Samples on a triangle mesh.
Public Functions
-
virtual const PxArray<PxI32> &getSampleTriangleIds() const = 0
Gets the Poisson Samples’ triangle indices.
- Returns
Returns the generated Poisson Samples’ triangle indices
-
virtual const PxArray<PxVec3> &getSampleBarycentrics() const = 0
Gets the Poisson Samples’ barycentric coordinates.
- Returns
Returns the generated Poisson Samples’ barycentric coordinates
-
virtual bool isPointInTriangleMesh(const PxVec3 &p) = 0
Checks whether a point is inside the triangle mesh.
- Returns
Returns true if the point is inside the triangle mesh
-
inline virtual ~PxTriangleMeshPoissonSampler()
-
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 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 const PxArray<PxI32> &getSampleTriangleIds() const = 0