Page 1 of 1

E3DSurface. Scale () function?

PostPosted: Sep 28, 2007 @ 9:00pm
by CountZero
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!

PostPosted: Oct 2, 2007 @ 10:51am
by edge
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).