Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RtGCond
[Basic Geometry]


Data Structures

struct  RtGCondGeometryList
struct  RtGCondParameters
struct  RtGCondPolygon
struct  RtGCondUserdataCallBacks
struct  RtGCondVertex

Typedefs

typedef RwBool(* RtGCondDestroyVertexUserdataCallBack )(void **pUserdata)
typedef RwBool(* RtGCondCloneVertexUserdataCallBack )(void **pUserdataDst, void **pUserdataSrc)
typedef RwBool(* RtGCondInterpVertexUserdataCallBack )(void **pUserdataDst, void **pUserdata1, void **pUserdata2, RwReal delta)
typedef RwBool(* RtGCondDestroyPolygonUserdataCallBack )(void **pUserdata)
typedef RwBool(* RtGCondSplitPolygonUserdataCallBack )(void **pUserdataDst, void **pUserdataSrc)

Enumerations

enum  RtGCondFlag { rtGCONDNORMALS = 0x01, rtGCONDTEXTURES = 0x02, rtGCONDPRELIT = 0x04, rtGCONDFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }

Functions

RwBool RtGCondNormalize (RwV3d *vec)
RwReal RtGCondLength (RwV3d *vec)
RwBool RtGCondVectorsEqual (RwV3d *v1, RwV3d *v2, RwReal tol)
RwBool RtGCondColinearVertices (RwV3d *v1, RwV3d *v2, RwV3d *v3, RwBool strictOrder, RwReal tol)
void RtGCondSnapPipelineNode (RtGCondGeometryList *geometryList, RwReal weldThreshold)
void RtGCondSnapUVsPipelineNode (RtGCondGeometryList *geometryList, RwReal weldThreshold)
RwReal RtGCondAreaOfPolygon (RtGCondGeometryList *geometryList, RtGCondPolygon *polygon)
void RtGCondCullZeroAreaPolygonsPipelineNode (RtGCondGeometryList *geometryList, RwReal areaThreshold)
void RtGCondLimitUVsPipelineNode (RtGCondGeometryList *geometryList, RwReal limitUVMin, RwReal limitUVMax, RwBool texelLimits)
void RtGCondRemapVerticesPipelineNode (RtGCondGeometryList *geometryList)
void RtGCondSortVerticesOnMaterialPipelineNode (RtGCondGeometryList *geometryList)
void RtGCondUnshareVerticesOnMaterialBoundariesPipelineNode (RtGCondGeometryList *geometryList)
RwBool RtGCondUnshareVerticesPipelineNode (RtGCondGeometryList *geometryList)
RwInt32RtGCondWeldVerticesPipelineNode (RtGCondGeometryList *geometryList, RwReal weldThreshold, RwReal normalWeldThreshold, RwReal uvThreshold, RwReal preLitThreshold, RwBool ignoreTextures, RwBool remap, RwBool implicit, RwBool averageAttributes)
void RtGCondBuildNormalsPipelineNode (RtGCondGeometryList *geometryList)
void RtGCondRemoveIdenticalPolygonsPipelineNode (RtGCondGeometryList *geometryList)
void RtGCondRemoveSliversPipelineNode (RtGCondGeometryList *geometryList)
RwBool RtGCondFixAndFilterGeometryPipeline (RtGCondGeometryList *geometryList)
void RtGCondGroundUVs (RtGCondGeometryList *geometryList)
RwBool RtGCondDecimateAndWeldGeometryPipeline (RtGCondGeometryList *geometryList)
void RtGCondSetGeometryConditioningPipeline (RtGCondGeometryConditioningPipeline pipeline)
RtGCondGeometryConditioningPipeline RtGCondGetGeometryConditioningPipeline (void)
void RtGCondApplyGeometryConditioningPipeline (RtGCondGeometryList *geometryList)
void RtGCondFreeVertices (RtGCondGeometryList *geometryList)
RwBool RtGCondAllocateVertices (RtGCondGeometryList *geometryList, RwInt32 num)
void RtGCondFreePolygons (RtGCondGeometryList *geometryList)
RwBool RtGCondAllocatePolygons (RtGCondGeometryList *geometryList, RwInt32 num)
void RtGCondFreeIndices (RtGCondPolygon *polygon)
RwBool RtGCondAllocateIndices (RtGCondPolygon *polygon, RwInt32 num)
RwBool RtGCondReallocateIndices (RtGCondPolygon *polygon, RwInt32 num)
RwBool RtGCondReallocateVertices (RtGCondGeometryList *geometryList, RwInt32 num)
RwBool RtGCondReallocatePolygons (RtGCondGeometryList *geometryList, RwInt32 num)
void RtGCondParametersSet (RtGCondParameters *gcParams)
RtGCondParametersRtGCondParametersGet (void)
void RtGCondParametersInit (RtGCondParameters *gcParams)
void RtGCondSetUserdataCallBacks (RtGCondCloneVertexUserdataCallBack cloneVertexUserdataCB, RtGCondInterpVertexUserdataCallBack interpVertexUserdataCB, RtGCondSplitPolygonUserdataCallBack splitPolygonUserdataCB, RtGCondDestroyVertexUserdataCallBack destroyVertexUserdataCB, RtGCondDestroyPolygonUserdataCallBack destroyPolygonUserdataCB)
void RtGCondMaterialGetUVLimits (RpMaterial *mat, RwInt32 uvSet, RwReal *uMin, RwReal *uMax, RwReal *vMin, RwReal *vMax)
void RtGCondMaterialSetUVLimits (RpMaterial *mat, RwInt32 uvSet, RwReal uMin, RwReal uMax, RwReal vMin, RwReal vMax)
RwBool RtGCondInitialize (void)

Detailed Description

Geometry Conditioning toolkit for RenderWare Graphics.

RtGCond Toolkit Overview

Requirements
The functions in this toolkit allow geometric (vertex and polygon) and attribute (uvs, prelights, etc.) operations in a simple and independent manner. Some of the functions make heavy use of the winged/half-edge edge data structure (RtWing Toolkit Overview) for the sake of efficiency.


Typedef Documentation

typedef RwBool(* RtGCondCloneVertexUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc)
 

RtGCondCloneVertexUserdataCallBack Callback for vertex cloning, for example, on unsharing

Parameters:
pUserdataDst  A handle to the userdata for the destination
pUserdataSrc  A handle to the userdata for the source
Returns:
TRUE on success, FALSE otherwise
See also:
RtGCondSetUserdataCallBacks

typedef RwBool(* RtGCondDestroyPolygonUserdataCallBack)(void **pUserdata)
 

RtGCondDestroyPolygonUserdataCallBack Callback for polygon destruction, for example, zero areas

Parameters:
pUserdata  A handle to the userdata
Returns:
TRUE on success, FALSE otherwise
See also:
RtGCondSetUserdataCallBacks

typedef RwBool(* RtGCondDestroyVertexUserdataCallBack)(void **pUserdata)
 

RtGCondDestroyVertexUserdataCallBack is the type for the callback function for vertex destruction, for example, those welded

Parameters:
pUserdata  A handle to the userdata
Returns:
TRUE on success, FALSE otherwise
See also:
RtGCondSetUserdataCallBacks

typedef RwBool(* RtGCondInterpVertexUserdataCallBack)(void **pUserdataDst, void **pUserdata1, void **pUserdata2, RwReal delta)
 

RtGCondInterpVertexUserdataCallBack Callback for vertex interpolation, for example, sliver removal

Parameters:
pUserdataDst  A handle to the userdata for the destination
pUserdata1  A handle to the first source
pUserdata2  A handle to the second source
delta  The delta between the two sources
Returns:
TRUE on success, FALSE otherwise
See also:
RtGCondSetUserdataCallBacks

typedef RwBool(* RtGCondSplitPolygonUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc)
 

RtGCondSplitPolygonUserdataCallBack Callback for polygon division, for example, convex partitioning

Parameters:
pUserdataDst  A handle to the userdata for the destination
pUserdataSrc  A handle to the userdata for the source
Returns:
TRUE on success, FALSE otherwise
See also:
RtGCondSetUserdataCallBacks


Enumeration Type Documentation

enum RtGCondFlag
 

RtGCondFlag

An enumeration of geometry attribute flags.

