Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2008, 11:33:58 PM (17 years ago)
Author:
rgrieder
Message:
  • Fixed issues with CollisionShape loading, handling and synchronisation.
  • Added eol-style native to PlaneCollisionShape
  • Unified treatment of configuring btCollisionShapes when parameters change
File:
1 edited

Legend:

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

    • Property svn:eol-style set to native
    r2374 r2403  
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4747
     48            inline void setNormal(const Vector3& normal)
     49                { this->normal_ = normal; updatePlane(); }
     50            inline const Vector3& getNormal()
     51                { return normal_;}
     52
     53            inline void setOffset(float offset)
     54                { this->offset_ = offset; updatePlane(); }
    4855            inline float getOffset()
    49                 { return this->planeShape_->getPlaneConstant();}
    50             void setOffset(float offset);
     56                { return this->offset_;}
    5157
    52             inline btVector3 getNormal()
    53                 { return this->planeShape_->getPlaneNormal();}
    54             void setNormal(const Vector3& normal);
    55 
    56             inline void planeNormalChanged()
    57                 { this->setNormal(this->planeNormal_); }
    58 
    59             inline void planeOffsetChanged()
    60                 { this->setOffset(this->planeOffset_); }
     58            void updatePlane();
    6159
    6260        private:
    63             btStaticPlaneShape* planeShape_;
    64             Vector3             planeNormal_;
    65             float               planeOffset_;
     61            Vector3 normal_;
     62            float   offset_;
    6663     };
    6764}
Note: See TracChangeset for help on using the changeset viewer.