Closed GoogleCodeExporter closed 9 years ago
The transform of the model contains the bounding box information. You can grab
it like so:
model.root.boundingBox
with root being the root transform. You can also traverse the transform tree if
you wanted to get more specific bounding boxes.
Original comment by khang.du...@gmail.com
on 9 May 2011 at 4:51
The model.root.boundingBox object is not accurate and contains extents of
[-1,-1,-1] rather than the correct values. I have a unit test that reproduces
that problem for you to see. I am just waiting for approval from John to commit
it.
Original comment by raj...@gmail.com
on 17 May 2011 at 12:28
[deleted comment]
I put the unit tests online.
http://dev/kuda/public/unit_tests/
look at the failures to in test 5 to see what I cam talking about. I will
commit the unit tests when I get the go-ahead from John P
Original comment by raj...@gmail.com
on 17 May 2011 at 2:37
I added the function getBoundingBox() to the hemi.model.Model class and I
committed it. This satisfies what I need. I will leave this open because of
the issue of the [-1,-1,-1] extents, but I will lower the Priority
Original comment by raj...@gmail.com
on 19 May 2011 at 12:58
The current getBoundingBox for Model does not return an accurate bounding box.
It accounts for all of the geometry, but not the transform matrices which can
alter the rendered geometry radically.
To see the problem, add this line of code to unit1.js at line 75:
hemi.curve.showBoxes([[boundingBox.minExtent, boundingBox.maxExtent]]);
The wireframe of the bounding box does not match the house model. I'm currently
working on fixing the bounds calculations.
Original comment by erik.kit...@gmail.com
on 19 May 2011 at 8:54
Bounding box calculations fixed. This is the summary of changes:
Updated BoundingBoxes created by add() or mul() to inherit the valid property
of its parent(s). Fixed bounding box calculations performed by Transforms and
Shapes. Now force a Model's Transform bounding boxes to be recalculated when
the Model is done
loading. Updated Model's getBoundingBox function to use correctly calculated
value.
Original comment by erik.kit...@gmail.com
on 20 May 2011 at 4:15
Excellent Thanks!
Original comment by raj...@gmail.com
on 20 May 2011 at 1:03
Original comment by raj...@gmail.com
on 20 May 2011 at 1:04
Original issue reported on code.google.com by
raj...@gmail.com
on 9 May 2011 at 3:20