]>
Dogcows Code - chaz/yoink/blob - Rectangle.hh
e41b879cc2e85ba3cd4d71057495c2c0c376d42e
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
10 **************************************************************************/
12 #ifndef _MOOF_RECTANGLE_HH_
13 #define _MOOF_RECTANGLE_HH_
15 #include <Moof/Math.hh>
22 * Axis-aligned Bounding Box
33 Rectangle(const Vector2
& a
, const Vector2
& b
)
38 Rectangle(Scalar ax
, Scalar ay
, Scalar bx
, Scalar by
)
46 void init(const Vector2
& a
, const Vector2
& b
)
70 Vector2
getCenter() const
72 return Vector2((min
[0] + max
[0]) / 2.0,
73 (min
[1] + max
[1]) / 2.0);
76 void getCorners(Vector2 corners
[4]) const;
82 #endif // _MOOF_RECTANGLE_HH_
This page took 0.042126 seconds and 3 git commands to generate.