HI,
You need to create a Viewer object instead of creating a View......
Canvas3D canvas = new Canvas3D( config );
Viewer viewer = new Viewer( canvas );
ViewingPlatform vp = new ViewingPlatform();
viewer.setViewingPlatform( vp );
locale.addBranchGraph( vp );
Rgds
Paul
----------------------------------------------------------
Paul Byrne Email : [EMAIL PROTECTED]
Sun Microsystems Phone : (650) 786 9926
Visualization Software Group Fax : (650) 786 5852
----------------------------------------------------------
>MIME-Version: 1.0
>Date: Thu, 19 Apr 2001 13:48:33 -0700
>From: Kakollu Satyanarayana <[EMAIL PROTECTED]>
>Subject: Re: [JAVA3D] Help! How can I use ViewingPlatform?
>To: [EMAIL PROTECTED]
>
>i tried this kind of thing with no luck,
>
>so any postings will be helpful for me too
>cox
>--- "Kasparian, Raffi J." <[EMAIL PROTECTED]>
>wrote:
>> Help, please. What am I missing here? I have two
>> Views onto the same scene
>> graph so I'm not using SimpleUniverse. Now, I want
>> to take advantage of
>> Sun's OrbitBehavior which requires
>> ViewingPlatform.setViewPlatformBehavior(
>> OrbitBehavior ), so I'm adding a ViewingPlatform to
>> my Locale instead of a
>> BranchGroup. But It doesn't work (no rendering).
>>
>> boolean useViewingPlatform = false;
>> ViewPlatform vp1 = new ViewPlatform();
>> View v1 = new View();
>> v1.setPhysicalBody( new PhysicalBody() );
>> v1.setPhysicalEnvironment( new
>> PhysicalEnvironment() );
>> v1.attachViewPlatform( vp1 );
>> v1.addCanvas3D( c1 );
>> if( useViewingPlatform ) {//this doesn't
>> work
>> ViewingPlatform vingp = new
>> ViewingPlatform();
>> vingp.setViewPlatform( vp1 );
>> locale.addBranchGraph( vingp );
>> }else{ //this does work
>> BranchGroup vbg1 = new BranchGroup();
>> vbg1.addChild( vp1 );
>> locale.addBranchGraph( vbg1 );
>> }
>>
>> Thanks,
>>
>> 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".
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Auctions - buy the things you want at great prices
>http://auctions.yahoo.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".
===========================================================================
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".