Changeset 10728 in orxonox.OLD for branches/presentation/src/util/track
- Timestamp:
- Jun 20, 2007, 11:39:18 AM (17 years ago)
- Location:
- branches/presentation/src/util/track
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/util/track/action_box.cc
r10698 r10728 98 98 assert( _track ); 99 99 assert( State::getActionBox() == NULL ); 100 100 101 101 State::setActionBox( this ); 102 102 103 103 this->width_2 = width_2; 104 104 this->height_2 = height_2; … … 106 106 this->stretch = stretch; 107 107 this->track = _track; 108 108 109 109 setParent( _track->getTrackNode() ); 110 110 111 111 toList( OM_COMMON ); 112 112 } -
branches/presentation/src/util/track/action_box.h
r10698 r10728 16 16 virtual void tick (float time); 17 17 virtual void draw () const; 18 18 19 19 ActionBox( Track* _track, float width_2, float height_2, float depth, float stretch ); 20 20 ~ActionBox(); 21 22 21 22 23 23 bool isPointInBox( const Vector& pos ); 24 24 25 25 float getWidth_2(){ return width_2; } 26 26 float getHeight_2(){ return height_2; } 27 27 float getDepth(){ return depth; } 28 28 float getStretch(){ return stretch; } 29 29 30 30 private: 31 31 void updatePlanes(); 32 32 33 33 float width_2; //! width/2 of near plane 34 34 float height_2; //! height/2 of near plane 35 35 float depth; //! distance between near and far plane 36 36 float stretch; //! far plane will be stretched by this factor 37 37 38 38 Track* track; 39 39 40 40 Plane planes[6]; //! planes for collision. normale must point towards middle 41 41 };
Note: See TracChangeset
for help on using the changeset viewer.