Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2008, 10:23:29 PM (15 years ago)
Author:
rgrieder
Message:
  • Forgot to account for collision shape position and orientation when attaching WEs
  • addChildShape —> attach in CompoundCollisionShape
  • Fixed an issue which allowed WE's to detach themselves from non-parents.
  • Fixed an issue that occurred when physics was not active before attaching
  • Added some forgotten const in WE (physics)
  • When attaching WE's the child doesn't get modified anymore. Alternative: notifyDetached() and notifyBeingAttached(this) —> the child does the work
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.h

    r2485 r2527  
    244244            CollisionShape* getAttachedCollisionShape(unsigned int index) const;
    245245
    246             inline CompoundCollisionShape* getCollisionShape()
     246            inline CompoundCollisionShape* getCollisionShape() const
    247247                { return this->collisionShape_; }
    248             inline btRigidBody* getPhysicalBody()
     248            inline btRigidBody* getPhysicalBody() const
    249249                { return this->physicalBody_; }
    250250
     
    259259            inline void disableCollisionCallback()
    260260                { this->bCollisionCallbackActive_ = false; this->collisionCallbackActivityChanged(); }
    261             inline bool isCollisionCallbackActive()
     261            inline bool isCollisionCallbackActive() const
    262262                { return this->bCollisionCallbackActive_; }
    263263
     
    271271            void recalculateMassProps();
    272272            void resetPhysicsProps();
     273
     274            bool notifyBeingAttached(WorldEntity* newParent);
     275            void notifyDetached();
    273276
    274277            // network callbacks
     
    293296            bool                         bPhysicsActive_;
    294297            bool                         bPhysicsActiveSynchronised_;
     298            bool                         bPhysicsActiveBeforeAttaching_;
    295299            CompoundCollisionShape*      collisionShape_;
    296300            btScalar                     mass_;
Note: See TracChangeset for help on using the changeset viewer.