LiMeshingTriProperties

FunctionLtStatus
LiMeshingTriProperties( LtPrim prim
LtPoly poly
)
Synopsis The default LtFuncMeshingTriProperties callback, used inside LiPrimitiveTriangulate.
Locationligeops
Parameters
prim The primitive being triangulated.
poly A triangle generated by the triangulation
Return Value A status value, indicating success, failure or error.

Description LiMeshingTriProperties is the default LtFuncMeshingTriProperties ( LI_MESH_CALLBACK_TRI_PROPERTIES) callback.

If triangulating a non-triangular polygon, LiPrimitiveTriangulate will create each triangle with a call to LiPolygonCreate. The triangulation code will take care of the triangle's LI_PROP_POLY_VREFS property, but all other properties are initialised by calling this callback function.

Any triangles which are presented as input to LiPrimitiveTriangulate will also be `initialised' with a call to the LI_MESH_CALLBACK_TRI_PROPERTIES callback function.

If users find that the default callback, LiMeshingTriProperties, is not handling things to their satisfaction, then they can write their own callback (perhaps utilising LiMeshingTriProperties).

For example, if the caller wishes to associate data structures of their own, with each triangle, then they can write their own LtFuncMeshingTriProperties callback, and the resulting triangulation will consist of triangles that each have user-generated data structures associated with them.

Example
/*
 * writing my own LtFuncMeshingTriProperties
 */
LtStatus
my_tri_props_func (
      LtPrim   prim, 
      LtPoly   poly
)
{
   LtStatus   result;

   /* 1: sort the basics */
   result = LiMeshingTriProperties(...);

   /* 2: sort my specifics */
   ...

   return ( result );
}

See Also LiMeshingEdgeSplit
LiMeshingEdgeSwap
LiMeshingInsertBridge
LiPrimitiveTriangulate
LiPrimitiveHierarchicalTriangulate
LiMeshingCallBacksSetCall
LiMeshingCallBacksGetCall
LiMeshingCallBacksCallState
LiMeshingCallBacksCreate
LiMeshingCallBacksCopy
LiMeshingCallBacksDestroy
LiMeshingCallBacksDebug


Copyright © 1990-1998, 1999 LightWork Design Limited. All rights reserved