Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2011, 11:40:58 PM (13 years ago)
Author:
dafrick
Message:

Merging pickup branch into presentation branch.

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/modules/objects/collisionshapes/PlaneCollisionShape.cc

    r6417 r8556  
    2727 */
    2828
     29/**
     30    @file PlaneCollisionShape.cc
     31    @brief Implementation of the PlaneCollisionShape class.
     32*/
     33
    2934#include "PlaneCollisionShape.h"
    3035
     
    3944    CreateFactory(PlaneCollisionShape);
    4045
     46    /**
     47    @brief
     48        Constructor. Registers and initializes the object.
     49    */
    4150    PlaneCollisionShape::PlaneCollisionShape(BaseObject* creator) : CollisionShape(creator)
    4251    {
     
    7079    }
    7180
     81    /**
     82    @brief
     83        Is called when the scale of the PlaneCollisionShape has changed.
     84    */
     85    void PlaneCollisionShape::changedScale()
     86    {
     87        CollisionShape::changedScale();
     88
     89        // Resize the internal collision shape
     90        // TODO: Assuming setLocalScaling works.
     91        //this->collisionShape_->setLocalScaling(multi_cast<btVector3>(this->getScale3D()));
     92        if(!this->hasUniformScaling())
     93        {
     94            CCOUT(1) << "Error: Non-uniform scaling is not yet supported." << endl;
     95            return;
     96        }
     97
     98        this->setOffset(this->offset_*this->getScale());
     99    }
     100
     101    /**
     102    @brief
     103        Creates a new internal collision shape for the PlaneCollisionShape.
     104    @return
     105        Returns a pointer to the newly created btStaticPlaneShape.
     106    */
    72107    btCollisionShape* PlaneCollisionShape::createNewShape() const
    73108    {
Note: See TracChangeset for help on using the changeset viewer.