Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2008, 4:14:36 PM (15 years ago)
Author:
rgrieder
Message:
  • Added detach functions to CollisionShapes
  • Added update functions across the CollisionShape hierarchy so that when you change the radius of a sphere, everything up to the WE gets updated.
  • Setting the btCollisionShape at run time doesn't work after all, fixed that (you can still do it, just a question of internals)
  • Improved network synchronisation
  • new WE function: addedToPhysicalWorld() to check whether we can still perform operations that are disallowed at run time (esp. StaticEntity)

Conclusively, I can say that right now, all operations considering physics should be handled automatically, bugs not withstanding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h

    r2407 r2423  
    4545            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4646
    47             void addChildShape(CollisionShape* shape, bool bWorldEntityRoot = false);
     47            void addChildShape(CollisionShape* shape);
     48            void removeChildShape(CollisionShape* shape);
     49            void removeAllChildShapes();
    4850            CollisionShape* getChildShape(unsigned int index) const;
    4951
    50             virtual btCollisionShape* getCollisionShape() const;
     52            void updateChildShape(CollisionShape* shape);
    5153
    52             inline bool empty() const
    53                 { return this->childShapes_.size() == 0; }
     54        protected:
     55            virtual void updateParent();
    5456
    5557        private:
    56             btCompoundShape*             compoundShape_;
    57             std::vector<CollisionShape*> childShapes_;
     58            void updatePublicShape();
     59
     60            btCompoundShape* compoundShape_;
     61            std::map<CollisionShape*, btCollisionShape*> childShapes_;
    5862    };
    5963}
Note: See TracChangeset for help on using the changeset viewer.