Kevin,

Thank you for addressing these issues, it takes time to read and answer
carefully and I appreciate Sun's and your attention to this message group.

2. Behaviors

Guaranteed order of behavior execution seems to me a very big shortcoming in
the Java3D API. The reason for the need is obvious: Behaviors that depend
closely on the results of other behaviors such as the positioning of objects
based on the current positions of other objects. I understand that you may
not be able to solve it for the most general case but I don't think anyone
expects you to do to that. I am not the only person who has had to write my
own replacement of the Behavior Scheduler to guarantee behavior ordering. It
wasn't that hard to do and it still allows for the normal unordered Java3D
behavior mechanism to handle other behaviors. It handles every-frame
behaviors and the behaviors only run when they are attached to a live
scenegraph (unless you set an option in that particular behavior).
Basically, all you do is subclass OrderableBehavior to define what it should
do and choose an int (level) reflecting when it should be performed. All
behaviors at level x will be performed before the behaviors at level x + 1.
There is no guaranteed ordering for behaviors within the same level. I think
Java3D should offer something like that as an option. I know that you (Sun)
could write something even better than I did but even my solution would be
an improvement over the current absence of a solution. If you'd like to see
the two small classes OrderableBehavior and BehaviorOrderer that I wrote to
implement ordered behaviors in my program let me know and I'll send them to
you.

Raffi

===========================================================================
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".

Reply via email to