This site is no longer active and is available for archival purposes only. Registration and login is disabled.

E3DSurface. Scale () function?


E3DSurface. Scale () function?

Postby CountZero » Sep 28, 2007 @ 9:00pm

Hi,
I'm having some issues while scaling a loaded model. Could anyone please explain how the Scale method works and what the parameters correspond to?

For instance, if I want to scale the object size by half, how would I do that?

Thanks!
CountZero
pm Member
 
Posts: 21
Joined: Aug 3, 2007 @ 11:02pm


Postby edge » Oct 2, 2007 @ 10:51am

Hi CountZero,

If you only need to scale the model at loading time, you can use the modelsize parameter of CreateSurface(). Set it to -1 to half the size, or -2 for 1/4 size.

If you need to scale the model runtime, you can use E3DSurface :: Scale. To have a 50% size model on each axis, use 32768 for all parameter values. 65536 is 100% size, 65536 / 2 is half size and 65536 * 2 is double size. When scaling each frame, don't forget to call E3DSurface :: Reset (or else it will shrink very quickly).
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron