Line | |
---|
1 | #ifndef _IMGBOX2D_H |
---|
2 | #define _IMGBOX2D_H |
---|
3 | |
---|
4 | #include <IMGBBox.h> |
---|
5 | |
---|
6 | namespace IMG { |
---|
7 | |
---|
8 | //* this class represents a 2d bound box for a texture |
---|
9 | class _IMGExport Box2d |
---|
10 | { |
---|
11 | public: |
---|
12 | Box2d(); |
---|
13 | |
---|
14 | ~Box2d(); |
---|
15 | |
---|
16 | // GametoolsError -- Isma 17/08/2005 |
---|
17 | Box2d & Box2d::operator =(const Box2d & p) |
---|
18 | { |
---|
19 | mMinimum = p.mMinimum; |
---|
20 | mMaximum = p.mMaximum; |
---|
21 | return (*this); |
---|
22 | } |
---|
23 | |
---|
24 | Ogre::Vector2 getMinimum(); |
---|
25 | |
---|
26 | Ogre::Vector2 getMaximum(); |
---|
27 | |
---|
28 | void setBoundBox(float x, float y, float X, float Y); |
---|
29 | |
---|
30 | void addBoundingVector3(float x, float y); |
---|
31 | |
---|
32 | void print(); |
---|
33 | |
---|
34 | Ogre::Vector2 getCorner(int corner) const; |
---|
35 | |
---|
36 | bool in(int w, int h); |
---|
37 | |
---|
38 | bool fitPerfect(int w, int h); |
---|
39 | |
---|
40 | protected:
|
---|
41 | Ogre::Vector2 mMinimum, mMaximum; |
---|
42 | }; |
---|
43 | |
---|
44 | } |
---|
45 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.