#include <lib_polygonreduction.h>
Performs polygon reduction for a polygon object.
Private Member Functions | |
PolygonReduction () | |
~PolygonReduction () | |
Alloc/Free | |
static PolygonReduction * | Alloc () |
static void | Free (PolygonReduction *&node) |
Processing | |
Bool | PreProcess (const PolygonReductionData &data) |
Bool | IsPreprocessing () |
void | StopPreprocessing () |
void | Reset () |
Levels | |
Bool | SetReductionStrengthLevel (Float strengthLevel) |
Bool | SetTriangleLevel (Int32 desiredLevel) |
Bool | SetVertexLevel (Int32 desiredLevel) |
Bool | SetRemainingEdgesLevel (Int32 desiredLevel) |
Float | GetReductionStrengthLevel () const |
Int32 | GetTriangleLevel () const |
Int32 | GetVertexLevel () const |
Int32 | GetRemainingEdgesLevel () const |
Float | GetMaxReductionStrengthLevel () const |
Int32 | GetMaxTriangleLevel () const |
Int32 | GetMaxVertexLevel () const |
Int32 | GetMaxRemainingEdgesLevel () const |
Int32 | GetMinTriangleLevel () const |
Int32 | GetMinVertexLevel () const |
Miscellaneous | |
const PolygonReductionData & | GetData () const |
Bool | IsValid () const |
|
private |
|
private |
|
static |
Allocates a PolygonReduction. Destroy the allocated PolygonReduction with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.
|
static |
Destructs PolygonReductions allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.
[in] | node | The PolygonReduction to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
Bool PreProcess | ( | const PolygonReductionData & | data | ) |
Starts the background or synchronous preprocessing that sets up the polygon reduction cache.
[in] | data | The data for the reduction. |
Bool IsPreprocessing | ( | ) |
Checks whether the background preprocessing thread is still running.
void StopPreprocessing | ( | ) |
Aborts preprocessing if it is running in the background. Resets the interactive settings values.
void Reset | ( | ) |
Aborts preprocessing if it is running in the background and frees all temporary data.
Sets the reduction strength level if the desired level is different than the current one.
[in] | strengthLevel | The desired reduction strength level. |
Reduces or restores the mesh to the desired number of triangles.
[in] | desiredLevel | The desired number of triangles on call. |
Reduces or restores the mesh to the desired number of vertices.
[in] | desiredLevel | The desired number of vertices on call. |
Reduces or restores the mesh to the desired number of edges remaining to collapse.
[in] | desiredLevel | The desired collapse stack index. |
Float GetReductionStrengthLevel | ( | ) | const |
Queries the current reduction strength level.
Int32 GetTriangleLevel | ( | ) | const |
Queries the current triangle count.
Int32 GetVertexLevel | ( | ) | const |
Queries the current vertex count.
Int32 GetRemainingEdgesLevel | ( | ) | const |
Queries the current remaining number of edges available to collapse.
Float GetMaxReductionStrengthLevel | ( | ) | const |
Queries the maximum reduction strength percentage.
Int32 GetMaxTriangleLevel | ( | ) | const |
Queries the triangle count when no reduction has been performed.
Int32 GetMaxVertexLevel | ( | ) | const |
Queries the vertex count when no reduction has been performed.
Int32 GetMaxRemainingEdgesLevel | ( | ) | const |
Queries the total number of possible edge collapses.
Int32 GetMinTriangleLevel | ( | ) | const |
Queries the triangle count when complete reduction has been performed.
Int32 GetMinVertexLevel | ( | ) | const |
Queries the vertex count when complete reduction has been performed.
const PolygonReductionData& GetData | ( | ) | const |
Retrieves the associated PolygonReductionData.
Bool IsValid | ( | ) | const |
Checks if a valid object and a valid document are associated with the PolygonReduction instance.