LiPrimitiveReferenceReverse

FunctionLtStatus
LiPrimitiveReferenceReverse( LtPref pref
)
Synopsis Reverse the orientation of a list of primitives.
Locationligeops
Parameters
pref List of primitives which are to be reversed.
Return Value A status value.

Description LiPrimitiveReferenceReverse calls LiPrimitiveReverse for each primitive on the linked list it is passed. The results from each of these calls are merged to provide the final return value.

Example
LtPoint      positions[4] ;
LtProp       props[1] ;
LtData       values[1] ;
LtPrim       poly1, poly2, prim_array[2] ;
LtStatus     status = LI_STATUS_OK ;
LtPref       plist ;

LiPointInitialise( positions[ 0 ],
                   0.5,  0.5,  0.0 ) ;
LiPointInitialise( positions[ 1 ],
                  -0.5,  0.5,  0.0 ) ;
LiPointInitialise( positions[ 2 ],
                  -0.5, -0.5,  0.0 ) ;
LiPointInitialise( positions[ 3 ],
                   0.5, -0.5,  0.0 ) ;

props[ 0 ] = LI_PROP_VERT_WORLD ;
LiDataSetFloatPtr( values, positions ) ;

poly1 = LiPrimitiveCreatePolygon( (LtNat32)4,
                                  (LtNat32)1,
                                  props, values ) ;
prim_array[0] = poly1 ;

LiPointInitialise( positions[ 0 ],
                   0.5,  0.5,  1.0 ) ;
LiPointInitialise( positions[ 1 ],
                  -0.5,  0.5,  1.0 ) ;
LiPointInitialise( positions[ 2 ],
                  -0.5, -0.5,  1.0 ) ;
LiPointInitialise( positions[ 3 ],
                   0.5, -0.5,  1.0 ) ;
LiDataSetFloatPtr( values, positions ) ;

poly2 = LiPrimitiveCreatePolygon( (LtNat32)4,
                                  (LtNat32)1,
                                  props, values ) ;

prim_array[1] = poly2 ;

plist = LiPrimitiveListCreate( 2, prim_array );

status = LiPrimitiveReferenceReverse( plist );

See Also LiPrimitiveReverse
LiPrimitiveConsistentParts
LiPrimitiveReferenceConsistentParts
LiPrimitiveConsistentPolygon


© 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.