|
The only
solution I found to this problem was to use a
Transform3D. The following code
snippet is from a program
that draws a box with a hinged lid. The rotation axis of the
lid
is parallel to the x axis
but passes through y = 1, so I used an AxisAngle4f to create
the horizontal axis and then
combined this with a translation to get the axis where it's
needed:
AxisAngle4f
angle = new AxisAngle4f(0.0f, 0.0f, 1.0f,
(float)Math.PI/2.0f);
Transform3D rotAxis = new Transform3D(); rotAxis.set(angle); rotAxis.setTranslation(new Vector3d(0.0, 1.0, 0.0)); But I agree, it would be nice
to able to do the whole thing at once.
|
