PolygonReduction Class Reference Library » Polygon Reduction

#include <lib_polygonreduction.h>

详细描述

Performs polygon reduction for a polygon object.

由于
R19

私有成员函数

  PolygonReduction ()
  ~PolygonReduction ()

Alloc/Free

static PolygonReduction Alloc ()
static void  Free ( PolygonReduction *&node)

Processing

Bool   PreProcess (const PolygonReductionData &data)
Bool   IsPreprocessing ()
void  StopPreprocessing ()
void  重置 ()

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

杂项

const PolygonReductionData GetData () const
Bool   IsValid () const

构造函数 & 析构函数文档编制

◆  PolygonReduction()

PolygonReduction () private

◆  ~PolygonReduction()

~ PolygonReduction () private

成员函数文档编制

◆  Alloc()

static PolygonReduction * Alloc ( )
static

Allocates a PolygonReduction . Destroy the allocated PolygonReduction with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

返回
The allocated PolygonReduction ,或 nullptr if the allocation failed.

◆  Free()

static void Free ( PolygonReduction *&  node )
static

Destructs PolygonReductions allocated with Alloc() 。使用 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.

◆  PreProcess()

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.
返回
true if successful, otherwise false .

◆  IsPreprocessing()

Bool IsPreprocessing ( )

Checks whether the background preprocessing thread is still running.

返回
true if preprocessing is ongoing, otherwise false .

◆  StopPreprocessing()

void StopPreprocessing ( )

Aborts preprocessing if it is running in the background. Resets the interactive settings values.

◆  Reset()

void Reset ( )

Aborts preprocessing if it is running in the background and frees all temporary data.

◆  SetReductionStrengthLevel()

Bool SetReductionStrengthLevel ( Float   strengthLevel )

Sets the reduction strength level if the desired level is different than the current one.

参数
[in] strengthLevel The desired reduction strength level.
返回
true if successful, otherwise false .

◆  SetTriangleLevel()

Bool SetTriangleLevel ( Int32   desiredLevel )

Reduces or restores the mesh to the desired number of triangles.

注意
If the desired level is different than the current level, at least one edge collapse or restore will be performed. The actual resulting number of triangles may be slightly different.
参数
[in] desiredLevel The desired number of triangles on call.
返回
true if successful, otherwise false .

◆  SetVertexLevel()

Bool SetVertexLevel ( Int32   desiredLevel )

Reduces or restores the mesh to the desired number of vertices.

注意
If the desired level is different than the current level, at least one edge collapse or restore will be performed. The actual resulting number of vertices may be slightly different.
参数
[in] desiredLevel The desired number of vertices on call.
返回
true if successful, otherwise false .

◆  SetRemainingEdgesLevel()

Bool SetRemainingEdgesLevel ( Int32   desiredLevel )

Reduces or restores the mesh to the desired number of edges remaining to collapse.

注意
If the desired level is different than the current level, at least one edge collapse or restore will be performed. The actual resulting number of edges may be slightly different.
参数
[in] desiredLevel The desired collapse stack index.
返回
true if successful, otherwise false .

◆  GetReductionStrengthLevel()

Float GetReductionStrengthLevel ( ) const

Queries the current reduction strength level.

返回
The reduction strength percentage: 0 means no reduction performed, 1 means maximum reduction performed.

◆  GetTriangleLevel()

Int32 GetTriangleLevel ( ) const

Queries the current triangle count.

返回
The triangle count.

◆  GetVertexLevel()

Int32 GetVertexLevel ( ) const

Queries the current vertex count.

返回
The vertex count.

◆  GetRemainingEdgesLevel()

Int32 GetRemainingEdgesLevel ( ) const

Queries the current remaining number of edges available to collapse.

返回
The remaining edges level.

◆  GetMaxReductionStrengthLevel()

Float GetMaxReductionStrengthLevel ( ) const

Queries the maximum reduction strength percentage.

返回
The maximum reduction strength percentage. Always 1.0 .

◆  GetMaxTriangleLevel()

Int32 GetMaxTriangleLevel ( ) const

Queries the triangle count when no reduction has been performed.

返回
The maximum triangle count.

◆  GetMaxVertexLevel()

Int32 GetMaxVertexLevel ( ) const

Queries the vertex count when no reduction has been performed.

返回
The maximum vertex count.

◆  GetMaxRemainingEdgesLevel()

Int32 GetMaxRemainingEdgesLevel ( ) const

Queries the total number of possible edge collapses.

返回
The maximum collapse count.

◆  GetMinTriangleLevel()

Int32 GetMinTriangleLevel ( ) const

Queries the triangle count when complete reduction has been performed.

返回
The minimum triangle count. May be non-zero if border constraints are enabled.

◆  GetMinVertexLevel()

Int32 GetMinVertexLevel ( ) const

Queries the vertex count when complete reduction has been performed.

返回
The minimum vertex count. May be non-zero if border constraints are enabled.

◆  GetData()

const PolygonReductionData & GetData ( ) const

Retrieves the associated PolygonReductionData .

返回
The polygon reduction data.

◆  IsValid()

Bool IsValid ( ) const

Checks if a valid object and a valid document are associated with the PolygonReduction instance.

返回
true PolygonReduction instance is valid, otherwise false .