Changeset 4852 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Jul 13, 2005, 9:58:40 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/spatial_separation
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.cc
r4845 r4852 49 49 */ 50 50 void Quadtree::separate() 51 {} 51 { 52 this->rootNode->separateNode(); 53 } 52 54 53 55 -
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r4851 r4852 28 28 QuadtreeNode::QuadtreeNode (sTriangleExt* triangles, int numTriangles, Quadtree* quadtree) 29 29 { 30 this->setClassID(CL_QUADTREE_NODE, "QuadtreeNode");30 this->init(); 31 31 } 32 32 … … 46 46 for( int i = 0; i < this->pModelInfo->numTriangles; ++i) 47 47 this->pTriangles[i] = &this->pModelInfo->pTriangles[i]; 48 48 49 this->init(); 50 } 51 52 53 /** 54 * takes the rest of the initialisation process 55 */ 56 void QuadtreeNode::init() 57 { 58 PRINTF(0)("Creating QuadtreeNode\n"); 59 this->setClassID(CL_QUADTREE_NODE, "QuadtreeNode"); 60 61 this->offset = 0.0f; 49 62 } 50 63 … … 52 65 /** 53 66 * standard deconstructor 54 55 */ 67 */ 56 68 QuadtreeNode::~QuadtreeNode () 57 69 { … … 64 76 */ 65 77 void QuadtreeNode::separateNode(int treeDepth) 66 {} 78 { 79 this->separateNode(); 80 } 67 81 68 82 … … 72 86 */ 73 87 void QuadtreeNode::separateNode(float minLength) 74 {} 88 { 89 this->separateNode(); 90 } 75 91 76 92 … … 81 97 void QuadtreeNode::separateNode() 82 98 { 99 PRINTF(0)("got command to separate node\n"); 83 100 tList<sTriangleExt*>* listA = new tList<sTriangleExt*>(); //!< triangle list of nodeA 84 101 tList<sTriangleExt*>* listB = new tList<sTriangleExt*>(); //!< triangle list of nodeB … … 95 112 pVert = &this->pVertices[this->pTriangles[i]->indexToVertices[j]]; 96 113 if( pVert[0] > rectCenter->x + this->offset && pVert[2] > rectCenter->z + this->offset) 97 printf(""); 98 114 printf("nA"); 115 if( pVert[0] > rectCenter->x + this->offset && pVert[2]< rectCenter->z + this->offset) 116 printf("nB"); 117 if( pVert[0] < rectCenter->x + this->offset && pVert[2] > rectCenter->z + this->offset) 118 printf("nC"); 119 if( pVert[0] < rectCenter->x + this->offset && pVert[2] < rectCenter->z + this->offset) 120 printf("nD"); 99 121 } 100 122 } 123 PRINTF(0)("\nseparation complete\n"); 101 124 } 102 125 -
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.h
r4851 r4852 32 32 33 33 private: 34 void init(); 34 35 Rectangle* getDimension(modelInfo* pModelInfo); 35 36 -
orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.cc
r4845 r4852 33 33 SpatialSeparation::SpatialSeparation (AbstractModel* model, float overlapSize) 34 34 { 35 PRINTF(0)("Spatial Separation process kicked on\n"); 35 36 this->setClassID(CL_SPATIAL_SEPARATION, "SpatialSeparation"); 37 /* debug vice */ 36 38 this->createQuadtree(model); 37 39 }
Note: See TracChangeset
for help on using the changeset viewer.