Changeset 4851 in orxonox.OLD for orxonox/trunk/src/lib/math
- Timestamp:
- Jul 13, 2005, 9:07:13 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/math/vector.h
r4845 r4851 245 245 246 246 public: 247 Rectangle() { }247 Rectangle() { this->center = new Vector(); } 248 248 virtual ~Rectangle() {} 249 249 250 250 /** \brief sets the center of the rectangle to a defined vector @param center the new center */ 251 inline void setCenter(const Vector ¢er) { this->center = center;}251 inline void setCenter(const Vector ¢er) { *this->center = center;} 252 252 /** \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; } 254 254 /** \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; } 256 256 257 257 /** \brief sets both axis of the rectangle to a defined vector @param unityLength the new center */ … … 261 261 262 262 private: 263 Vector center; 264 float axis[2]; 265 }; 263 Vector* center; 264 float axis[2]; 265 }; 266 267 266 268 #endif /* _VECTOR_H */
Note: See TracChangeset
for help on using the changeset viewer.