source: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGBox2d.h @ 721

Revision 721, 703 bytes checked in by igarcia, 18 years ago (diff)
Line 
1#ifndef _IMGBOX2D_H
2#define _IMGBOX2D_H
3
4#include <IMGBBox.h>
5
6namespace IMG {
7
8//* this class represents a 2d bound box for a texture
9class 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.