Changeset 4853 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- Jul 13, 2005, 10:26:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r4852 r4853 38 38 { 39 39 this->pModelInfo = pModelInfo; 40 this->pDimension = this->getDimension(this->pModelInfo);41 40 42 41 /* create an array of triangle references */ … … 98 97 { 99 98 PRINTF(0)("got command to separate node\n"); 99 100 this->pDimension = this->getDimension(this->pModelInfo); 101 100 102 tList<sTriangleExt*>* listA = new tList<sTriangleExt*>(); //!< triangle list of nodeA 101 103 tList<sTriangleExt*>* listB = new tList<sTriangleExt*>(); //!< triangle list of nodeB … … 111 113 { 112 114 pVert = &this->pVertices[this->pTriangles[i]->indexToVertices[j]]; 113 if( 114 printf("nA");115 if( pVert[0] > rectCenter->x + this->offset && pVert[2] > rectCenter->z + this->offset) 116 listA->add(&this->pTriangles[i]); 115 117 if( pVert[0] > rectCenter->x + this->offset && pVert[2]< rectCenter->z + this->offset) 116 printf("nB");118 listB->add(&this->pTriangles[i]); 117 119 if( pVert[0] < rectCenter->x + this->offset && pVert[2] > rectCenter->z + this->offset) 118 printf("nC");120 listC->add(&this->pTriangles[i]); 119 121 if( pVert[0] < rectCenter->x + this->offset && pVert[2] < rectCenter->z + this->offset) 120 printf("nD");122 listD->add(&this->pTriangles[i]); 121 123 } 122 124 } 123 PRINTF(0)("\nseparation complete\n"); 124 } 125 printf("Temp. list Num. o El: A: %i, B: %i, C: %i, D: %i\n", listA->getSize(), listB->getSize(), listC->getSize(), listD->getSize()); 126 127 128 129 /* Separating into to the triangle lists */ 130 sTriangleExt** pTriA; //!< Triangle array A 131 sTriangleExt** pTriB; //!< Triangle array B 132 sTriangleExt** pTriC; //!< Triangle array C 133 sTriangleExt** pTriD; //!< Triangle array D 134 float lenA; //!< length array A 135 float lenB; //!< length array B 136 float lenC; //!< length array C 137 float lenD; //!< length array D 138 tIterator<sTriangleExt*>* iterator; //!< iterator for the list iterations 139 sTriangleExt* tempTri; //!< temp save place for triangle pointer 140 141 lenA = listA->getSize(); 142 lenB = listB->getSize(); 143 lenC = listC->getSize(); 144 lenD = listD->getSize(); 145 146 pTriA = new sTriangleExt*[listA->getSize()]; 147 pTriB = new sTriangleExt*[listB->getSize()]; 148 pTriC = new sTriangleExt*[listC->getSize()]; 149 pTriD = new sTriangleExt*[listD->getSize()]; 150 151 152 iterator = listA->getIterator(); 153 154 155 156 PRINTF(0)("separation complete\n"); 157 } 158 125 159 126 160 … … 170 204 171 205 PRINTF(0)("Dimension Informationation: X: min/max %f/%f Y: min/max %f/%f\n", minX, maxX, minY, maxY); 206 PRINTF(0)("Center: %f,%f Axis: %f\n", rect->getCenter()->x, rect->getCenter()->y, rect->getCenter()->z, rect->getAxis()); 172 207 return rect; 173 208 }
Note: See TracChangeset
for help on using the changeset viewer.