Moving Worlds Java API

Moving Worlds Java API

History

  • Wed Apr 30 1996: First version( CyberPassage V2 alpha1 )
  • Wed May 29 1996: Most of MF* Const* classes are implemented.
  • Wed May 29 1996: Kinemation,Shape,Transform classes are moved to vs package.

  • O : Implemented
  • o : Without set1Value()method implemented.
  • T : Untested
  • N : NOP (Interface only)
  • X : Unimplemented (No interfaces)

    1 MW class


    [SF class]

        O SFBool.java          
    
        O  SFColor.java         
    
        O  SFFloat.java         
    
        N  SFImage.java         
    
        O  SFInt32.java         
    
        O  SFNode.java          
    
        O  SFRotation.java      
    
        O  SFString.java        
    
        O  SFTime.java          
    
        O  SFVec2f.java         
    
        O  SFVec3f.java         
    
    

    [MF class]

        o  MFColor.java         
    
        o  MFFloat.java         
    
        o  MFInt32.java         
    
        o  MFNode.java          
    
        o  MFRotation.java      
    
        o  MFString.java        
    
        o  MFVec2f.java         
    
        o  MFVec3f.java         
    
    

    [ConstSF class]

        O  ConstSFBool.java     	
    
        O  ConstSFColor.java    
    
        O  ConstSFFloat.java    
    
        O  ConstSFImage.java    
    
        O  ConstSFInt32.java    	
    
        O  ConstSFNode.java     	
    
        O  ConstSFRotation.java 	
    
        O  ConstSFString.java   
    
        O  ConstSFTime.java     
    
        O  ConstSFVec2f.java    
    
        O  ConstSFVec3f.java    
    
    

    [ConstMF class]

        O  ConstMFColor.java	
    
        O  ConstMFFloat.java	
    
        O  ConstMFInt32.java	
    
        O  ConstMFNode.java	
    
        O  ConstMFRotation.java	
    
        O  ConstMFString.java	
    
        O  ConstMFVec2f.java	
    
        O  ConstMFVec3f.java	
    
    

    2 Browser class

        O  public static native String getName () ;
    
        O  public static native String getVersion();
    
    
    
        N  public static native String getNavigationType();
    
        N  public static native void setNavigationType(String type) ;
    
        N  public static native float getNavigationSpeed();
    
        N  public static native void setNavigationSpeed(float speed);
    
    
    
        N  public static native float getCurrentSpeed();
    
    
    
        N  public static native float getNavigationScale();
    
        N  public static native void setNavigationScale(float scale);
    
    
    
        O  public static native boolean getHeadlight();
    
        O  public static native void setHeadlight(boolean onOff);
    
    
    
        O  public static native String getWorldURL();
    
        O  public static native void loadWorld(String [] url);
    
    
    
        N  public static native float getCurrentFrameRate();
    
    
    
        O  public static native Node createVrmlFromURL(String[] url) ;
    
        T  public static native Node createVrmlFromString(String vrmlSyntax) ;
    
    
    
        /* Following two are not in Moving Worlds spec. */
    
        O  public static native Node  getPerson();
    
        O  public static native String getLocalFile(String [] url);
    
    
    
      /*------------------------------------------------------------
    
        none static methods
    
      ------------------------------------------------------------*/
    
        N  public native void  addRoute(Node fromNode, String fromEventOut,
    
    				   Node toNode, String toEventIn) ;
    
        N  public native void  deleteRoute(Node fromNode, String fromEventOut,
    
    				      Node toNode, String toEventIn) ;
    
        N  public native void  bindBackground(Node background);
    
        N  public native void  unbindBackground();
    
        N  public native boolean  isBackgroundBound(Node background);
    
    
    
        N  public native void  bindNavigationInfo(Node navigationInfo);
    
        N  public native void  unbindNavigationInfo();
    
        N  public native boolean  isNavigationInfoBound(Node navigationInfo);
    
    
    
        N  public native void  bindViewpoint(Node viewpoint);
    
        N  public native void  unbindViewpoint();
    
        N  public native boolean  isViewpointBound(Node viewpoint);
    
    

    3 Transform class

    Not in Moving Worlds spec.This class is moved to vs package.

        /*************************************************
    
         * Node interface.
    
         *************************************************/
    
        N  public ConstField getValue(String fieldName);
    
        N  public void postEventIn(String eventName, Field eventValue);
    
    
    
        /*************************************************
    
         * high level functions.
    
         *************************************************/
    
        O  public float[] getTranslation();    /*  SFRotation local coordinate */
    
        O  public float[] getRotation();       /*  SFRotation local coordinate */
    
    
    
        O  public void translate(float T[], int mode);
    
        N  public void rotate(float R[], int mode);
    
        O  public void rotateAroundLine(float R[], P[], int mode);
    
        O  public void rotateDegree(float R[],int mode);
    
    
    
        O  public void rotateAroundLineDegree(float R[], float P[],int mode);
    
        O  public void rotateAroundBBoxCenterDegree(float R[], int mode);
    
    
    
        O  public float[] getWorldTranslation();
    
        N  public float[] getWorldRotation();
    
        O  public void worldTranslate(float T[],int mode)
    
    
    
        O  public void worldRotate(float R[],int mode);
    
        O  public void worldRotateAroundLine(float R[],float P[],int mode);
    
    
    
        O  public void worldRotateDegree(float R[],int mode);
    
        O  public void worldRotateAroundLineDegree(float R[],float P[],int mode);
    
        O  public void worldRotateAroundBBoxCenterDegree(float R[], int mode);
    
    

    4 Shape class

    Not in Moving Worlds spec.This class is moved to vs package.

        /*************************************************
    
         * Node interface.
    
         *************************************************/
    
        N  public ConstField getValue(String fieldName)
    
        N  public void postEventIn(String eventName, Field eventValue)
    
    
    
        O  public native float[] getColor (int whichcolor); 
    
        O  public native float getShininess ();
    
        O  public native float getTransparency ();
    
    
    
    
    
        // whichcolor = diffuse, emissive, specular. float[3]color 
    
        O  public native void setColor (int whichcolor, float[] color); 
    
        O  public native void setShininess (float shininess);
    
        O  public native void setTransparency (float transparency);
    
    
    
        /* Movie access (tmp implementation) */
    
        O  public native void play3DMovie();
    
        O  public native void pause3DMovie();
    
        O  public native void set3DMovieSpeed(float speed);
    
        O  public native float get3DMovieSpeed();
    
        O  public native int   get3DMovieFrame();
    
        O  public native int   get3DMovieFrameNum();
    
        O  public native void   set3DMovieFrame(int f);
    
        O  public native void set3DMovieNextFrame();
    
        O  public native void set3DMoviePrevFrame();
    
        // *** Texture access ***
    
    
    
        N  public native String[] getTextureFilename ();
    
        N  public native float getTextureFraction ();
    
        N  public native void setTextureFilename (String filename[]);
    
        N  public native float setTextureFraction (float fraction);
    
    
    
        // *** TextureTransform access methods may be necessary.
    
    
    
        N  public native void setAmbientIntensity (float intensity);
    
        N  public native float getAmbientIntensity ();  
    
    
    
        /* attributes */
    
        //need for toyworld but not specified on MW.
    
        N  public native void setComment (String objectname); 
    
        N  public native String getName ();  
    
        N  public native String getComment ();
    
    

    5 Kinemation(extends Transform) class

    Not in Moving Worlds spec.This class is moved to vs package.

        /*************************************************
    
         * high level functions.
    
         * native functions.
    
         *************************************************/
    
        O  public native void setFrame(int frame);
    
        O  public native void setNextPosture();
    
        O  public native void setPrevPosture();
    
        O  public native int getFrame();
    
        O  public native int getFrameNum();