Hi folks,
Another question regarding the use of interpolators to
move objects.
Basically, I have a process feeding me coordinate
position information (e.g. x0244 means move to
position 244 on the x axis). If the object is sitting
at x 200, I setup a PositionPathInterpolator with
knots = {0.0, 1.0} and positions at (200, y, z) and
(244, y, z). Here is the psuedo code
while (true)
get coordinate position
build alpha (a), knot[], position[]
build axisoftranslation Transform3D
build PositionPathInterpolator (PPI)
set PPI bounds
create behavior BranchGroup (bbg)
ALLOW_DETACH
bbg.addChild(PPI)
objectTransformGroup.addChild(bbg)
boolean moving = true
while (moving)
if (a.finished())
moving = false
bbg.detach
I am getting very strange results.
Typically, the first time through the main loop, the
object moves. After that it does not move anymore.
Here are a couple of my conclusions:
1) It looks like the Alpha object is NOT resetting
everytime. I checked using a.value() and after the
first iteration, the value is always 1. How do I
ensure that this is reset?? I am constructing these
objects each time through the loop ( a = new
Alpha(.....) and ppi = new
PositionPathInterpolator(....) )
2) Maybe there is something going on with the
PositionPathInterpolator. Should I attach the
BranchGroup to the object TransformGroup before I add
the PPI to the BranchGroup??? Or am I doing this
correctly to begin with????
3) Lastly, can someone explain/point me to docs that
explain SchedulingBounds???? I'm not sure I have a
good grasp of this concept and that may be causing
problems as well.
Many thanks
-Mark
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".