LiPrimitiveGetMeshingRefinement

FunctionLtMeshingRefinement
LiPrimitiveGetMeshingRefinement( LtPrim prim
)
Synopsis Find out what meshing refinement, if any, is attached to the given primitive.
Locationligeops
Parameters
prim The LADS primitive which we are querying.
Return Value The meshing refinement that is attached to the primitive, if any.

Description Allows us to get a handle on the meshing refinement that was attached to this primitive, previously, using LiPrimitiveSetMeshingRefinement.

If no such refinement was ever attached, or if a NULL refinement was attached, this function will return (LtMeshingRefinement)NULL. In the event of an error, a NULL refinement will be returned.

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

Example
/*
 * Tweak the meshing refinement 
 * attached to the floor geometry
 */
floor_ref = LiPrimitiveGetMeshingRefinement(floor);
if ( floor_ref )
{
   LiMeshingRefinementGetCriterion(floor_ref, 
                                   LI_MESH_CRIT_MAX_EDGE_LENGTH, 
                                   data);
   max_edge_len = LiDataGetFloat(data);
   max_edge_len *= (LtFloat)1.1;
   LiDataSetFloat(data, max_edge_len);
   LiMeshingRefinementSetCriterion(floor_ref, 
                                   LI_MESH_CRIT_MAX_EDGE_LENGTH, 
                                   data);
}
See Also LiPrimitiveTriangulate
LiPrimitiveHierarchicalTriangulate
LiMeshingRefinementUnSetCriterion
LiMeshingRefinementSetCriterion
LiMeshingRefinementCriterionState
LiMeshingRefinementGetCriterion
LiPrimitiveSetMeshingRefinement
LiMeshingRefinementCreate
LiMeshingRefinementCopy
LiMeshingRefinementDebug
LiMeshingRefinementDestroy

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