LiPrimitiveSimplifyMesh

FunctionLtPrim
LiPrimitiveSimplifyMesh( LtPrim input_mesh
LtBoolean keep_input
)
Synopsis Strip all non-essential edges, polygons and vertices from a polymesh primitive.
Locationligeops
Parameters
input_mesh The polymesh which is to be simplified
keep_input Flag which determines whether we want to keep the original geometry or not
Return Value A simplified primitive, NULL if something went wrong.

Description The polymesh passed in as input is simplified by this function. All polygon edges which can safely be removed are removed from the mesh. Edges which will be left include those which form part of the external boundary of the mesh (although some of these may be merged together for long boundary sections comprising several co-linear edges). Bridging edges which are needed to connect together different loops of polygons are also left in the mesh. Finally any edge which the function classifies as "sharp" will be left. Here "sharp" means that the polygons on each side of the edge are adjudged to have different plane equations. A new control variable is used to control how strictly this criterion is adhered to:

LI_CONTROL_SIMPLIFY_ANGLE_TOLERANCE

This control variable takes an angle in degrees (the default value being 0.1). If the polygons on each side of an edge have normals which differ by more than the value of this control variable then the edge is deemed to be "sharp" and is not removed from the mesh. The same control variable is used to determine whether or not two edges along the boundary of the mesh are co-linear and so can be merged together.

Note that only primitives of type LI_PRIM_TYPE_MESH can be passed as input to this function. If the original geometry is to be kept then the keep_input argument should be set to TRUE. If this is done then a copy of the input geometry will be made internally and it is this copy which will be simplified. If keep_input is FALSE then the input geometry itself will be modified.

See Also LiPrimitiveReferenceSimplifyMesh


© LightWork Design Ltd. All information contained in this document is the copyright of LightWork Design Ltd. (unless stated otherwise) and may not be used or reproduced with prior written consent.