Posts: 205
Threads: 6
Joined: Oct 2012
19 Apr 13, 12:09AM
(This post was last modified: 19 Apr 13, 01:23AM by TheNihilanth.)
What are the dimension (size length and units) for a cube in AC?
Edit: I misspelled 'measurements' can't change thread title.
Posts: 2,387
Threads: 56
Joined: Aug 2010
Posts: 80
Threads: 1
Joined: Jul 2010
I'm just going to ballpark it and say about 25 centimeters.
Posts: 729
Threads: 16
Joined: Dec 2012
(19 Apr 13, 12:09AM)TheNihilanth Wrote: What are the dimension (size length and units) for a cube in AC?
Edit: I misspelled 'measurements' can't change thread title.
If you click Full Edit or hold down the mouse on the thread title, you can change it.
Posts: 3,462
Threads: 72
Joined: Jun 2010
uhhh, iirc 2 cubes ~1 foot. I forgot exactly though. There is a comment in the source about it.
You can full edit your original post to have a different title. Its right above the main text area.
Posts: 2,387
Threads: 56
Joined: Aug 2010
(19 Apr 13, 01:00AM)InitialSAW Wrote: about 25 centimeters
I bet on this value.
Posts: 3,462
Threads: 72
Joined: Jun 2010
19 Apr 13, 05:23PM
(This post was last modified: 19 Apr 13, 05:23PM by Ronald_Reagan.)
physics.cpp:353
const float CUBES_PER_METER = 4; // assumes 4 cubes make up 1 meter
I'm not exactly sure what you are asking, but this is the "real" conversion from cube to metric. The variable is only used once though, for physics calculations.
Posts: 205
Threads: 6
Joined: Oct 2012
19 Apr 13, 09:29PM
(This post was last modified: 19 Apr 13, 11:13PM by TheNihilanth.)
My mistake, I was referring to the length of a single cube in world space coordinates rather than screen space coordinates as in the figure below what's the distance between vertex1.y and vertex2.y
Edit: I think it's 32 units in length for a cube in world space coordinates since maximum mip is 5. But I'm not completely sure.
Any dev/non-dev can confirm this?
Posts: 2,387
Threads: 56
Joined: Aug 2010
19 Apr 13, 11:18PM
(This post was last modified: 19 Apr 13, 11:21PM by ExodusS.)
32 pixels or 35,25 cm?
(19 Apr 13, 09:29PM)TheNihilanth Wrote:
Why do you have 2 cursors and 1 crosshair on this pic?
Posts: 205
Threads: 6
Joined: Oct 2012
19 Apr 13, 11:43PM
(This post was last modified: 20 Apr 13, 12:10AM by TheNihilanth.)
(19 Apr 13, 11:18PM).ExodusS* Wrote: 32 pixels or 35,25 cm?
Simply 32 units, not necessarily pixel units. As in glVertex3f(x + 32.0f, .......) but again I'm not quite sure.
32,25 cm? What mapping function are you using? In any case it should be 25 cm since 4 cubes = 1meter as Ronald-Reagan pointed out.
(19 Apr 13, 11:18PM).ExodusS* Wrote: Why do you have 2 cursors and 1 crosshair on this pic?
Why not? :)
Posts: 1,318
Threads: 76
Joined: Apr 2011
I too have a slight problem to grab the 'measurements' of a virtual item, as far as I understand it while modelling it's that due to engine's physics it can be anything as long as it's a multiple of 4
Posts: 205
Threads: 6
Joined: Oct 2012
20 Apr 13, 06:33AM
(This post was last modified: 20 Apr 13, 06:37AM by TheNihilanth.)
Well I think I got it.
Let:
w be the point in world space,
M be the model view matrix,
N be the projection matrix,
R be the product of M*N,
v be a 2D point in view space,
w = inverse(R)*v
For the z-depth value I don't know, it could be anything...anyways implementing the above equation would give accurate results in order to get vertex positions of a cube and therefore to know its measures, but there should be another EVEN MORE easy way...