llcoord.h

Go to the documentation of this file.
00001 
00031 #ifndef LL_LLCOORD_H
00032 #define LL_LLCOORD_H
00033 
00034 // A two-dimensional pixel value
00035 class LLCoord
00036 {
00037 public:
00038         S32             mX;
00039         S32             mY;
00040 
00041         LLCoord():      mX(0), mY(0)
00042         {}
00043         LLCoord(S32 x, S32 y): mX(x), mY(y)
00044         {}
00045         virtual ~LLCoord()
00046         {}
00047 
00048         virtual void set(S32 x, S32 y)          { mX = x; mY = y; }
00049 };
00050 
00051 
00052 // GL coordinates start in the client region of a window,
00053 // with left, bottom = 0, 0
00054 class LLCoordGL : public LLCoord
00055 {
00056 public:
00057         LLCoordGL() : LLCoord()
00058         {}
00059         LLCoordGL(S32 x, S32 y) : LLCoord(x, y)
00060         {}
00061 };
00062 
00063 
00064 // Window coords include things like window borders,
00065 // menu regions, etc.
00066 class LLCoordWindow : public LLCoord
00067 {
00068 public:
00069         LLCoordWindow() : LLCoord()
00070         {}
00071         LLCoordWindow(S32 x, S32 y) : LLCoord(x, y)
00072         {}
00073 };
00074 
00075 
00076 // Screen coords start at left, top = 0, 0
00077 class LLCoordScreen : public LLCoord
00078 {
00079 public:
00080         LLCoordScreen() : LLCoord()
00081         {}
00082         LLCoordScreen(S32 x, S32 y) : LLCoord(x, y)
00083         {}
00084 };
00085 
00086 class LLCoordFont : public LLCoord
00087 {
00088 public:
00089         F32 mZ;
00090         
00091         LLCoordFont() : LLCoord(), mZ(0.f)
00092         {}
00093         LLCoordFont(S32 x, S32 y, F32 z = 0) : LLCoord(x,y), mZ(z)
00094         {}
00095         
00096         void set(S32 x, S32 y) { LLCoord::set(x,y); mZ = 0.f; }
00097         void set(S32 x, S32 y, F32 z) { mX = x; mY = y; mZ = z; }
00098 };
00099         
00100 
00101 #endif

Generated on Thu Jul 1 06:08:23 2010 for Second Life Viewer by  doxygen 1.4.7