Description

Typedefs

   
   
typedef std::array< float, 5 > weights_t

Variables

   
   
const int VERTEX_OFFSET
   
const int NORMAL_OFFSET
   
const int COLOR_OFFSET
   
const int TEX0_OFFSET
   
const int BOUNDARY_OFFSET

Functions

   
   
Mesh * simplifyMesh( Mesh * mesh, uint32_t numberOfTriangles, float threshold, bool useOptimalPositioning, float maxAngle, const weights_t & weights)

Documentation

typedef
Rendering::MeshUtils::Simplification::weights_t

public
 
 
typedef std::array< float, 5 > weights_t

Defined in Rendering/MeshUtils/Simplification.h:22


variable
Rendering::MeshUtils::Simplification::VERTEX_OFFSET

public static
 
 
const int VERTEX_OFFSET

Defined in Rendering/MeshUtils/Simplification.h:23


variable
Rendering::MeshUtils::Simplification::NORMAL_OFFSET

public static
 
 
const int NORMAL_OFFSET

Defined in Rendering/MeshUtils/Simplification.h:24


variable
Rendering::MeshUtils::Simplification::COLOR_OFFSET

public static
 
 
const int COLOR_OFFSET

Defined in Rendering/MeshUtils/Simplification.h:25


variable
Rendering::MeshUtils::Simplification::TEX0_OFFSET

public static
 
 
const int TEX0_OFFSET

Defined in Rendering/MeshUtils/Simplification.h:26


variable
Rendering::MeshUtils::Simplification::BOUNDARY_OFFSET

public static
 
 
const int BOUNDARY_OFFSET

Defined in Rendering/MeshUtils/Simplification.h:27


function
Rendering::MeshUtils::Simplification::simplifyMesh

public
     
     
Mesh * simplifyMesh( Mesh * mesh,
  uint32_t numberOfTriangles,
  float threshold,
  bool useOptimalPositioning,
  float maxAngle,
  const weights_t & weights
)    

Simplify the given mesh to a total number of triangles given in the parameters. This method will return a new mesh and leave the original unchanged. Hint: Vertex weight should contain normalization of vertex position (divide by BoundingBox.extendMax)

Parameters

mesh
Mesh to be simplified
numberOfTriangles
the number of polygons the returned mesh should have
threshold
maximum distance of vertices not connected by an edge for pair selection
useOptimalPositioning
enables/disables calculation of optimal positioning for vertices
maxAngle
maximum angle a face may rotate per merge step (value is arccos of angle [-1, 1])
weights
weights for all attributes using indices defined above

Returns

new simplified mesh, null if simplification failed

Author: Jonas Knoll, Benjamin Eikel

Defined in Rendering/MeshUtils/Simplification.h:44