29 #include "../../../idlib/precompiled.h"
48 int i,
j, k, faceNum, edgeNum, areaFirstFace, faceFirstEdge;
68 newEdges.
SetNum( 1,
false );
71 newFaces.
SetNum( 1,
false );
74 for ( i = 0; i <
areas.Num(); i++ ) {
77 areaFirstFace = newFaceIndex.
Num();
78 for ( j = 0; j < area->
numFaces; j++ ) {
80 face = &
faces[ abs(faceNum) ];
83 if ( !faceRemap[ abs(faceNum) ] ) {
84 faceRemap[ abs(faceNum) ] = newFaces.
Num();
90 newFaces[ newFaces.
Num()-1 ].firstEdge = 0;
91 newFaces[ newFaces.
Num()-1 ].numEdges = 0;
96 faceFirstEdge = newEdgeIndex.
Num();
97 for ( k = 0; k < face->
numEdges; k++ ) {
99 edge = &
edges[ abs(edgeNum) ];
101 if ( !edgeRemap[ abs(edgeNum) ] ) {
103 edgeRemap[ abs(edgeNum) ] = -newEdges.
Num();
106 edgeRemap[ abs(edgeNum) ] = newEdges.
Num();
110 if ( vertexRemap[ edge->
vertexNum[0] ] == -1 ) {
114 if ( vertexRemap[ edge->
vertexNum[1] ] == -1 ) {
120 newEdges[ newEdges.
Num()-1 ].vertexNum[0] = vertexRemap[ edge->
vertexNum[0] ];
121 newEdges[ newEdges.
Num()-1 ].vertexNum[1] = vertexRemap[ edge->
vertexNum[1] ];
124 newEdgeIndex.
Append( edgeRemap[ abs(edgeNum) ] );
127 newFaces[ newFaces.
Num()-1 ].firstEdge = faceFirstEdge;
128 newFaces[ newFaces.
Num()-1 ].numEdges = newEdgeIndex.
Num() - faceFirstEdge;
133 newFaceIndex.
Append( -faceRemap[ abs(faceNum) ] );
135 newFaceIndex.
Append( faceRemap[ abs(faceNum) ] );
140 area->
numFaces = newFaceIndex.
Num() - areaFirstFace;
143 for ( reach = area->
reach; reach; reach = reach->
next ) {
void SetNum(int newnum, bool resize=true)
void AssureSize(int newSize)
idList< aasIndex_t > faceIndex
idList< aasIndex_t > edgeIndex
idList< aasFace_t > faces
int Append(const type &obj)
idList< aasEdge_t > edges
idList< aasVertex_t > vertices
idList< aasArea_t > areas