- Timestamp:
- Jan 4, 2016, 6:31:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS15/src/modules/hover/HoverWall.cc
r11041 r11042 45 45 { 46 46 RegisterObject(HoverWall); 47 model_ = NULL; 48 cs_ = NULL; 47 48 this->model_ = NULL; 49 this->cs_ = NULL; 50 51 this->enableCollisionCallback(); 52 this->setCollisionResponse(true); 53 this->setCollisionType(Static); 49 54 } 50 51 55 52 56 /** 53 57 @brief 54 Constructor of a HoverWall 58 Destructor. 59 */ 60 HoverWall::~HoverWall() 61 { 62 63 } 64 65 /** 66 @brief 67 Initializes a HoverWall 55 68 @param x 56 69 x-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left … … 60 73 Wall on the right side (1) or on top (2) of this square, 0-1 61 74 */ 62 HoverWall::HoverWall(Context* context, int x, int y, int cellSize, int cellHeight, int orientation) : StaticEntity(context)75 void HoverWall::init(int x, int y, int cellSize, int cellHeight, int orientation) 63 76 { 64 RegisterObject(HoverWall);65 66 77 int xSize_, zSize_, xPos_, zPos_; 67 78 … … 80 91 81 92 82 model_ = new Model( context);93 model_ = new Model(this->getContext()); 83 94 model_->setMeshSource("CuboidBody.mesh"); 84 95 model_->setScale3D(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f)); … … 87 98 this->attach(model_); 88 99 89 this->enableCollisionCallback(); 90 this->setCollisionResponse(true); 91 this->setCollisionType(Static); 92 93 cs_ = new BoxCollisionShape(context); 100 cs_ = new BoxCollisionShape(this->getContext()); 94 101 cs_->setHalfExtents(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f)); 95 102 cs_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f)); … … 97 104 this->attachCollisionShape(cs_); 98 105 } 99 100 /**101 @brief102 Destructor.103 */104 HoverWall::~HoverWall()105 {106 107 }108 106 }
Note: See TracChangeset
for help on using the changeset viewer.