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/collisionshapes/CompoundCollisionShape.h

    r2514 r2527  
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4747
    48             void addChildShape(CollisionShape* shape);
    49             void removeChildShape(CollisionShape* shape);
    50             void removeAllChildShapes();
    51             CollisionShape* getChildShape(unsigned int index) const;
     48            void attach(CollisionShape* shape);
     49            void detach(CollisionShape* shape);
     50            void detachAll();
     51            CollisionShape* getAttachedShape(unsigned int index) const;
    5252
    53             void updateChildShape(CollisionShape* shape);
     53            void updateAttachedShape(CollisionShape* shape);
    5454
    5555            void setWorldEntityParent(WorldEntity* parent);
     
    6565
    6666            btCompoundShape* compoundShape_;
    67             std::map<CollisionShape*, btCollisionShape*> childShapes_;
     67            std::map<CollisionShape*, btCollisionShape*> attachedShapes_;
    6868            WorldEntity* worldEntityParent_;
    6969    };
Note: See TracChangeset for help on using the changeset viewer.