Tesseract 0.28.4
Loading...
Searching...
No Matches
VHACD::IVHACD Class Referenceabstract

Classes

class  IUserCallback
class  IUserLogger
class  IUserTaskRunner
class  ConvexHull
class  Parameters

Public Member Functions

virtual void Cancel ()=0
virtual bool Compute (const float *const points, const uint32_t countPoints, const uint32_t *const triangles, const uint32_t countTriangles, const Parameters &params)=0
virtual bool Compute (const double *const points, const uint32_t countPoints, const uint32_t *const triangles, const uint32_t countTriangles, const Parameters &params)=0
virtual uint32_t GetNConvexHulls () const =0
virtual bool GetConvexHull (const uint32_t index, ConvexHull &ch) const =0
virtual void Clean ()=0
virtual void Release ()=0
virtual bool ComputeCenterOfMass (double centerOfMass[3]) const =0
virtual bool IsReady () const
virtual uint32_t findNearestConvexHull (const double pos[3], double &distanceToHull)=0

Member Function Documentation

◆ Cancel()

virtual void VHACD::IVHACD::Cancel ( )
pure virtual

Will cause the convex decomposition operation to be canceled early. No results will be produced but the background operation will end as soon as it can.

◆ Compute() [1/2]

virtual bool VHACD::IVHACD::Compute ( const float *const points,
const uint32_t countPoints,
const uint32_t *const triangles,
const uint32_t countTriangles,
const Parameters & params )
pure virtual

Compute a convex decomposition of a triangle mesh using float vertices and the provided user parameters.

Parameters
points: The vertices of the source mesh as floats in the form of X1,Y1,Z1, X2,Y2,Z2,.. etc.
countPoints: The number of vertices in the source mesh.
triangles: The indices of triangles in the source mesh in the form of I1,I2,I3, ....
countTriangles: The number of triangles in the source mesh
params: The convex decomposition parameters to apply
Returns
: Returns true if the convex decomposition operation can be started

◆ Compute() [2/2]

virtual bool VHACD::IVHACD::Compute ( const double *const points,
const uint32_t countPoints,
const uint32_t *const triangles,
const uint32_t countTriangles,
const Parameters & params )
pure virtual

Compute a convex decomposition of a triangle mesh using double vertices and the provided user parameters.

Parameters
points: The vertices of the source mesh as floats in the form of X1,Y1,Z1, X2,Y2,Z2,.. etc.
countPoints: The number of vertices in the source mesh.
triangles: The indices of triangles in the source mesh in the form of I1,I2,I3, ....
countTriangles: The number of triangles in the source mesh
params: The convex decomposition parameters to apply
Returns
: Returns true if the convex decomposition operation can be started

◆ GetNConvexHulls()

virtual uint32_t VHACD::IVHACD::GetNConvexHulls ( ) const
pure virtual

Returns the number of convex hulls that were produced.

Returns
: Returns the number of convex hulls produced, or zero if it failed or was canceled

◆ GetConvexHull()

virtual bool VHACD::IVHACD::GetConvexHull ( const uint32_t index,
ConvexHull & ch ) const
pure virtual

Retrieves one of the convex hulls in the solution set

Parameters
index: Which convex hull to retrieve
ch: The convex hull descriptor to return
Returns
: Returns true if the convex hull exists and could be retrieved

◆ Clean()

virtual void VHACD::IVHACD::Clean ( )
pure virtual

Releases any memory allocated by the V-HACD class

◆ Release()

virtual void VHACD::IVHACD::Release ( )
pure virtual

Releases this instance of the V-HACD class

◆ findNearestConvexHull()

virtual uint32_t VHACD::IVHACD::findNearestConvexHull ( const double pos[3],
double & distanceToHull )
pure virtual

At the request of LegionFu : out_l.nosp@m.ook@.nosp@m.foxma.nosp@m.il.c.nosp@m.om This method will return which convex hull is closest to the source position. You can use this method to figure out, for example, which vertices in the original source mesh are best associated with which convex hull.

Parameters
pos: The input 3d position to test against
Returns
: Returns which convex hull this position is closest to.