Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CUI_CoordSys Class Reference

Coordinate system for frames. More...

#include <CUI_CoordSys.h>

Inheritance diagram for CUI_CoordSys:

CUI_Resource List of all members.

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.


Detailed Description

Coordinate system for frames.

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.


Constructor & Destructor Documentation

CUI_CoordSys::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

Parameters:
minx minimum X
miny minimum Y
maxx maximum X
maxy maximum Y
vminx minimum view range X
vminy minimum view range Y
vmaxx maximum view range X
vmaxy maximum view range Y


Member Function Documentation

bool CUI_CoordSys::Convert float &  x,
float &  y
[virtual]
 

convert a given x,y position into this coordinate system

Parameters:
x modified x position
y modified y position
Returns:
true if point is within the viewable range

bool CUI_CoordSys::GetCoordinates v4_f  range,
v4_f  viewRange
[virtual]
 

get the coordinates

Parameters:
range modified array for coordinates
viewRange modified array for view range coordiantes

bool CUI_CoordSys::SetCoord float  minx,
float  miny,
float  maxx,
float  maxy
[virtual]
 

set or change the coordinate system

Parameters:
minx minimum X
miny minimum Y
maxx maximum X
maxy maximum Y

bool CUI_CoordSys::SetViewRange float  vminx,
float  vminy,
float  vmaxx,
float  vmaxy
[virtual]
 

set or change the coordinate system's view range

Parameters:
minx minimum X
miny minimum Y
maxx maximum X
maxy maximum Y

bool CUI_CoordSys::TestHit float  x,
float  y
[virtual]
 

test to see if a given point is within this coordinate system

Returns:
true if the point is within this coordsys


The documentation for this class was generated from the following files:
Generated on Mon Sep 29 23:07:03 2003 for glGUI by doxygen 1.3.4