LiPrimitiveSetMeshingRefinement

FunctionLtStatus
LiPrimitiveSetMeshingRefinement( LtPrim prim
LtMeshingRefinement meshref
)
Synopsis Attach the given refinement to the given LADS primitive.
Locationligeops
Parameters
prim The LADS primitive to which we are going to attach the refinement.
meshref The meshing refinement we are going to attach.
Return Value An indication of success, failure or error.

Description Allows us to associate a set of control values, encapsulated by the meshing refinement, with a particular primitive.

Consider the case where a user wishes to triangulate a number of primitives, so that well-shaped triangles result. They could set LI_CONTROL_MESHING_REFINEMENT to a value which ensured that this was the case. Suppose additionally, that they have one primitive which is already heavily facetted, and they have no interest in seeing it meshed any more heavily. They could create a refinement for this primitive which ensured that it only suffers a minimal triangulation, and attach the refinement using LiPrimitiveSetMeshingRefinement . A subsequent call to LiExecute(LI_EXECUTE_TRIANGULATE) would then treat the heavily facetted primitive with care, whilst triangulating all other primitives into well-shaped triangles.

NULL primitives are not allowed, NULL refinements are. Attaching a NULL refinement indicates that this primitive should pick up all the global values, during triangulation.

An error will result if a primitive is passed in which is of a type not acceptable to LiPrimitiveTriangulate. For example, an LI_PRIM_TYPE_SURFACE primitive would not be acceptable.

This routine utilises the LI_PROP_PRIM_MESHING_REFINEMENT primitive property, whose type is an LtMeshingRefinement .

Example
/*
 * Attach a meshing refinement to LADS geometry
 */
status = 
   LiPrimitiveSetMeshingRefinement(prim, 
                                   my_meshref);
   if ( status )
      /* ERROR */
See Also LiPrimitiveTriangulate
LiPrimitiveHierarchicalTriangulate
LiMeshingRefinementUnSetCriterion
LiMeshingRefinementSetCriterion
LiMeshingRefinementCriterionState
LiMeshingRefinementGetCriterion
LiPrimitiveGetMeshingRefinement
LiMeshingRefinementCreate
LiMeshingRefinementCopy
LiMeshingRefinementDebug
LiMeshingRefinementDestroy

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