Boogy
Member
|
Questions
I have a couple of questions about Esenthel.
- Is it possible to set the screen coordinates to the top left?
- Can I also convert the screen coordinates from floating point numbers to int's?
I'll probably post more questions here.
|
|
02-10-2010 02:58 PM |
|
Esenthel
Administrator
|
RE: Questions
Hello,
1. no
2. yes, inside Display.h :
Code:
static Vec2 screenToUV (Vec2 &screen); // from screen (-D.w .. D.w , -D.h .. D.h ) to UV ( 0 .. 1 , 0 .. 1 )
static VecI2 screenToPixel (Vec2 &screen); // from screen (-D.w .. D.w , -D.h .. D.h ) to pixel ( 0 .. D.x , 0 .. D.y )
static RectI screenToPixel (Rect &screen); // from screen (-D.w .. D.w , -D.h .. D.h ) to pixel ( 0 .. D.x , 0 .. D.y )
static VecI2 screenToPixelSize(Vec2 &screen); // from screen size ( 0 .. D.w*2, 0 .. D.h*2) to pixel size ( 0 .. D.x , 0 .. D.y ), use this function for widths and heights
static Vec2 UVToScreen (Vec2 &uv ); // from UV ( 0 .. 1 , 0 .. 1 ) to screen (-D.w .. D.w , -D.h .. D.h )
static Vec2 pixelToScreen (VecI2 &pixel ); // from pixel ( 0 .. D.x , 0 .. D.y ) to screen (-D.w .. D.w , -D.h .. D.h )
static Rect pixelToScreen (RectI &pixel ); // from pixel ( 0 .. D.x , 0 .. D.y ) to screen (-D.w .. D.w , -D.h .. D.h )
static Vec2 pixelToScreenSize(VecI2 &pixel ); // from pixel size ( 0 .. D.x , 0 .. D.y ) to screen size ( 0 .. D.w*2, 0 .. D.h*2), use this function for widths and heights
|
|
02-10-2010 03:51 PM |
|
Boogy
Member
|
RE: Questions
Ok thanks for your quick reply
I'll probably post more questions in this thread as time progresses.
I'm using this engine for a big school project
We are going to build an RTS. Can't tell much about the concept right now but I'll post some info about when I can/may.
BTW: Very nice engine. I love it
|
|
02-10-2010 08:38 PM |
|