Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 22, 2014, 2:49:16 PM (11 years ago)
Author:
smerkli
Message:

Merged modularships branch

Location:
code/branches/presentationFS14
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationFS14

  • code/branches/presentationFS14/src/orxonox/collisionshapes/CollisionShape.h

    r9667 r10073  
    170170            void notifyDetached(); // Notifies the CollisionShape of being detached from a CompoundCollisionShape.
    171171
     172            inline unsigned int getParentID()
     173                { return this->parentID_; }
     174
     175            inline CompoundCollisionShape* getParent()
     176                { return this->parent_; }
     177
    172178        protected:
    173179            virtual void updateParent(); // Updates the CompoundCollisionShape the CollisionShape belongs to, after the CollisionShape has changed.
  • code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.cc

    r9667 r10073  
    3939#include "core/XMLPort.h"
    4040#include "tools/BulletConversions.h"
     41
     42#include "collisionshapes/WorldEntityCollisionShape.h"
    4143
    4244namespace orxonox
     
    118120            this->updatePublicShape();
    119121        }
     122
     123        // If the shape to be attached is not a CompoundCollisionShape (thus an actual physical shape) & this is a WorldEntity's CollisionShape,
     124        // set it's userPointer to the WorldEntity this CompoundCollisionShape belongs to.
     125        if (!orxonox_cast<CompoundCollisionShape*>(shape) && orxonox_cast<WorldEntityCollisionShape*>(this))
     126            shape->getCollisionShape()->setUserPointer(orxonox_cast<WorldEntityCollisionShape*>(this)->getWorldEntityOwner());
    120127    }
    121128
     
    297304        this->updatePublicShape();*/
    298305    }
     306
     307    int CompoundCollisionShape::getNumChildShapes()
     308    {
     309        return this->compoundShape_->getNumChildShapes();
     310    }
    299311}
  • code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.h

    r9667 r10073  
    7171
    7272            virtual void changedScale();
     73            int getNumChildShapes();
     74
     75            inline std::map<CollisionShape*, btCollisionShape*> getShapesMap()
     76            {
     77                return attachedShapes_;
     78            }
    7379
    7480        private:
Note: See TracChangeset for help on using the changeset viewer.