Hi,
Oops. it looks like the TG with the cube added is not added to the
scenegraph.
You have to call su.getViewingPlatform().getViewPlatformTransform() when
you declare TGson1 instead of the constructor.

Reagrads.
Thomas

Thomas Bendig 
[EMAIL PROTECTED]
Fraunhofer-Institut f�r Rechnerarchitektur und Softwaretechnik, FIRST
Visualisierungssysteme, Technologie und Anwendung, ViSTA

 
 

> -----Urspr�ngliche Nachricht-----
> Von: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]
> Im Auftrag von Thomas Gilbert Giusepe
> Gesendet: Mittwoch, 24. Oktober 2001 11:21
> An: [EMAIL PROTECTED]
> Betreff: [JAVA3D] Camera translation and object
> 
> Hi there,
> 
> Foremost, I am sorry if my question could be so basic for the j3d
forum
> discussion list.
> 
> I am working around on how to put together a 3d object that follows
the
> camera view whereever it takes. My camera moving is set up by keyboard
> behavior. My problem is, that the 3Dobject aparently doesn't appear in
the
> scenegraphic. I have applied:
> 
> TG1 - TG2 - box
> |__________VP
> 
> due the following properties:
> BranchGroup myBGCamera = new BranchGroup();
> 
> TransformGroup TGfather = null;
> TransformGroup TGson1 = new TransformGroup();;
> TransformGroup TGson2 = new TransformGroup();
> 
> TGson2.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
> TGson2.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
> 
> translate2.set( 0.0f, -0.5f, 0.0f);
> T3D2.setTranslation(translate2);
> TGson2.setTransform(T3D2);
> TGson1.addChild(TGson2);
> 
> Shape3D myS3d=new ColorCube(0.5);
> TGson2.addChild(myS3d);
> 
> translate.set( 0.0f, 0.0f, 0.0f);
> T3D.setTranslation(translate);
> TGson1.setTransform(T3D);
> 
> TGson1 = su.getViewingPlatform().getViewPlatformTransform();

The TGSon1 defined and used above is lost here!

> KeyNavigatorBehavior keyNavBeh = new KeyNavigatorBehavior(TGson1);
> TGfather.addChild(keyNavBeh);
> 
> su.getViewingPlatform().setNominalViewingTransform();
> myBGCamera.addChild(TGfather);
> 
> Really I compile and run the program without problems. I visualize the
> Simple Universe Scene, with all its contents. Just, the 3D colorcube
could
> not be see.
> 
> Thnx in advance.
> 
> Best wishes,
> Thomas
> 
> _________________________________________________________________
> Downloaden Sie MSN Explorer kostenlos unter
> http://explorer.msn.de/intl.asp
> 
>
========================================================================
==
> =
> 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