thanks for your reply. yes, i get your point, doing a direct manipulation
through a Transform3D acting on the specific TransformGroup of a given
particle is certainly faster. especially if you present every particle as
a single point. as you say then one just updates the translational
component of the TransformGroup.

still, i am not sure how to do this if you do not represent your particle
as a point, but have all your particles connected in a graph-like
(or bond-like) manner using pair-wise LineArray's. since your
Shape3d is now a line, i think one would need to separately rotate,
translate and possibly scale the line. or am i missing the point? the way
i solved this for now is to replace the original Shape3D with the new one
containing a line that represents the next positions. this is faster than
replacing the complete BranchGroup, but still rather slow. Is there be a
faster way to rotate, translate and scale a given LineArray, possibly
through a Transform3D, which would do the complete operation automatically?

thanks
m

On Mon, 25 Aug 2003, Lewis Walker wrote:

> You just want to perform animation by moving the particle, is that
> correct?
> That's what TransformGroups are for. A TransformGroup specifies the
> position, rotation etc. of its children. So just parent your particle
> with a TransformGroup, and for every frame, set the translation
> component of the Transform3D of the TransformGroup equal to the new
> position read in from your file.
>
> That is how animation is intended. Effectively changing the structure of
> the Scene Graph each frame is VERY expensive, and should be avoided!
>
> Lewis.
>
> -----Original Message-----
> From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED] On Behalf Of Mika Kastenholz
> Sent: 25 August 2003 09:26
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] fast SceneGraph update?
>
>
> what is the fastest way to update a SceneGraph?
>
> imagine reading in particle position frames from a coordinate file and
> displaying them as balls or connected lines so as to obtain a continuous
> trajectory. the scene itself should be able to allow for rotation and
> translation while updating the positions.
>
> currently, i am simply creating a new BranchGroup with the new positions
> and using the setChild() method to replace the old BranchGroup. this
> works, is however very slow once you need to traverse through a number
> of Nodes/TransformGroups/BranchGroups by using the getChild() method. in
> addition, the rotation/translation gets jerky even though everything
> runs as a separate thread. is there a faster way of doing this?
>
> thanks in advance
> m
>
> ========================================================================
> ===
> 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".
>
> ===========================================================================
> 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".
>

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