About Store Forum Documentation Contact



Post Reply 
Questions
Author Message
Boogy Offline
Member

Post: #1
Questions
I have a couple of questions about Esenthel.

  1. Is it possible to set the screen coordinates to the top left?
  2. 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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
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
Find all posts by this user Quote this message in a reply
Boogy Offline
Member

Post: #3
RE: Questions
Ok thanks for your quick reply grin

I'll probably post more questions in this thread as time progresses.

I'm using this engine for a big school project wink
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 lol
02-10-2010 08:38 PM
Find all posts by this user Quote this message in a reply
Post Reply