Enumeration values:
rtGCONDNORMALS  has normals
rtGCONDTEXTURES  has texture coordinates
rtGCONDPRELIT  has luminance values


Function Documentation

RwBool RtGCondAllocateIndices RtGCondPolygon   polygon,
RwInt32    num
 

RtGCondAllocateIndices allocates space for a number of indices of a polygon.

Parameters:
polygon  a pointer to the polygon
num  the number of indices to allocate
Returns:
TRUE if successful, FALSE otherwise
See also:
RtGCondReallocateIndices , RtGCondFreeIndices

RwBool RtGCondAllocatePolygons RtGCondGeometryList   geometryList,
RwInt32    num
 

RtGCondAllocatePolygons allocates space for a number of polygons

Parameters:
geometryList  a pointer to the list of geometry
num  the number of polygons to allocate
Returns:
TRUE if successful, FALSE otherwise
See also:
RtGCondAllocateVertices , RtGCondFreePolygons

RwBool RtGCondAllocateVertices RtGCondGeometryList   geometryList,
RwInt32    num
 

RtGCondAllocateVertices allocates space for a number of vertices

Parameters:
geometryList  a pointer to the list of geometry
num  the number of vertices to allocate
Returns:
TRUE if successful, FALSE otherwise
See also:
RtGCondAllocatePolygons , RtGCondFreeVertices

void RtGCondApplyGeometryConditioningPipeline RtGCondGeometryList   geometryList
 

RtGCondApplyGeometryConditioningPipeline actions the geometry conditioning pipeline set by RtGCondSetGeometryConditioningPipeline.

Parameters:
geometryList  a pointer to the list of geometry
See also:
RtGCondSetGeometryConditioningPipeline , RtGCondGetGeometryConditioningPipeline , RtGCondFixAndFilterGeometryPipeline , RtGCondDecimateAndWeldGeometryPipeline

RwReal RtGCondAreaOfPolygon RtGCondGeometryList   geometryList,
RtGCondPolygon   polygon
 

RtGCondAreaOfPolygon finds the area of a polygon

Parameters:
geometryList  a pointer to the list of geometry containing the polygons
polygon  a pointer to the polygon
Returns:
area of the polygon
See also:
RtGCondCullZeroAreaPolygonsPipelineNode

void RtGCondBuildNormalsPipelineNode RtGCondGeometryList   geometryList
 

RtGCondBuildNormalsPipelineNode rebuilds the normals for the given geometryList. A resulting vertex normal will be an average of all polygon normals, for polygons that reference that vertex. Each polygon normal will be used proportional to the angle of that polygon marked by that vertex.

Parameters:
geometryList  A pointer to the list of geometry

RwBool RtGCondColinearVertices RwV3d   v1,
RwV3d   v2,
RwV3d   v3,
RwBool    strictOrder,
RwReal    tol
 

RtGCondColinearVertices calculates if the given three vertices are colinear.

Parameters:
v1  pointer to first vertex
v2  pointer to second vertex
v3  pointer to third vertex
strictOrder  TRUE if a---b---c order assumed, FALSE otherwise (e.g. a---c---b)
tol  positional tolerance
Returns:
Returns TRUE if colinear, FALSE otherwise.
See also:
RtGCondColinearVerticesTol

void RtGCondCullZeroAreaPolygonsPipelineNode RtGCondGeometryList   geometryList,
RwReal    areaThreshold
 

RtGCondCullZeroAreaPolygonsPipelineNode removes all polygons whose area is less than the tolerance (then it remaps).

Note:
This should be treated with respect, since applying the filter to a scene stand-alone could lead to holes appearing in meshes where slivers once stood and if too high, polygons around the tops of fine spheres and cones, for example, can go missing. In the former case weld vertices first, in the latter, make sure the threshold is significantly small, preferably zero.
Parameters:
geometryList  a pointer to the list of geometry containing the polygons
areaThreshold  the area below which polygons are culled
See also:
RtGCondWeldVerticesPipelineNode , RtGCondRemapVerticesPipelineNode , RtGCondAreaOfPolygon , RtGCondRemoveSliversPipelineNode

RwBool RtGCondDecimateAndWeldGeometryPipeline RtGCondGeometryList   geometryList
 

