Changeset 5215 in orxonox.OLD for trunk/src/lib/math
- Timestamp:
- Sep 22, 2005, 4:02:08 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/math/vector.h
r5053 r5215 268 268 269 269 public: 270 Rectangle() { this->center = newVector(); }271 Rectangle(const Vector ¢er, float len) { this->center = newVector(center.x, center.y, center.z); this->axis[0] = len; this->axis[1] = len; }270 Rectangle() { this->center = Vector(); } 271 Rectangle(const Vector ¢er, float len) { this->center = Vector(center.x, center.y, center.z); this->axis[0] = len; this->axis[1] = len; } 272 272 virtual ~Rectangle() {} 273 273 274 274 /** \brief sets the center of the rectangle to a defined vector @param center the new center */ 275 inline void setCenter(const Vector ¢er) { *this->center = center;}275 inline void setCenter(const Vector ¢er) { this->center = center;} 276 276 /** \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 */ 277 inline void setCenter(float x, float y, float z) { this->center ->x = x; this->center->y = y; this->center->z = z; }277 inline void setCenter(float x, float y, float z) { this->center.x = x; this->center.y = y; this->center.z = z; } 278 278 /** \brief returns the center of the rectangle to a defined vector @returns center the new center */ 279 inline const Vector *getCenter() const { return this->center; }279 inline const Vector& getCenter() const { return this->center; } 280 280 281 281 /** \brief sets both axis of the rectangle to a defined vector @param unityLength the new center */ … … 287 287 288 288 private: 289 Vector *center;289 Vector center; 290 290 float axis[2]; 291 291 };
Note: See TracChangeset
for help on using the changeset viewer.