Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4851 in orxonox.OLD for orxonox/trunk/src/lib/math


Ignore:
Timestamp:
Jul 13, 2005, 9:07:13 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: start of the separation algorithm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/vector.h

    r4845 r4851  
    245245
    246246  public:
    247     Rectangle() {}
     247    Rectangle() { this->center = new Vector(); }
    248248    virtual ~Rectangle() {}
    249249
    250250    /** \brief sets the center of the rectangle to a defined vector @param center the new center */
    251    inline void setCenter(const Vector &center) { this->center = center;}
     251   inline void setCenter(const Vector &center) { *this->center = center;}
    252252    /** \brief sets the center of the rectangle to a defined vector @param x coord of the center @param y coord of the center @param z coord of the center */
    253    inline void setCenter(float x, float y, float z) { this->center.x = x; this->center.y = y; this->center.z = z; }
     253   inline void setCenter(float x, float y, float z) { this->center->x = x; this->center->y = y; this->center->z = z; }
    254254   /** \brief returns the center of the rectangle to a defined vector @returns center the new center */
    255    inline const Vector* getCenter() const { return &this->center; }
     255   inline const Vector* getCenter() const { return this->center; }
    256256
    257257   /** \brief sets both axis of the rectangle to a defined vector @param unityLength the new center */
     
    261261
    262262  private:
    263     Vector center;
    264     float axis[2];
    265 };
     263    Vector*         center;
     264    float           axis[2];
     265};
     266
     267
    266268#endif /* _VECTOR_H */
Note: See TracChangeset for help on using the changeset viewer.