RtGCondDecimateAndWeldGeometryPipeline a provided, custom pipeline used by RenderWare Graphics' RtWorldImport under geometry conditioning. Comprises a number of pipelined tools (welders). Prepares geometry for platform specific conditioning.

Parameters:
geometryList  a pointer to the list of geometry
Returns:
TRUE if successful, FALSE otherwise
See also:
RtWingCreate , RtWingEdgeDecimation

RwBool RtGCondFixAndFilterGeometryPipeline RtGCondGeometryList   geometryList
 

RtGCondFixAndFilterGeometryPipeline a provided, custom pipeline used by RenderWare Graphics' RtWorldImport under geometry conditioning. Comprises a number of pipelined tools (filters and fixers). Prepares geometry for polygon welding and platform specific conditioning.

Parameters:
geometryList  a pointer to the list of geometry
Returns:
TRUE if successful, FALSE otherwise
See also:
RtGCondCullZeroAreaPolygonsPipelineNode , RtGCondUnshareVerticesOnMaterialBoundariesPipelineNode , RtGCondLimitUVsPipelineNode , RtGCondWeldVerticesPipelineNode

void RtGCondFreeIndices RtGCondPolygon   polygon
 

RtGCondFreeIndices destroys the indices of the given polygon.

Parameters:
polygon  a pointer to the polygon
See also:
RtGCondAllocateIndices

void RtGCondFreePolygons RtGCondGeometryList   geometryList
 

RtGCondFreePolygons destroys the polygons in the geometry list.

Parameters:
geometryList  a pointer to the list of geometry
See also:
RtGCondAllocatePolygons

void RtGCondFreeVertices RtGCondGeometryList   geometryList
 

RtGCondFreeVertices destroys the vertices in the geometry list.

Parameters:
geometryList  a pointer to the list of geometry
See also:
RtGCondAllocateVertices

RtGCondGeometryConditioningPipeline RtGCondGetGeometryConditioningPipeline void   
 

RtGCondGetGeometryConditioningPipeline gets the geometry conditioning pipeline that RtGCondApplyGeometryConditioningPipeline will call.

Returns:
a pointer to the RtGCondGeometryConditioningPipeline
See also:
RtGCondSetGeometryConditioningPipeline , RtGCondApplyGeometryConditioningPipeline , RtGCondFixAndFilterGeometryPipeline , RtGCondDecimateAndWeldGeometryPipeline

void RtGCondGroundUVs RtGCondGeometryList   geometryList
 

RtGCondGroundUVs shifts uvs values so that the smallest value in u and v is in the range [0..1)

Parameters:
geometryList  a pointer to the list of geometry
See also:
RtGCondLimitUVsPipelineNode

RwBool RtGCondInitialize void   
 

RtGCondInitialize is used to initialize the geometry conditioning toolkit with the RenderWare Graphics system. The toolkit must be initialized after initializing the system with RwEngineInit and calling RpWorldPluginAttach, and before opening the system with RwEngineOpen.

Returns:
RwBool, TRUE if successful, FALSE if an error occurs.
See also:
RwEngineInit , RwEngineOpen

RwReal RtGCondLength RwV3d   vec
 

RtGCondLength returns the length of given vector to high precision (using the sqrt function), succeeds even if the vector is zero length.

Parameters:
vec  A pointer to a vector
Returns:
The length of the vector

void RtGCondLimitUVsPipelineNode RtGCondGeometryList   geometryList,
RwReal    limitUVMin,
RwReal    limitUVMax,
RwBool    texelLimits
 

RtGCondLimitUVsPipelineNode shifts uvs values into the interval between the given minimum and maximum values. It tries to preserve continuity if possible. There are two ways UV limiting can be done. The first is using the standard UV limits which are texture independent, and the second is to specify the limits in texels, in which case UV limits are calculated by: limitUMin = minUvTexelLimit / textureWidth etc. Depending on the texelLimits parameter we'll use the limitUVMin and limitUVMax limits passed by the parameters or use RtGCondMaterialGetUVLimits function to get already pre-calculated per material per UV set texel based UV limits.

Note:
If the uv range of any polygon is greater than the interval, the filter will obviously fail.
Parameters:
geometryList  a pointer to the list of geometry
limitUVMin  minimum allowable uv value
limitUVMax  maximum allowable uv value
texelLimits  maximum allowable uv value
See also:
RtGCondMaterialSetUVLimits , RtGCondLimitUVsPipelineNode , RtGCondFixAndFilterGeometryPipeline

void RtGCondMaterialGetUVLimits RpMaterial   mat,
RwInt32    uvSet,
RwReal   uMin,
RwReal   uMax,
RwReal   vMin,
RwReal   vMax
 

RtGCondMaterialGetUVLimits is used to get already pre-calculated per material per UV set texel based UV limits. There are two ways UV limiting can be done. The first is using the standard UV limits which are texture independent, and the second is to specify the limits in texels, in which case UV limits are calculated by: limitUMin = minUvTexelLimit / textureWidth etc. Depending on the texelLimits parameter RtGCondLimitUVsPipelineNode function will use the limits passed to it by the parameters or use this function to get the limits stored in the materials.

Parameters:
mat  from which to get the texel based UV limits
uvSet  for which to query the values
uMin  the pointer to the value to receive the min limit in U direction
uMax  the pointer to the value to receive the max limit in U direction
vMin  the pointer to the value to receive the min limit in V direction
vMax  the pointer to the value to receive the max limit in V direction
See also:
RtGCondMaterialSetUVLimits, RtGCondLimitUVsPipelineNode

void RtGCondMaterialSetUVLimits RpMaterial   mat,
RwInt32    uvSet,
RwReal    uMin,
RwReal    uMax,
RwReal    vMin,
RwReal    vMax
 

RtGCondMaterialSetUVLimits is used to set already pre-calculated per material per UV set texel based UV limits. There are two ways UV limiting can be done. The first is using the standard UV limits which are texture independent, and the second is to specify the limits in texels, in which case UV limits are calculated by: limitUMin = minUvTexelLimit / textureWidth etc. Depending on the texelLimits parameter RtGCondLimitUVsPipelineNode function will use the limits passed to it by the parameters or get the limits stored in the materials.

Parameters:
mat  to which to store the texel based UV limits
uvSet  for which to store the values
uMin  value of the min limit in U direction to store
uMax  value of the max limit in U direction to store
vMin  value of the min limit in V direction to store
vMax  value of the max limit in V direction to store
See also:
RtGCondMaterialGetUVLimits, RtGCondLimitUVsPipelineNode

RwBool RtGCondNormalize RwV3d   vec
 

RtGCondNormalize normalizes a given vector to high precision (using the sqrt function). It also has useful asserts.

Parameters:
vec  A pointer to a vector requiring normalizing
Returns:
If the vector is close to being zero-length vector it doesn't do anything and returns FALSE, TRUE otherwise.
See also:
RtGCondColinearVertices

RtGCondParameters* RtGCondParametersGet void   
 

RtGCondParametersGet is used to get a list of geometry conditioning parameters used by the provided geometry conditioning pipelines.

Returns:
a pointer to RtGCondParameters
See also:
RtGCondParametersSet , RtGCondParametersInit , RtGCondFixAndFilterGeometryPipeline

void RtGCondParametersInit RtGCondParameters   gcParams
 

RtGCondParametersInit is used to initialize a list of geometry conditioning parameters used by the provided geometry conditioning pipelines.

Parameters:
gcParams  a pointer to RtGCondParameters
See also:
RtGCondParametersSet , RtGCondParametersGet , RtGCondFixAndFilterGeometryPipeline

void RtGCondParametersSet RtGCondParameters   gcParams
 

RtGCondParametersSet is used to set up a list of geometry conditioning parameters used by the provided geometry conditioning pipelines.

Parameters:
gcParams  a pointer to RtGCondParameters
See also:
RtGCondParametersGet , RtGCondParametersInit , RtGCondFixAndFilterGeometryPipeline

RwBool RtGCondReallocateIndices RtGCondPolygon   polygon,
RwInt32    num
 

RtGCondReallocateIndices reallocates space for a number of indices of a polygon.

Parameters:
polygon  a pointer to the polygon
num  the number of indices to allocate
Returns:
TRUE if successful, FALSE otherwise
See also:
RtGCondAllocateIndices

