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

RtWingFace RtWingFaceForAllEdges (RtWingFace *wingFace, RtWingEdgeCallBack callBack, void *userData)
RtWingFace RtWingFaceForAllFaces (RtWingFace *wingFace, RtWingFaceCallBack callBack, void *userData)
RtWingVertex RtWingVertexForAllEdges (RtWingVertex *wingVertex, RtWingEdgeCallBack callBack, void *userData)
RtWingVertex RtWingVertexForAllFaces (RtWingVertex *wingVertex, RtWingFaceCallBack callBack, void *userData)
void  RtWingEdgeDecimation (RtWings *wings, RtGCondGeometryList *geometryList)
void  RtWingConvexPartitioning (RtWings *wings, RtGCondGeometryList *geometryList, RtWingEdgePartitioning how)
void  RtWingPartitionPolygon (RtWings *wings, RtWingFace *face, RtGCondGeometryList *geometryList, RtWingEdgePartitioning how, RwInt32 ctr)
void  RtWingDestroy (RtWings *wings)
void  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
void 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
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 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
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-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:47:01 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)