|
||
BOOLEAN prim_triangles_build_cache(OBJECT_NODE *obj, USINT32 cache_flags);
OBJECT_NODE *obj; // A pointer to an OBJECT_NODE USINT32 cache_flags; // An unsigned integer value
|
|
|||
Synopsis |
#include "silver.h"
The prim_triangles_build_cache function builds a triangulation-cache for an object. This can substantially increase the speed of triangulation when many primitives in the same object are being faceted together.
|
|
||
Parameters |
obj is a pointer to the OBJECT_NODE to which the cache is applicable
cache_flags is reserved for future use and should be set to zero
|
|
||
Return Value |
prim_triangles_build_cache returns TRUE if the cache was built successfully, and FALSE otherwise
|
|
||
Remarks |
You must call prim_triangles_free_cache when you are finished triangulating primitives in the object. Only one triangulation cache may be active at a time, and calling build again before calling prim_triangles_free_cache will destroy the previous cache. Use of the cache is optional.
|
|
||
See Also |
prim_triangles_collect, prim_triangle_get, prim_triangles_count, prim_triangles_free_cache
|
|
||
Example |
The following code shows how to use a triangulation cache to triangulate every primitive of an object. The 'obj' variable is assumed to have been set to an object entity:
|
|