I think most of the people use SimpleUniverse. We don't really use
SimpleUniverse, but I think it provides methods to project points onto
the view plane.
I took a brief look at the documentation and I think getVworldToImagePlate
sets a Transform3D that can be used to project the points. (please correct
me if I'm wrong).
The rest of the code has worked for me.
public MyLOD(float Pratios[], SimpleUniverse universe /*or your universe*/){
super();
ratios = Pratios;
u = universe;
}
public void processStimulus(Enumeration criteria) {
Enumeration e = getAllSwitches();
//Project points and calculate ratio
/* Insert here methods appropriate to SimpleUniverse or whatever
* universe you are using. I think getVworldToImagePlate() will do that.
*/
//Choose which value to set
while((i < ratios.length) && (calcRatio > ratios[i]) )
i++;
// Set the Switches
while(e.hasMoreElements()){
Switch s = (Switch) e.nextElement();
s.setWhichChild(i);
}
wakeupOn(conditions);
}
-Enylton Machado Coelho
[EMAIL PROTECTED]
[ http://www.cc.gatech.edu/~machado ]
>Hi Machado.
>
>That was exactly what I was looking for. Unfortunately I am quite new to
>Java3D and don't know how to do the projection on the view plane.
>Am I asking too much if I ask for your code for processStimulus()?
>
> /Magnus
>
===========================================================================
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".