Wrong volume bounding box
I'm using Xtk to make a widget to measure distances in a volume. In the
scene there are four object: a volume, two spheres an a cube. the cube is
placed at origin and the spheres are translated 30 units along X and Y
axis, each in opposite direction, as shown below:
https://docs.google.com/file/d/0B2oRl7iWfVvTaXAyckNTOC04RlE/edit?usp=sharing
The cube and the spheres are placed in the right position, but the problem
arises when the volume is included in the scene, changing the coordinate
system and translating the origin:
https://docs.google.com/file/d/0B2oRl7iWfVvTR3BJdk13Zm9BdTQ/edit?usp=sharing
resetBoundingBox() function is called right after render() but it makes no
difference. Even I have tried to add first the objects and then the volume
to the renderer with no result.
The spheres also can be dragged, and this feature is also affected by the
change of the corrdinate system because ath the moment of the beginning of
the movement of the sphere, this is translated respect to mouse position.
Why is the origin being translated? It seems the volume affects the scene
by nullifying resetBoundingBox().
No comments:
Post a Comment