RwBool RtGCondReallocatePolygons RtGCondGeometryList   geometryList,
RwInt32    num
 

RtGCondReallocatePolygons reallocates space for a number of polygons.

Parameters:
geometryList  a pointer to the list of geometry
num  the number of polygons to reallocate
Returns:
TRUE if successful, FALSE otherwise
See also:
RtGCondReallocateIndices , RtGCondReallocateVertices , RtGCondAllocatePolygons

RwBool RtGCondReallocateVertices RtGCondGeometryList   geometryList,
RwInt32    num
 

RtGCondReallocateVertices reallocates space for a number of vertices.

Parameters:
geometryList  a pointer to the list of geometry
num  the number of vertices to reallocate
Returns:
TRUE if successful, FALSE otherwise
See also:
RtGCondReallocateIndices , RtGCondReallocatePolygons , RtGCondAllocateVertices

void RtGCondRemapVerticesPipelineNode RtGCondGeometryList   geometryList
 

RtGCondRemapVerticesPipelineNode cross-references polygon indices with vertices, if there are any vertices which are not references they are removed, and the entire lists is shifted before the polygon indices are remapped.

Parameters:
geometryList  a pointer to the list of geometry
See also:
RtGCondCullZeroAreaPolygonsPipelineNode , RtGCondRemoveSliversPipelineNode

void RtGCondRemoveIdenticalPolygonsPipelineNode RtGCondGeometryList   geometryList
 

RtGCondRemoveIdenticalPolygonsPipelineNode removes all but one polygon that occupies the exactly same space and has the same material as another - this leads to bad welding and z-fighting, and ideally should not be in the geometry in the first place.

Parameters:
geometryList  a pointer to the list of geometry
See also:
RtGCondCullZeroAreaPolygonsPipelineNode , RtGCondUnshareVerticesOnMaterialBoundariesPipelineNode , RtGCondLimitUVsPipelineNode , RtGCondWeldVerticesPipelineNode

void RtGCondRemoveSliversPipelineNode RtGCondGeometryList   geometryList
 

RtGCondRemoveSliversPipelineNode removes slivers and faces with fewer than three vertices. Subsequently, it remaps removing any unused vertices.

Parameters:
geometryList  a pointer to the list of geometry
See also:
RtGCondCullZeroAreaPolygonsPipelineNode , RtGCondUnshareVerticesOnMaterialBoundariesPipelineNode , RtGCondLimitUVsPipelineNode , RtGCondWeldVerticesPipelineNode

void RtGCondSetGeometryConditioningPipeline RtGCondGeometryConditioningPipeline    pipeline
 

RtGCondSetGeometryConditioningPipeline sets the geometry conditioning pipeline that RtGCondApplyGeometryConditioningPipeline will call.

Parameters:
pipeline  a pointer to a predefined RtGCondGeometryConditioningPipeline
See also:
RtGCondGetGeometryConditioningPipeline , RtGCondApplyGeometryConditioningPipeline , RtGCondFixAndFilterGeometryPipeline , RtGCondDecimateAndWeldGeometryPipeline

void RtGCondSetUserdataCallBacks RtGCondCloneVertexUserdataCallBack    cloneVertexUserdataCB,
RtGCondInterpVertexUserdataCallBack    interpVertexUserdataCB,
RtGCondSplitPolygonUserdataCallBack    splitPolygonUserdataCB,
RtGCondDestroyVertexUserdataCallBack    destroyVertexUserdataCB,
RtGCondDestroyPolygonUserdataCallBack    destroyPolygonUserdataCB
 

RtGCondSetUserdataCallBacks sets user callbacks which are called when cloning, interpolation, splitting and destroying operation are processed.

Parameters:
cloneVertexUserdataCB  the callback for cloning
interpVertexUserdataCB  the callback for interpolating
splitPolygonUserdataCB  the callback for splitting
destroyVertexUserdataCB  the callback for destroying vertices
destroyPolygonUserdataCB  the callback for destroying polygons

void RtGCondSnapPipelineNode RtGCondGeometryList   geometryList,
RwReal    weldThreshold
 

