Blender V2.61 - r43446
Functions

LOD_decimation.cpp File Reference

#include "../extern/LOD_decimation.h"
#include "LOD_DecimationClass.h"

Go to the source code of this file.

Functions

int LOD_LoadMesh (LOD_Decimation_InfoPtr info)
int LOD_PreprocessMesh (LOD_Decimation_InfoPtr info)
int LOD_CollapseEdge (LOD_Decimation_InfoPtr info)
int LOD_FreeDecimationData (LOD_Decimation_InfoPtr info)

Detailed Description

Definition in file LOD_decimation.cpp.


Function Documentation

int LOD_CollapseEdge ( LOD_Decimation_InfoPtr  info)

Once both the stages above have been completed this function collapses a single edge in the mesh. The LOD_Decimation_Info structure is updated to represent the new mesh.

Returns:
1 if an edge was collapsed.
0 if no suitable edge was found to be collapsable You should stop calling this method in this case
Warning:
Do not expect that the order of polygons, vertices or vertex normals will be preserved by this operation. This function returns a packed array of polygons and vertices and so necessarily the order will be different. This means you should not expect to find the same polygon in the same place in the polygon array after this function has been called.

Definition at line 130 of file LOD_decimation.cpp.

References LOD_DecimationClass::Decimator(), LOD_DecimationClass::e_preprocessed, if(), LOD_Decimation_Info::intern, LOD_DecimationClass::m_e_decimation_state, NULL, and LOD_QSDecimator::Step().

Referenced by MyGlutKeyHandler::HandleKeyboard().

int LOD_FreeDecimationData ( LOD_Decimation_InfoPtr  )

Free any memory the decimation process used during the decimation process

Returns:
1 if internal data successfully freed
0 if no data was freed

Definition at line 145 of file LOD_decimation.cpp.

References LOD_Decimation_Info::intern, and NULL.

int LOD_LoadMesh ( LOD_Decimation_InfoPtr  info)

Create internal mesh representation from LOD_Decimation_Info structure.

Returns:
1 on successful loading
0 on failure
Warning:
This should be changed to return an enumeration detailing the error encountered

Definition at line 40 of file LOD_decimation.cpp.

References LOD_ManMesh2::AddTriangle(), LOD_DecimationClass::e_loaded, LOD_Decimation_Info::face_num, LOD_Decimation_Info::intern, LOD_DecimationClass::New(), NULL, MEM_SmartPtr< T >::Release(), LOD_ManMesh2::SetVertices(), LOD_Decimation_Info::triangle_index_buffer, LOD_Decimation_Info::vertex_buffer, LOD_Decimation_Info::vertex_normal_buffer, and LOD_Decimation_Info::vertex_num.

Referenced by main().

int LOD_PreprocessMesh ( LOD_Decimation_InfoPtr  info)

Allocate and Compute internal data strucures required for decimation.

Returns:
1 on successful computation of data
0 on failure
Warning:
This should be changed to return an enumeration detailing the error encountered

Definition at line 108 of file LOD_decimation.cpp.

References LOD_QSDecimator::Arm(), LOD_ExternNormalEditor::BuildNormals(), LOD_DecimationClass::Decimator(), LOD_DecimationClass::e_loaded, LOD_DecimationClass::e_preprocessed, LOD_DecimationClass::FaceEditor(), if(), LOD_Decimation_Info::intern, LOD_DecimationClass::m_e_decimation_state, and NULL.

Referenced by main().