#include <CUI_CoordSys.h>
Inheritance diagram for CUI_CoordSys:
Public Member Functions | |
CUI_CoordSys (float minx=0, float miny=0, float maxx=1, float maxy=1, float vminx=0, float vminy=0, float vmaxx=1, float vmaxy=1) | |
create a specific coordinate system | |
virtual | ~CUI_CoordSys () |
destructor | |
virtual bool | SetCoord (float minx, float miny, float maxx, float maxy) |
set or change the coordinate system | |
virtual bool | SetViewRange (float vminx, float vminy, float vmaxx, float vmaxy) |
set or change the coordinate system's view range | |
virtual bool | GetCoordinates (v4_f range, v4_f viewRange) |
get the coordinates | |
virtual bool | Convert (float &x, float &y) |
convert a given x,y position into this coordinate system | |
virtual bool | TestHit (float x, float y) |
test to see if a given point is within this coordinate system | |
Protected Attributes | |
v4_f | m_range |
The 2D space. | |
v4_f | m_viewRange |
The viewable 2D space. |
CUI_CoordSys is used for 2d coordinate systems.
The default system is device and resolution independent.
Setting m_usepixels to true makes this frame reslution dependent. This will allow an application to fit more on a screen. (MSWindows and similar window managers are resolution dependent).
WARNING: If you set a CoordSys to NULL in any of the classes that use it, it will assume that it has no coordinate space. The registry will point it to the default if it's NULL when added, but after that, it has no way of recovering if you set it to NULL.
|
create a specific coordinate system
|
|
convert a given x,y position into this coordinate system
|
|
get the coordinates
|
|
set or change the coordinate system
|
|
set or change the coordinate system's view range
|
|
test to see if a given point is within this coordinate system
|