Zurück



import vrml.field.*;
import vrml.node.*;
import vrml.*;

public class hello_java extends vrml.node.Script
   {
   float[] rotation=new float[4];

   public void processEvent(Event e)
      {
      if (e.getName().equals("set_fraction")) 
         {
//System.out.println("silly debug message");
         rotation[0]=0.0f;
         rotation[1]=1.0f;
         rotation[2]=0.0f;
         rotation[3]=((ConstSFFloat)e.getValue()).getValue()
                     *2.0f*(float)Math.PI;
         SFRotation value_changed=(SFRotation)getEventOut("value_changed");
         value_changed.setValue(rotation);
         }
      }
   }


Zurück