| |||||||
Function | LtStatus
| ||||||
Synopsis |
Reverse the orientation of a primitive.
| ||||||
Location | ligeops | ||||||
Parameters |
| ||||||
Return Value | A status value. | ||||||
Description | The orientation of all the polygons in a polygon mesh primitive (or the polygon itself for a polygon primitive) can be reversed with a single call to LiPrimitiveReverse. All relevant properties (for example, vertex normals and polygon plane equations) are reversed, leaving a primitive which is oriented exactly opposite to its original direction. Note that only primitives of type LI_PRIM_TYPE_MESH or LI_PRIM_TYPE_POLY are acceptable as input to this function. Any other primitive types will result in an error status being returned. | ||||||
Example |
LtPoint positions[4] ; LtProp props[1] ; LtData values[1] ; LtPrim poly ; LtStatus status = LI_STATUS_OK ; 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 ) ; poly = LiPrimitiveCreatePolygon( (LtNat32)4, (LtNat32)1, props, values ) ; status = LiPrimitiveReverse( poly ); | ||||||
See Also |
LiPrimitiveReferenceReverse 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. |