Cube length passed to gl functions
#1
What are the dimension (size length and units) for a cube in AC?

Edit: I misspelled 'measurements' can't change thread title.
Thanks given by:
#2
32x32 pixels?
Thanks given by:
#3
I'm just going to ballpark it and say about 25 centimeters.
Thanks given by:
#4
(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.
Thanks given by:
#5
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.
Thanks given by:
#6
(19 Apr 13, 01:00AM)InitialSAW Wrote: about 25 centimeters

I bet on this value.
Thanks given by:
#7
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.
Thanks given by:
#8
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
[Image: Fb9uAKG.png]

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?
Thanks given by:
#9

32 pixels or 35,25 cm?

(19 Apr 13, 09:29PM)TheNihilanth Wrote: [Image: Fb9uAKG.png]

Why do you have 2 cursors and 1 crosshair on this pic?
Thanks given by:
#10
(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? :)
Thanks given by:
#11
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

[Image: image2hi.jpg]
Thanks given by:
#12
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...
Thanks given by: