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/SphereCollisionShape.h

    r2486 r2514  
    4646
    4747            inline void setRadius(float radius)
    48                 { this->radius_ = radius; updateSphere(); }
     48                { this->radius_ = radius; updateShape(); }
    4949            inline float getRadius() const
    5050                { return this->radius_; }
    5151
    52             void updateSphere();
     52        private:
     53            btCollisionShape* createNewShape() const;
    5354
    54         private:
    5555            float radius_;
    5656    };
Note: See TracChangeset for help on using the changeset viewer.