
|
Java Controls
The problem is devising a java control element that can be used to position a limb by moving it at a joint. Specifying this in terms of a vector and an angle around the vector as in VRML2 is hardly intuitive. It is easier to see it as having 2 degrees of freedom(DOF) to start with. The limb is pointed in a direction by specifying two angles and then adding a twist once it has been positioned. A full circle around one axis and a half circle around another is sufficient to point the limb - think of it as a vector from the centre of the earth to a point on the surface being specified as a longitude(full circle) and a latitude(half circle). A control for this type of positioning can be implemented by a joystick-like control for the 2DOF motion and a slider for the twist.
The Slider3D control implements a 3DOF control - a 2DOF on top and a 1DOF below. The Slider2D control on top implements a joystick-like interface. The control below it is a special case of Slider2D with only one dimension. The position of the slider is changed by dragging it with the mouse. The colour of the slider changes when it is grabbed to indicate that it is ready for dragging. The small triangles are detents indicating standard positions. Clicking on one quickly sets the slider to that position. The control generates events when the sliders are moved - by dragging or by clicking on a detent. The three positions for the control can then be read. The positions are returned as floats between -1 and 1. Some of the joints in the human body have a twin on the other side of the body. It is handy to have a twin control to control both joints. You may even want to move the joints in unison but reflected across the axis of the body. This is where the DualSlider3D comes in.
It is a combination of two Slider3D controls alongside each other. It has a title for the joint name. The controls move in mirror-fashion - the right side is a reflection of the left. The Sync checkbox, when checked, moves both controls in unison when either one is manipulated.
|

















