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

Public Member Functions

 TriangleMeshPoissonSampler (const PxU32 *tris, PxU32 numTris, const PxVec3 *pts_, PxU32 numPts, 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 const PxArray< PxI32 > & getSampleTriangleIds () const
 
virtual const PxArray< PxVec3 > & getSampleBarycentrics () const
 
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
 
virtual bool isPointInTriangleMesh (const PxVec3 &p)
 
bool pointInMesh (const PxVec3 &p)
 
- 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 PxVec3 * originalPoints
 
const PxU32 * originalTriangles
 
const PxU32 numOriginalTriangles
 
PxVec3 max
 
PxArray< PxVec3 > points
 
PxArray< PxU32 > triangles
 
PxArray< PxU32 > triangleMap
 
PxArray< PxReal > triangleAreaBuffer
 
PxArray< PxI32 > adj
 
PxArray< Gu::BVHNode > tree
 
PxHashMap< PxU32, Gu::ClusterApproximation > clusters
 
PxArray< ActiveSample > activeSamples
 
PxArray< PxI32 > triangleIds
 
PxArray< PxVec3 > barycentricCoordinates
 

Member Function Documentation

◆ addSamples()

virtual void physx::TriangleMeshPoissonSampler::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::TriangleMeshPoissonSampler::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::TriangleMeshPoissonSampler::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.

◆ getSampleBarycentrics()

virtual const PxArray< PxVec3 > & physx::TriangleMeshPoissonSampler::getSampleBarycentrics ( ) const
inlinevirtual

Gets the Poisson Samples' barycentric coordinates

Returns
Returns the generated Poisson Samples' barycentric coordinates

Implements physx::PxTriangleMeshPoissonSampler.

◆ getSamples()

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

Gets the Poisson Samples

Returns
Returns the generated Poisson Samples

Implements physx::PxPoissonSampler.

◆ getSampleTriangleIds()

virtual const PxArray< PxI32 > & physx::TriangleMeshPoissonSampler::getSampleTriangleIds ( ) const
inlinevirtual

Gets the Poisson Samples' triangle indices

Returns
Returns the generated Poisson Samples' triangle indices

Implements physx::PxTriangleMeshPoissonSampler.

◆ isPointInTriangleMesh()

bool physx::TriangleMeshPoissonSampler::isPointInTriangleMesh ( const PxVec3 &  p)
virtual

Checks whether a point is inside the triangle mesh

Returns
Returns true if the point is inside the triangle mesh

Implements physx::PxTriangleMeshPoissonSampler.

◆ removeSamples()

virtual PxU32 physx::TriangleMeshPoissonSampler::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::TriangleMeshPoissonSampler::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: