Open GoogleCodeExporter opened 9 years ago
This bug is present in jME3.0beta / 18-jan-2012
Original comment by j.warmer...@gmail.com
on 18 Jan 2012 at 2:46
Original comment by normen667
on 2 Feb 2012 at 4:56
Original comment by normen667
on 2 Feb 2012 at 4:57
Original comment by ShadowIs...@gmail.com
on 26 Mar 2012 at 4:19
The issue occurs due to the BoundingBox class not supporting 0 extent in any of
the axes.
Original comment by ShadowIs...@gmail.com
on 2 Dec 2012 at 6:37
[deleted comment]
I think I have found the Bug, but I am not sure. Sorry if I had posted in the
wrong issue.
The Octree can only calculate the correct volume for cubes with the same length
on each side. For long boxes (e.g. a 2D-Box) the child bounds are simply wrong.
Class "Octnode", Line 76:
private BoundingBox getChildBound(int side){
float extent = bbox.getXExtent() * 0.5f;
Vector3f center = new Vector3f(bbox.getCenter().x + extent * extentMult[side].x,
bbox.getCenter().y + extent * extentMult[side].y,
bbox.getCenter().z + extent * extentMult[side].z);
return new BoundingBox(center, extent, extent, extent);
}
but this function should be like this:
private BoundingBox getChildBound(int side) {
float ex = bbox.getXExtent() * .5f;
float ey = bbox.getYExtent() * .5f;
float ez = bbox.getZExtent() * .5f;
Vector3f center = new Vector3f(
bbox.getCenter().x + ex * extentMult[side].x,
bbox.getCenter().y + ey * extentMult[side].y,
bbox.getCenter().z + ez * extentMult[side].z);
return new BoundingBox(center, ex, ey, ez);
}
If this is the wrong
Original comment by florianb...@googlemail.com
on 10 Mar 2014 at 10:08
Original issue reported on code.google.com by
j.warmer...@gmail.com
on 18 Jan 2012 at 2:45Attachments: