Hi
I think there is a misunderstanding in how the bounding leaf system works.
When you attach the same bounding leaf to the viewplatform, lights, and
behavior, it doesnt mean that they are all active inside that bounding leaf.
Rather, the boundingsphere is drawn around each of the three objects.
Behaviors and lights become active when their boundingleaf intersects the
boundingleaf of the viewplatform. I'm guessing that you are zooming out
beyond the influence of the lights but the behavior bounds still intersects
the viewplatforms
B.D.
>From: matthias sweertvaegher
><[EMAIL PROTECTED]>
>Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [JAVA3D] boundingleaf issue
>Date: Tue, 24 Jul 2001 13:31:18 +0200
>
>hello
>
>I do the following :
>- i add a boundingleaf to the platformgeom and set a orbitbehavior:
>
> iVpBoundingLeaf = new BoundingLeaf(new BoundingSphere(new
>Point3d(0.0,0.0,0.0),100.0));
> PlatformGeometry pg = new PlatformGeometry();
> pg.addChild(iVpBoundingLeaf);
> viewingPlatform.setPlatformGeometry(pg);
> OrbitBehavior orbitBehavior = new
>OrbitBehavior(canvas,OrbitBehavior.REVERSE_ALL);
> orbitBehavior.setSchedulingBoundingLeaf(iVpBoundingLeaf);
> orbitBehavior.setZoomFactor(50.0);
> viewingPlatform.setViewPlatformBehavior(orbitBehavior);
>
>- i construct a simpleuniverse with this viewplatform :
> Viewer viewer = new Viewer(canvas);
> viewer.getView().setBackClipDistance(10000.0);
> iSimpleUniverse = new SimpleUniverse(viewingPlatform,viewer);
> BranchGroup scene = createSceneGraph();
> iSimpleUniverse.addBranchGraph(scene);
>
>- i construct a directional light that has the boundingleaf as
>influencebounds
> and add it to the graph :
> DirectionalLight dirLight = new DirectionalLight(new
>Color3f(1.0f,1.0f,1.0f),new Vector3f(0.0f,-1.0f,0.0f));
> dirLight.setInfluencingBoundingLeaf(iVpBoundingLeaf);
> objRoot.addChild(dirLight);
>
>now the problem is :
>When i zoom to far out the light suddenly is deactivated (so no
>intersection with bounds).
>When i give the boundingleaf a greater radius i can zoom out more.
>This shouldn't be so , since the boundingleaf is attached to the platfgeom,
>isn't it?
>It also doesn't make sense since i can still zoom out and in when the
>lights are off but
>the lights and the orbitbehavior use the same boundingleaf! so when the
>lights deactivate,
>I shouldn't be able anymore to zoom back so that they activate.
>
>does someone know what I am doing wrong?
>
>greetings,
>mattie
>
>===========================================================================
>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/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".