Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RtWing
[Basic Geometry]


Data Structures

struct  RtWingEdge
struct  RtWingFace
struct  RtWings
struct  RtWingVertex

Enumerations

enum  RtWingEdgeNeighborRelation { rtWINGEDGENULL = 0, rtWINGEDGECREASE, rtWINGEDGECONTINUOUS, rtWINGEDGEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum  RtWingEdgePartitioning { rtWINGEDGEPARTITIONFAN = 0, rtWINGEDGEPARTITIONTACK, rtWINGEDGEPARTITIONEAR, rtWINGEDGEPARTITIONFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum  RtWingDecimationApproach { rtWINGEDGEDECIMATIONFEW = 0, rtWINGEDGEDECIMATIONSMALL, rtWINGEDGEDECIMATIONFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }

Functions

RtWingFaceRtWingFaceForAllEdges (RtWingFace *wingFace, RtWingEdgeCallBack callBack, void *userData)
RtWingFaceRtWingFaceForAllFaces (RtWingFace *wingFace, RtWingFaceCallBack callBack, void *userData)
RtWingVertexRtWingVertexForAllEdges (RtWingVertex *wingVertex, RtWingEdgeCallBack callBack, void *userData)
RtWingVertexRtWingVertexForAllFaces (RtWingVertex *wingVertex, RtWingFaceCallBack callBack, void *userData)
void RtWingMatchUVsAndPromoteContinuity (RtWings *wings, RtGCondGeometryList *geometryList)
void RtWingEdgeDecimation (RtWings *wings, RtGCondGeometryList *geometryList)
RtWingEdgeRtWingReallocateWingEdges (RtWings *wings, RwInt32 extraEdges)
RtWingVertexRtWingReallocateWingVertices (RtWings *wings, RtGCondGeometryList *geometryList, RwInt32 extraVertices)
RtWingFaceRtWingReallocateWingFaces (RtWings *wings, RtGCondGeometryList *geometryList, RwInt32 extraFaces)
void RtWingConvexPartitioning (RtWings *wings, RtGCondGeometryList *geometryList, RtWingEdgePartitioning how)
void RtWingPartitionPolygon (RtWings *wings, RtWingFace *face, RtGCondGeometryList *geometryList, RtWingEdgePartitioning how, RwInt32 ctr)
void RtWingDestroy (RtWings *wings)
RwBool RtWingCreate (RtWings *wings, RtGCondGeometryList *geometryList)
void RtWingUpdateInternalRepresentation (RtWingFace *face, RtWingEdge *edge, RtWingVertex *vertex)

Detailed Description

Winged edge/half-edge toolkit for RenderWare Graphics.

RtWing Toolkit Overview

Requirements

Overview

The functions in this toolkit implement, maintain and operate on polygons using a modified wing/half-edge data structure. The wing representation allows efficient querying (typically O(1)) and modification of geometry. (Internally, the geometry takes a RtGCond form.)


Enumeration Type Documentation

enum RtWingDecimationApproach
 

RtWingDecimationApproach

An enumeration that provides a value for edge decimation. Note, this is only a tie-breaker and should not be considered a high control priority.

Enumeration values:
rtWINGEDGEDECIMATIONFEW  Polygon is partitioned to reduce triangles
rtWINGEDGEDECIMATIONSMALL  Polygon is partitioned to reduce size

enum RtWingEdgeNeighborRelation
 

RtWingEdgeNeighborRelation

An enumeration that tags an edge with neighbor information to help queries and filter operations.

Enumeration values:
rtWINGEDGENULL  The edge has no neighbor
rtWINGEDGECREASE  The edge has a neighbor with mismatching attributes, e.g. face normal or material
rtWINGEDGECONTINUOUS  The edge has a neighbor with matching attributes

enum RtWingEdgePartitioning
 

RtWingEdgePartitioning

An enumeration that provides a value for the convex partitioner.

Enumeration values:
rtWINGEDGEPARTITIONFAN  Polygon is partitioned to help tri-fanning
rtWINGEDGEPARTITIONTACK  Polygon is partitioned to help tri-stripping
rtWINGEDGEPARTITIONEAR  Polygon is partitioned successfully if concave


Function Documentation

void RtWingConvexPartitioning RtWings   wings,
RtGCondGeometryList   geometryList,
RtWingEdgePartitioning    how
 

RtWingConvexPartitioning partitions every polygon into triangles.

Note:
It is a critial assumption that the wings have enough unused edges and faces, identified by negative value fields, to store the addition geometry!
Parameters:
wings  a pointer to the occupied winged edge data structure
geometryList  a pointer to the list of geometry
how  one of rtWINGEDGEPARTITIONFAN, rtWINGEDGEPARTITIONTACK, rtWINGEDGEPARTITIONEAR, specifying whether partitioning is done by fanning, tacking, or by progressive 'ear' partitioning. This is a platform-specific preference.
See also:
RtWingPartitionPolygon

RwBool RtWingCreate RtWings   wings,
RtGCondGeometryList   geometryList
 

RtWingCreate takes a geometry list and turns it into a winged edge representation. The wings hold connectivity information as well as pointers to the original data in the geometry list.

Note:
Any operation on the wing edge representation actions the original data to be concurrently updated to reflect modification in the wing relations!
Parameters:
wings  a pointer to the unoccupied winged edge data structure
geometryList  a pointer to the list of geometry
Returns:
TRUE is it successful, FALSE otherwise

void RtWingDestroy RtWings   wings
 

RtWingDestroy destroy the winged edge representation.

Parameters:
wings  a pointer to the unoccupied winged edge data structure

void RtWingEdgeDecimation RtWings   wings,
RtGCondGeometryList   geometryList
 

RtWingEdgeDecimation performs a sophisticated edge decimation algorithm to reduced triangles into fewer, larger polygons, removing colinears and coplanars.

Note:
The geometry must have been fixed and filtered before this stage is called, as slivers and other special-case geometry can lead to improper decimation, and in worst-cases, non-terminating loops.
Parameters:
wings  a pointer to the occupied winged edge data structure
geometryList  a pointer to the list of geometry
See also:
RtWingPartitionPolygon , RtGCondRemoveCollapsedFacesAndUnusedVertices , RtGCondCullZeroAreaPolygons , RtGCondRemapVertices , RtGCondLimitUVs

RtWingFace* RtWingFaceForAllEdges RtWingFace   wingFace,
RtWingEdgeCallBack    callBack,
void *    userData
 

RtWingFaceForAllEdges iterates over all edges belonging to the given face. For each, it calls the given callback.

Parameters:
wingFace  a pointer to the face
callBack  the callback
userData  pointer to void for unknown-type userdata
Returns:
the face on success, otherwise NULL
See also:
RtWingFaceForAllFaces , RtWingVertexForAllEdges , RtWingVertexForAllFaces

RtWingFace* RtWingFaceForAllFaces RtWingFace   wingFace,
RtWingFaceCallBack    callBack,
void *    userData
 

RtWingFaceForAllFaces iterates over all faces neighboring the given face. For each, it calls the given callback.

Parameters:
wingFace  a pointer to the face
callBack  the callback
userData  pointer to void for unknown-type userdata
Returns:
the face on success, otherwise NULL
See also:
RtWingFaceForAllEdges , RtWingVertexForAllEdges , RtWingVertexForAllFaces

void RtWingMatchUVsAndPromoteContinuity RtWings   wings,
RtGCondGeometryList   geometryList
 

RtWingMatchUVsAndPromoteContinuity attempts to turn (aesthetically) creased edges into contiguous ones by UV-translation. It is called via RtWingEdgeDecimation to improve decimation.

Parameters:
wings  a pointer to the occupied winged edge data structure
geometryList  a pointer to the list of geometry
See also:
RtWingEdgeDecimation

void RtWingPartitionPolygon RtWings   wings,
RtWingFace   face,
RtGCondGeometryList   geometryList,
RtWingEdgePartitioning    how,
RwInt32    ctr
 

RtWingPartitionPolygon partitions a polygon into triangles.

Note:
It is a critial assumption that the wings have enough unused edges and faces, identified by negative value fields, to store the addition geometry!
Parameters:
wings  a pointer to the occupied winged edge data structure
face  a pointer to the face to be partitioned
geometryList  a pointer to the list of geometry
how  one of rtWINGEDGEPARTITIONFAN, rtWINGEDGEPARTITIONTACK, rtWINGEDGEPARTITIONEAR, specifying whether partitioning is done by fanning, tacking, or by progressive 'ear' partitioning. This is a platform-specific preference.
ctr  an iteration counter that can be used to alter the effects of the partitioning approaches. Default zero.
See also:
RtWingConvexPartitioning

RtWingEdge* RtWingReallocateWingEdges RtWings   wings,
RwInt32    extraEdges
 

RtWingReallocateWingEdges allocate an extra number of edges to the wings. In doing so, it may shift the base pointer, since the list is contiguous.

Parameters:
wings  a pointer to the occupied winged edge data structure
extraEdges  the number of extra edges to be allocated
Returns:
a pointer to the wingedEdges.
See also:
RtWingReallocateWingFaces , RtWingReallocateWingVertices

RtWingFace* RtWingReallocateWingFaces RtWings   wings,
RtGCondGeometryList   geometryList,
RwInt32    extraFaces
 

RtWingReallocateWingFaces allocate an extra number of faces to the wings. It also allocates extra polygons in the geometryList. In doing so, it may shift the base pointer, since the list is contiguous.

Parameters:
wings  a pointer to the occupied winged edge data structure
geometryList  a pointer to the list of geometry
extraFaces  the number of extra faces to be allocated
Returns:
a pointer to the wingedEdges
See also:
RtWingReallocateWingVertices , RtWingReallocateWingEdges

RtWingVertex* RtWingReallocateWingVertices RtWings   wings,
RtGCondGeometryList   geometryList,
RwInt32    extraVertices
 

RtWingReallocateWingVertices allocate an extra number of vertices to the wings. It also allocates extra vertices in the geometryList. In doing so, it may shift the base pointer, since the list is contiguous.

Parameters:
wings  a pointer to the occupied winged edge data structure
geometryList  a pointer to the list of geometry
extraVertices  the number of extra vertices to be allocated
Returns:
a pointer to the wingedEdges, NULL if it fails.
See also:
RtWingReallocateWingFaces , RtWingReallocateWingEdges

void RtWingUpdateInternalRepresentation RtWingFace   face,
RtWingEdge   edge,
RtWingVertex   vertex
 

RtWingUpdateInternalRepresentation recalculates the internal geometry (RtGCondPolygon) after edges have been reordered. It should be called after any modification to a face, to maintain a valid internal representation.

Parameters:
face  A pointer to the face.
edge  A pointer an edge of the face, this will be the first edge in the internal representation.
vertex  A pointer to a vertex of the face, usually face->vertex.

RtWingVertex* RtWingVertexForAllEdges RtWingVertex   wingVertex,
RtWingEdgeCallBack    callBack,
void *    userData
 

RtWingVertexForAllEdges iterates over all edges belonging to the given vertex. For each, it calls the given callback.

Parameters:
wingVertex  a pointer to the vertex
callBack  the callback
userData  pointer to void for unknown-type userdata
Returns:
the vertex on success, otherwise NULL
See also:
RtWingFaceForAllEdges , RtWingFaceForAllFaces , RtWingVertexForAllFaces

RtWingVertex* RtWingVertexForAllFaces RtWingVertex   wingVertex,
RtWingFaceCallBack    callBack,
void *    userData
 

RtWingVertexForAllFaces iterates over all faces belonging to the given vertex. For each, it calls the given callback.

Parameters:
wingVertex  a pointer to the vertex
callBack  the callback
userData  pointer to void for unknown-type userdata
Returns:
the vertex on success, otherwise NULL
See also:
RtWingFaceForAllEdges , RtWingFaceForAllFaces , RtWingVertexForAllEdges


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