Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 4, 2016, 6:31:29 PM (9 years ago)
Author:
landauf
Message:

use only default constructor (with context, but no other arguments)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/src/modules/hover/HoverWall.cc

    r11041 r11042  
    4545    {
    4646        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);
    4954    }
    50 
    5155
    5256    /**
    5357    @brief
    54         Constructor of a HoverWall
     58        Destructor.
     59    */
     60    HoverWall::~HoverWall()
     61    {
     62
     63    }
     64
     65    /**
     66    @brief
     67        Initializes a HoverWall
    5568    @param x
    5669        x-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left
     
    6073            Wall on the right side (1) or on top (2) of this square, 0-1       
    6174    */
    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)
    6376    {
    64         RegisterObject(HoverWall);
    65 
    6677        int xSize_, zSize_, xPos_, zPos_;
    6778
     
    8091
    8192
    82         model_ = new Model(context);
     93        model_ = new Model(this->getContext());
    8394        model_->setMeshSource("CuboidBody.mesh");
    8495        model_->setScale3D(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
     
    8798        this->attach(model_);
    8899
    89         this->enableCollisionCallback();
    90         this->setCollisionResponse(true);
    91         this->setCollisionType(Static);
    92 
    93         cs_ = new BoxCollisionShape(context);
     100        cs_ = new BoxCollisionShape(this->getContext());
    94101        cs_->setHalfExtents(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
    95102        cs_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f));
     
    97104        this->attachCollisionShape(cs_);
    98105    }
    99 
    100     /**
    101     @brief
    102         Destructor.
    103     */
    104     HoverWall::~HoverWall()
    105     {
    106 
    107     }
    108106}
Note: See TracChangeset for help on using the changeset viewer.