Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Size versus Scale ( Help!)

Author
Message
Cyber 1
18
Years of Service
User Offline
Joined: 11th Feb 2008
Location:
Posted: 12th Oct 2012 11:58
Greetings everybody.
I desperately need some help and I am hoping that somebody
can help me. Sadly DBPro does not have a command for accurately
reporting back the X,Y and Z scale data on any objects, instead
there is only a command to report back the object`s X,Y, or Z
"size" by using the "Return Float=OBJECT SIZE X(Object Number, Actual Size)" command. Unfortunately the data reported back
from this command is completely inaccurate as regards the scale
of the object because it reports only the "size" data of the
object and this size data is very different from the actual
scale data that the object was originally scaled with.
( Even when the extra flag is set to one so that the "scale of
the object is taken into account" the reported data is
nowhere near the original scaled data ).
Can somebody please supply me with a formula that can accurately
report back the TRUE X,Y and Z scale of an object?
I surely would be grateful for any help that you can give.
Thank you in advance.

The Creator
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 12th Oct 2012 22:23 Edited at: 12th Oct 2012 22:25
Do you mean the percentage of increase or decrease in size of an object?

When something is scaled, the scale is factor times a dimension. For example, if you built your object in a 3D modeling prog. and didn't adjust the scale in any way, the scale would be 1.0,1.0,1.0 . If you scaled the object up twice as large in say only the X direction, the scale would be 2.0,1.0,1.0 .

Is this the information you are after?

Enjoy your day.
Cyber 1
18
Years of Service
User Offline
Joined: 11th Feb 2008
Location:
Posted: 14th Oct 2012 05:17
Thanks for your interest. I will explain what I need.
A simple primitive is created and then cloned.
The clone object is randomly scaled and I want to find out
what scale the X,Y and Z axis lengths are now in the cloned object.
i.e. - The scale of the original object is 10000,10000,10000
but the new cloned object has been randomly scaled in
any of the 3 axis directions:
make object cube 1,50
scale object 1,10000,10000,10000
clone object 2,1
scale object 2,rnd(5000),rnd(5000),rnd(5000)
Now I need a formula to calculate what values have been chosen by
the random choice used for the 3 axis lengths.
The "object size" command for each axis returns a different value
than the scale command.
e.g. - scale object 2,rnd(5000),rnd(5000),rnd(5000)
(Let`s say X=2500, Y=1500 and Z=3500)
Now when the "object size" is used to get back length data
from any axis, the reported integer data is not the same
as the scaled data.
e.g. - sc1=(object size x (2,1)
sc2=(object size y (2,1)
sc3=(object size z (2,1)
Now the size data reported back is:
sc1=194 (X)
sc2=116 (Y)
sc3=272 (Z)
when the true scale size is X=2500, Y=1500 and Z=3500!!
So can somebody please supply a formula that can return the
true scale data as created by the "scale object" command?
Thanks for any help you can give.

The Creator
WickedX
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 14th Oct 2012 06:04

Login to post a reply

Server time is: 2026-07-07 17:31:55
Your offset time is: 2026-07-07 17:31:55