How to determine that we arrive the desired position?

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

songge3604
Quite a regular
Quite a regular
Posts: 60
Joined: Tue Oct 28, 2008 10:46

How to determine that we arrive the desired position?

Postby songge3604 » Thu Apr 15, 2010 03:58

This maybe a simple problem:

How to determine that the moving window arrive the desired position?

for example: pos(x, y, z) moving to desired_pos(x', y', z')

I can not find a good method, can you help me, please.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: How to determine that we arrive the desired position?

Postby CrazyEddie » Thu Apr 15, 2010 09:03

Firstly, there is no 'z' component. Aside from this, how are you moving the window?

Rejecting the base case of 'since you're setting the position you should already know when it's reached a certain point', and assuming that perhaps you're wanting pixel only positions, you can probably use CEGUI::Window::getUnclippedOuterRect or some such thing and compare with the target position.

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 16 guests