LiMeshingCallBacksSetCall

FunctionLtStatus
LiMeshingCallBacksSetCall( LtMeshingCallBacks meshcalls
LtCallBack call_ID
LtFunc method
)
Synopsis Set one of the callbacks in the given meshing callbacks data structure.
Locationligeops
Parameters
meshcalls The meshing callbacks of interest.
call_ID An ID which specifies the callback that is being set.
method A pointer to the function we wish to utilise.
Return Value An indication of success, failure or error. This will return LI_STATUS_OK, unless a NULL meshcalls, or an unknown call_ID, is supplied.

Description The meshing callbacks data structure contains a collection of pointers to functions, that are utilised within the ligeops triangulation code. Setting a particular callback of meshcalls, and then associating meshcalls with a meshing refinement, attached to a primitive, will ensure that this callback is used whenever LiPrimitiveTriangulate is dealing with that primitive. LiMeshingCallBacksSetCall is provided so that the user can manipulate the callbacks which an LtMeshingCallBacks encapsulates.

Possible callbacks are:

The various calls of an LtMeshingCallBacks.
All names should be prefixed LI_MESH_CALLBACK_
Name Comment
EDGE_SPLIT Bisect an edge, return the splitting vertex.
INSERT_BRIDGE Bisect a polygon, by joining two vertices.
EDGE_SWAP Re-triangulate a quadrilateral, by swapping
its diagonal edge.
TRI_PROPERTIES Sort out properties of a brand new triangle.

Example
/*
 * Ensure all triangles have my properties sorted
 */
status = 
   LiMeshingCallBacksSetCall(meshcalls, 
                             LI_MESH_CALLBACK_TRI_PROPERTIES, 
                             (LtFunc)my_tri_props_func);

data = LiDataCreate();
LiDataSetGenericPtr(data, (LtGenericPtr)meshcalls);
status |= 
   LiMeshingRefinementSetCriterion(meshref,
                                   LI_MESH_CRIT_CALLBACKS,
                                   data);

LiDataSetGenericPtr(data, (LtGenericPtr)meshref);
status |= 
   LiControlSet(LI_CONTROL_MESHING_REFINEMENT, data);

if ( status )
   /* ERROR */
See Also LiPrimitiveTriangulate
LiPrimitiveHierarchicalTriangulate
LiMeshingCallBacksGetCall
LiMeshingCallBacksCallState
LiMeshingCallBacksCreate
LiMeshingCallBacksCopy
LiMeshingCallBacksDebug
LiMeshingCallBacksDestroy
LiMeshingInsertBridge
LiMeshingEdgeSplit
LiMeshingEdgeSwap
LiMeshingTriProperties

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