RtGCondSnapPipelineNode snaps the given vertices to a grid.

Note:
This should only be used if the side effects are appreciated - such as a voxelized geometry appearance if the tolerance too high.
RtGCondWeldVerticesPipelineNode should be used for welding near-by neighbors
Parameters:
geometryList  a pointer to the list of geometry to be snapped
weldThreshold  the effective grid resolution
See also:
RtGCondWeldVerticesPipelineNode , RtGCondSnapUVsPipelineNode

void RtGCondSnapUVsPipelineNode RtGCondGeometryList   geometryList,
RwReal    weldThreshold
 

RtGCondSnapUVsPipelineNode snaps the given vertex uv's to a grid. RtGCondWeldVerticesPipelineNode should be used for welding near-by vertices with similar uvs.

Parameters:
geometryList  a pointer to the list of geometry to be snapped
weldThreshold  the effective grid resolution
See also:
RtGCondWeldVerticesPipelineNode , RtGCondSnapPipelineNode

void RtGCondSortVerticesOnMaterialPipelineNode RtGCondGeometryList   geometryList
 

RtGCondSortVerticesOnMaterialPipelineNode makes sure the vertex list is ordered by material.

Parameters:
geometryList  a pointer to the list of geometry

void RtGCondUnshareVerticesOnMaterialBoundariesPipelineNode RtGCondGeometryList   geometryList
 

RtGCondUnshareVerticesOnMaterialBoundariesPipelineNode ensures that vertices are not shared between two polygons which have different materials

Parameters:
geometryList  a pointer to the list of geometry
See also:
RtGCondUnshareVerticesPipelineNode

RwBool RtGCondUnshareVerticesPipelineNode RtGCondGeometryList   geometryList
 

RtGCondUnshareVerticesPipelineNode ensures that no vertices are not shared between multiple polygons

Parameters:
geometryList  a pointer to the list of geometry
Returns:
TRUE if successful, FALSE otherwise
See also:
RtGCondUnshareVerticesOnMaterialBoundariesPipelineNode

RwBool RtGCondVectorsEqual RwV3d   v1,
RwV3d   v2,
RwReal    tol
 

RtGCondVectorsEqual compares two vectors to see if they match orthogonally within the tolerance.

Parameters:
v1  pointer to first vector
v2  pointer to second vector
tol  tolerance
Returns:
Returns TRUE if matching, FALSE otherwise.

RwInt32* RtGCondWeldVerticesPipelineNode RtGCondGeometryList   geometryList,
RwReal    weldThreshold,
RwReal    normalWeldThreshold,
RwReal    uvThreshold,
RwReal    preLitThreshold,
RwBool    ignoreMaterials,
RwBool    remap,
RwBool    implicit,
RwBool    averageAttributes
 

RtGCondWeldVerticesPipelineNode clusters all nearby vertices that share near identical normal, uv and preLights, and welds them into a single vertex - then remaps the polygons.

Note:
This function does exactly what it says - this is NOT a mesh decimator and should not be used as one! The weldThreshold must be smaller than the smallest triangle (in its smallest dimension), otherwise the algorithm cannot be guaranteed to be correct, and it might lead to holes, tucks and other topological oddities that will affect such things as PVS not to mention the appearance of the objects in the scene!
Parameters:
geometryList  a pointer to the list of geometry
weldThreshold  the positional threshold in 3-space
normalWeldThreshold  the normal threshold in degrees
uvThreshold  the UV threshold in uv-units
preLitThreshold  the prelight threshold in range 0..1, r, g b and a are all checked against this single value
ignoreMaterials  FALSE by default. Set it to true for non-aesthetic welding, such as collision worlds.
remap  TRUE if remapping required, FALSE otherwise. TRUE by default.
implicit  TRUE if the function should only calculate remap information only without any action, FALSE otherwise. FALSE by default.
averageAttributes  TRUE if the attributes (normals, uvs, prelights) are to be averaged.
Note:
postitions are averaged by default if implicit parameter is FALSE.
Returns:
remap information, (an index to index map). This is of use if implict is TRUE.
See also:
RtGCondRemapVerticesPipelineNode


Criterion Software © 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:47:11 2004. Send Feedback