Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2008, 2:44:00 PM (17 years ago)
Author:
rgrieder
Message:

Resolved four issues with the collision shapes:

  • NetworkCallback will of course not call functions virtually
  • CompoundCollisionShapes with a WorldEntity parent don't have to attach themselves when synchronised
  • Just in case: When changing a CollisionShape, the old gets destroyed AFTER everything has been updated
  • CompoundCollisionShapes with a WorldEntity parent now update both the WE and the CompoundCollisionShape when something changes

Other changes

  • Also replaced some redundant code while at it (updating the shapes was done individually)
  • Like in WE, the CompoundCollisionShape deletes all its children when being destroyed itself. This requires in WE that the children get detached before the CompoundCollisionShape gets deleted.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/collisionshapes/ConeCollisionShape.h

    r2486 r2514  
    4646
    4747            inline void setRadius(float value)
    48                 { this->radius_ = value; updateCone(); }
     48                { this->radius_ = value; updateShape(); }
    4949            inline float getRadius() const
    5050                { return radius_; }
    5151
    5252            inline void setHeight(float value)
    53                 { this->height_ = value; updateCone(); }
     53                { this->height_ = value; updateShape(); }
    5454            inline float getHeight() const
    5555                { return this->height_; }
    5656
    57             void updateCone();
     57        private:
     58            btCollisionShape* createNewShape() const;
    5859
    59         private:
    6060            float radius_;
    6161            float height_;
Note: See TracChangeset for help on using the changeset viewer.