Hi all; I am trying to add an 'OrbitBehavior' to my scene. However, I am getting the below error message.
I am using the 'core ViewPlatform class': My scene's centroid is at x,y,z in the space. What I am doing is creating my viewplatform and moving it to point near to x,y,z so that I can view the object. That means I am using the "core javax.media.j3d.ViewPlatform class" instead of the "com.sun.j3d.utils.universe.ViewingPlatform utility" which allows me 'OrbitBehavior'. Is there a way adding the OrbitBehavior to my scene without using the com.sun.j3d.utils.universe.ViewingPlatform utility but using the core javax.media.j3d.ViewPlatform class. If there is no way, how can I move my viewplatform to the specified point with the specified rotation angle so that I can view my object? Can anybody help me about this problem? I also use Java3D 1.3 Beta. Thanks Murat ****************************************** //My code VirtualUniverse universe = new VirtualUniverse(); Locale locale = new Locale(universe); vp = new ViewPlatform(); view_group = new BranchGroup(); objRoot = new BranchGroup(); // add orbit behavior to the ViewingPlatform OrbitBehavior orbit = new OrbitBehavior(canvas3D, OrbitBehavior.REVERSE_ALL); BoundingSphere bounds = new BoundingSphere(p3d, radius); orbit.setSchedulingBounds(bounds); vp.setViewPlatformBehavior(orbit); ****************************************** //Error message Test.java:556: cannot resolve symbol symbol : method setViewPlatformBehavior (com.sun.j3d.utils.behaviors.vp.OrbitBehavior) location: class javax.media.j3d.ViewPlatform vp.setViewPlatformBehavior(orbit); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -deprecation for details. 1 error > You've fallen victim to an unfortunate and confusing naming convention between > the Java 3D core and utility packages. You're using the core ViewPlatform > class, but OrbitBehavior (and all subclasses of ViewPlatformBehavior) require > that you use the ViewingPlatform utility class instead. > > IOW, you don't need to use SimpleUniverse with OrbitBehavior, but you do need to > use the "com.sun.j3d.utils.universe.ViewingPlatform" utility instead of the > "core javax.media.j3d.ViewPlatform" class. ViewingPlatform is basically an > extension of BranchGroup that allows various things to be attached to it that > the utility classes need. > > -- Mark Hood =========================================================================== 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".