Changeset 9174 in orxonox.OLD for branches/presentation/src/world_entities
- Timestamp:
- Jul 4, 2006, 10:17:57 PM (18 years ago)
- Location:
- branches/presentation/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/weapons/aiming_system.cc
r9172 r9174 63 63 this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, CL_WORLD_ENTITY); 64 64 65 this->range = 10 00.0f;66 this->sideLength = 10.0f;65 this->range = 10.0f; 66 this->sideLength = 2.0f; 67 67 68 68 // new obb tree 69 69 this->obbTree = new OBBTree(); 70 70 this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(this->range, this->sideLength, this->sideLength)); 71 this->setOBBTree(this->obbTree); 71 72 } 72 73 … … 137 138 void AimingSystem::draw() const 138 139 { 139 //WorldEntity::draw();140 WorldEntity::draw(); 140 141 141 glMatrixMode(GL_MODELVIEW);142 glPushMatrix();143 144 /* translate */145 glTranslatef (this->getAbsCoor ().x,146 this->getAbsCoor ().y,147 this->getAbsCoor ().z);148 Vector tmpRot = this->getAbsDir().getSpacialAxis();149 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );150 151 this->obbTree->drawBV(1, 1);152 153 glPopMatrix();142 // glMatrixMode(GL_MODELVIEW); 143 // glPushMatrix(); 144 // 145 // /* translate */ 146 // glTranslatef (this->getAbsCoor ().x, 147 // this->getAbsCoor ().y, 148 // this->getAbsCoor ().z); 149 // Vector tmpRot = this->getAbsDir().getSpacialAxis(); 150 // glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 151 // 152 // this->obbTree->drawBV(0, 1); 153 // 154 // glPopMatrix(); 154 155 155 156 } -
branches/presentation/src/world_entities/world_entity.h
r9166 r9174 74 74 /** @returns a reference to the obb tree of this worldentity */ 75 75 inline BVTree* getOBBTree() const { return this->obbTree; }; 76 inline void setOBBTree(OBBTree* tree) { if( this->obbTree != NULL) this->obbTree = (BVTree*)tree; } 76 77 void drawBVTree(int depth, int drawMode) const; 77 78 inline AABB* getModelAABB() const { return (this->aabbNode)?this->aabbNode->getAABB():NULL;}
Note: See TracChangeset
for help on using the changeset viewer.