Hi, all:
Question again.
After loading a Scene, I would like to know the loaded object’s absolute height at the very first loading without any further transform yet.
How to do that?
int flags = ObjectFile.TRIANGULATE | ObjectFile.STRIPIFY | ObjectFile.RESIZE;
ObjectFile f = new ObjectFile(flags, 0.0f);
m_S = null;
try {
m_S = f.load(fname);
} catch (FileNotFoundException e)
{
...
}
m_BGFace = m_S.getSceneGroup();
m_Object3d = (Shape3D)m_BGFace.getChild(0);
Bounds m_ObjBounds = m_Object3d.getBounds();
// Now, I would like to obtain the current size (better in 3 dimensions) of m_Obj3D !!
It seems “.obj” file is stored in a specific format that, the longest dimension is used to normalize the loaded object.
Say, in may case, my .obj is stored in the way that:
since from the top to bottom, the object is longest, longer than the size from left side to right side,
and longer than the size from the front to the back, so, the very top line of the object has the coordinate (y_top = 1.0)
and the very bottom line of the object has the coordinate (y_bottom = -1.0)
However, the size (1.0-(-1.0)=2.0) is corresponding to how many pixels on the screen?
This seems to have nothing to do with getLocalToVworld(), right?
Seriously urgent. Please do help.
Best Regards
JIA