Try using ViewSpecificGroup and have 2 customer behaviors to set switch value under different ViewSpecificGroup.
Note that there is a bug in previous release (including v1.3.1 beta1)
4792478 - ArrayIndexOutOfBoundsException with two ViewSpecificGroups with Lights
which is fixed in upcoming v1.3.1 release.
- Kelvin ------------ Java 3D Team Sun Microsystems Inc.
Rob Nugent wrote:
Kelvin,
Thanks for the reply. I have a single WakeUpOnElapsedFrames(0) that I would much prfer to do this from. I've been experimenting, and I've come to the conclusion that what I want to do probably can't work. Here's the totality of what I'd like to be able to do:
1) From my processStimulus() be able to pick from my 'most detailed' geometry under the Switches owned by my DistanceLODs
2) Have each frame on each Canvas3D rendered using the DistanceLODs but with an 'enhancement' that makes them work 'properly'. At the moment, the DistanceLODs are documented as working based on distance from the *primary* ViewPlatform. Thus the scene as rendered from a second Canvas3D/ViewPlatform looks bizarre, with crude geometry being rendered when you don't want it to be.
To achieve 1) I set up some non-DistanceLOD Switches and tried throwing them then immediately doing my picks then throwing them back, but this just doesn't work. The picks pick the Shape3Ds under the 'old' value of the switches.
I came to the conclusion that it's not possible to achieve 1) or 2), or to address the similar problem that Billboards always face the *primary* ViewPlatform. I'm not that worried about 2), but 1) is really inhibiting me.
My guess was that Java3D is doing setup/recalculating bounds etc, based on Switch values, so my attempt to throw Switches and test for results immediately is doomed to failure.
I'd be interested if you had any advice as to how to address 1).
Thanks again, Rob
Kelvin Chung wrote:
Rob Nugent wrote:
I have a quick question:
Is it valid to change the child mask of a Switch from the preRender method of a Canvas3D ?
Yes.
If so, will the result show up in that frame ?
No. I should be next frame.
I'm thinking of writing something akin to DistanceLOD that will work for multiple Views/Canvas3Ds, and I wondered if this might be a valid approach.
It is highly recommend to set scenegraph attribute in Behavior callback instead of preRenderer()/postRenderer() if possible.
- Kelvin ------------ Java 3D Team Sun Microsystems Inc.
=========================================================================== 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".
--
Rob Nugent Sun Microsystems, Southampton, UK
[EMAIL PROTECTED]
Tel: +44 (0) 1489 585503 Fax: +44 (0) 1489 881363
=========================================================================== 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".
