Table of Contents Chapter Index Previous Slide Next Slide 437
A sample Java script

Writing program scripts with Java
A sample Java script
  • Initialization actions needed:
  • Get the value of the bounceHeight field
  • Get the value_changedObj eventOut object
  • public void initialize( )
    {
        SFFloat obj  = (SFFloat) getField( "bounceHeight" );
        bounceHeight = (float)   obj.getValue( );
        value_changedObj = (SFVec3f) getEventOut( "value_changed" );
    }