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

    r2459 r2514  
    4646
    4747            inline void setNormal(const Vector3& normal)
    48                 { this->normal_ = normal; updatePlane(); }
     48                { this->normal_ = normal; updateShape(); }
    4949            inline const Vector3& getNormal()
    5050                { return normal_;}
    5151
    5252            inline void setOffset(float offset)
    53                 { this->offset_ = offset; updatePlane(); }
     53                { this->offset_ = offset; updateShape(); }
    5454            inline float getOffset()
    5555                { return this->offset_;}
    5656
    57             void updatePlane();
     57        private:
     58            btCollisionShape* createNewShape()const;
    5859
    59         private:
    6060            Vector3 normal_;
    6161            float   offset_;
Note: See TracChangeset for help on using the changeset viewer.