I'm trying to move one of the geometry objects in a branch group with a
ScrollBar.
I've done the following for the TransformGroup containing the object:
oofst = new Transform3D();
oofst.setTranslation(new Vector3d(0.0,sliderValue,
0.0));
tg1.setTransform(oofst);
Where sliderValue is a double variable that is changed when I Adjust the
ScrollBar:
public void adjustmentValueChanged(AdjustmentEvent e)
{
sliderValue = sl1.getValue();
System.out.println(sliderValue);
}
I've added the println statement to be sure my variable is changing, and
it is working corectly.
Why doesn't my object move? Is it due to the BranchGroup being compiled?
Even if I comment out the branchGroup.compile(); statement I still get
no movement.
If I reset the scene after moving the ScrollBar (reset button & method),
the object takes a new position, but is still not dynamic.
How can I set my sliderValue variable "live" at runtime within my
BranchGraph?
Don Casteel
Manufacturing Engineer
TEXTRON Automotive Company -- Athens Operations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Voice: (423)744-1109
Fax: (423)744-1112
Pager: (423)744-1129 -- 109
Internet: [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/