Hi
>a) I want to add animation to the objects separatly, such as
> >Interpolators. For RotationInterpolator's, they can be added to a >single
>object adding it to its parent TG. But the rotation is always >done around
>the origin. Is there any way to rotate them around an >arbitrary point

You can rotate it about an arbitrary axis. One of RotationInterpolator's
constructors:

  RotationInterpolator(Alpha alpha, TransformGroup target, Transform3D
axisOfRotation, float minimumAngle, float maximumAngle)

The default axisOfRotation is about the global y-axis (i believe) so you
specify a transform3D to apply to the y-axis to generate your new axis of
rotation.

>I want to add a PositionInterpolator to every object (to mo¡ve it from >out
>of the scene to its position).. This works fine, but the objects >move all
>at the same time. I want them to enter in the 'scene' one >after another
>(f.ex. an object enters and arrives to its position, >afterwards the
>following objects does the same).
>How can I implement this ? Do I have to manipulate Alpha parameters ? >How
>?

You can specify different triggerTimes for each Alpha. As taken from the API
documentation :-) :

triggerTime -- This is the time in milliseconds since the system start time
that this object first triggers. If (startTime + triggerTime >= currentTime)
then the Alpha object is started as soon as possible by the system.

You use Alpha.setTriggerTime(long triggerTime) to set it. Just set different
ones for each alpha to stagger the rate at which your objects enter the
scene.
Another way to do it would be to create a new Behavior. It measures the
positions of each of your objects. You can have it wake up whenever an
object reaches the position you want. When it wakes up, it enables the next
PositionInterpolator and goes back to sleep, etc. etc. The advantage of this
is that later on, if you decide you want the objects to take more
complicated paths, perhaps not stopping when they reach the position where
the next object needs to start, you won't need to go back and do a lot of
math to determine what your triggerTime should be, especially if the Alpha
isn't a linear function of time.

-B.D.


>From: Daniel Moscoso <[EMAIL PROTECTED]>
>Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [JAVA3D] Loading animation behaviour from 3ds files
>Date: Thu, 28 Jun 2001 13:52:15 +0100
>
>Thanks for your answer. So I have two more questions:
>
>I currently use Starfire 3DS loader. It builds the scenegraph like this
>(for a 3ds model composed by multiple objects):
>
>                     BG   (Main model BranchGroup)
>                     |
>                              / | \
>                            /   |   \
>                          /     |     \
>                        /       |       \
>                      /         |         \
>                    /           |           \
>                BG1     BG2     BG3       ...            (For every object)
>                   | |             |
>                   | |             |
>                   | |             |
>                TG1     TG2     TG3
>                   | |             |
>                   | |             |
>                   | |             |
>                 S1        S2         S3            (Shape3D's containing
>geometry / appearance of every object.
>
>a) I want to add animation to the objects separatly, such as Interpolators.
>For RotationInterpolator's, they can be added to a single object adding it
>to its parent TG. But the rotation is always done around the origin. Is
>there any way to rotate them around an arbitrary point ?
>
>b) The position where every object is located can be calculated like this:
>For every BG1, BG2, etc:
>
>           BoundingSphere bounds = BG1.getBounds();
>           double radius = bounds.getRadius();
>           Point3d center = bounds.getCenter();          // Gves the center
>of the sub-object.
>
>I want to add a PositionInterpolator to every object (to mo¡ve it from out
>of the scene to its position).. This works fine, but the objects move all
>at the same time. I want them to enter in the 'scene' one after another
>(f.ex. an object enters and arrives to its position, afterwards the
>following objects does the same).
>How can I implement this ? Do I have to manipulate Alpha parameters ? How ?
>
>Thanks in advanced !!
>
>-----------------------------------------------------------------------------------------------------
>
>I am pretty sure that there is currently no loader capable of loading
>animations. The problem lies in documentation of the different animation
>formats as well as the fact that Java3D really has no simple way of
>animating a model like in 3D Studio or any of the other animators. The
>RotationInterpolators rotate the entire model; to duplicate the effects of
>an animated character you would need to break the model apart down to
>individual body parts and specify animations for each of those. And since
>only one Interpolator can target a TransformGroup, the hierarchy of
>transformgroups needed for just one character would be impossible for a
>loader to generate. If you want animations for your programs you will
>probably have to implement your own keyframe or skeletal animation system.
>
>
>-B.D.
>
>P.S. There are also people working on integrating Java3D and VRML. Check
>out
>the Web3D home page at http://www.web3d.org/
>
> >From: Daniel Moscoso <[EMAIL PROTECTED]>
> >Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: [JAVA3D] Loading animation behaviour from 3ds files
> >Date: Wed, 27 Jun 2001 19:11:59 +0100
> >
> >Hi all !
> >
> >I've been testing the 3ds model loading using 3DS loaders. I have still a
> >question: 3ds format is a model format, but a 3ds model can be created by
> >3d Studio with animation behaviour. I think that VRML files can also be
> >created with animation behaviour (I believe).
> >
> >I have not tested it yet, but is any loader able to load animation
> >behaviour of these files (3ds or wrl), and maybe convert this behaviour
>in
> >interpolators (Rotation/TranslationInterpolator, for example ? Has
>anybody
> >been testing this ?
> >
> >Thanks in advanced !!
> >
> >Dani
> >
> >
> >--
> >
> >Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> >Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
>E-Mail
> >irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
> >vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
> >Weitergabe dieser Mail ist nicht gestattet.
> >
> >This e-mail may contain confidential and/or privileged information. If
>you
> >are not the intended recipient (or have received this e-mail in error)
> >please notify the sender immediately and destroy this e-mail. Any
> >unauthorised copying, disclosure or distribution of the material in this
> >e-mail is strictly forbidden.
> >
> >==========================================================================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".
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.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".
>
>
>
>
>
>--
>
>Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
>Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
>irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
>vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
>Weitergabe dieser Mail ist nicht gestattet.
>
>This e-mail may contain confidential and/or privileged information. If you
>are not the intended recipient (or have received this e-mail in error)
>please notify the sender immediately and destroy this e-mail. Any
>unauthorised copying, disclosure or distribution of the material in this
>e-mail is strictly forbidden.
>==========================================================================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".

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.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".

Reply via email to