Hi Ali, I think your approach is somewhat wrong. You should'nt add interpolators at runtime, instead add them at construction time in well defined places, and at runtime you just activate or deactivate them according to your logic.
Now, if I'm looking at the TransparencyInterpolator I think that what you want to do doesn't need the parent of a Shape3D, but instead the TransparecyAttributes of it's Appearance. What I'll do in your place, is to create for each object / group of objects that should be animated, it's own Appearance object, with a stock TransparencyAttribute. I'll create one single TransparencyInterpolator which I'll add to the main BranchGroup in deactivated state. That Interpolator should be created on a specific TransparencyAttributes object. When you want to animate a Shape3D, you just replace the default TransparencyAttribute with the Interpolator's one and start the Interpolator. That way you don't need EVER access to the structure of your scene, you only change the attributes. Cheers, Florin -----Ursprüngliche Nachricht----- Von: Ali Murat Tanyer [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 20. Dezember 2002 13:07 An: [EMAIL PROTECTED] Betreff: [JAVA3D] Is this possible? [Re: help needed urgetly] Dear all, I don't know whether this problem is too difficult to resolve. I sent several messages to the list but couldn't get a response to help me. What I am trying to do is adding a TranparencyInterpolator to the parent of a Shape3D object during the runtime so that I would have the animation of my current scene. Therefore I am trying to access to the parent of a Shape3D object during the run time. However, I am getting the exception: "Cannot get the parent of a live or compiled node". I can only add the TranparencyInterpolator during the run time because the user should determine the Alpha value during the run time. My questions are: 1) How can I access to the parent of a Shape3D object during the run time? 2) If I add TransparencyInterpolator to the parent of my Shape3D object (which is a TransformationGroup) during the run time, do you expect that I would get an animation of my compiled scene? Thanks for any help ------------------- > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi > Looking at the javadoc, a shape3d inherits from Node, node has a getParent > method, but the javadoc also states that it is only valid during scene graph > construction, after that it will throw the Restricted access exception, > according to the javadoc i have this was the case in both j3d 1.2.1 and j3d 1.3. > I don't suppose thats what you wanted to hear, as for the ALLOW_PARENT_READ > capability, I did a google search and only got 1 single match, and that was from > a mail sent to this list on the 16th of december, so i'm not sure it even exists. > > HTH > > Jeremy > > - -- > > PGP key is here -> http://www.computerbooth.com/pgp.html > > * If debugging is the process of removing bugs, then programming must be the > process of putting them in. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQE+AtSpkkWXI7JvucARAoelAKCdALmb8XFjfNjzTZQ90d2m3eLPPACgxC7z > b1EncvMnoNCOwI7HjQS5kF0= > =jpjK > -----END PGP SIGNATURE----- > > ====================================================================== ===== > 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".