Search   
 
 Home > Developers Domain > Java Methods

Java Methods

JAVA METHOD:

setActionID(i)

EXPLANATION:

This Java method will change the action currently being used by the applet, which will change direction, zoom in or out, pause animation or reset depending on which action you refer to. The parameter, i, refers to the number of the action you want to use.

EXAMPLE: 

 
    JavaScript: 

        <script language="JavaScript">
            <!--
            function jsSetAction(i)
            {
                document.applets["rubberneckapplet"].setActionID(i);
            }
            //-->

        </script>

    Parameters:

         <param name="numactions" value="5">
        <param name="action_1" value="ROTATE,30000,0,-360,0"> - Animate anti-clockwise 
 
        <param name="action_2" value="PAUSE,1"> - Pause Animation
 
        <param name="action_3" value="ROTATE,30000,0,360,0"> - Animate clockwise
 
        <param name="action_4" value="ROTATE,2000,0.5,0,0"> - Zoom in
 
        <param name="action_5" value="ROTATE,2000,-0.5,0,0"> - Zoom out

    Html:
  
   
Each of these buttons will refer to the action numbers as shown above:
      
<a href="javascript:jsSetAction(1);"><img border="0" src="tool1.jpg" alt="ROTATE LEFT"></a>
         <a href=
"javascript:jsSetAction(2);"><img border="0" src="tool2.jpg" alt="STOP"></a>
         <a href=
"javascript:jsSetAction(3);"><img border="0" src="tool3.jpg" alt="ROTATE RIGHT"></a>
         <a href=
"javascript:jsSetAction(4);"><img border="0" src="tool4.jpg" alt="ZOOM IN"></a>
         <a href=
"javascript:jsSetAction(5);"><img border="0" src="tool5.jpg" alt="ZOOM OUT"></a>

 

JAVA METHOD:

setRoom(i)

EXPLANATION:

This Java Method will load the specified room number into the Applet.

EXAMPLE: 

 
    JavaScript: 

        <script language="JavaScript">
           
<!--
            function jsLoadRoom(i)
            {
                document.applets["rubberneckapplet"].setRoom(parseInt(i));
            }
            //-->
        </script>

    Parameters:

        <param name="numrooms" value="2">
       
<param name="room_1_image" value="pano1.jpg">
        <param name="room_
2_image" value="pano2.jpg">

    Html:

    These buttons would load rooms 1 or 2 respectively.
        <a href=
"javascript:jsLoadRoom(1);"><img border="0" src="room1.jpg" alt="Load Room 2"></a>
        <a href=
"javascript:jsLoadRoom(2);"><img border="0" src="room2.jpg" alt="Load Room 1"></a>

JAVA METHOD:

setYaw(float yaw)

EXPLANATION:

This Java Method will change the yaw (horizontal view) in the Applet.

Note that this function will cancel actions in progress, however they will not respond while there is a script or a blockingAction running.

EXAMPLE: 

 
    JavaScript: 

        <script language="JavaScript">
           
<!--
            function jsSetYaw(yaw)
            {
                document.applets["rubberneckapplet"].setYaw(parseInt(yaw));
            }
            //-->
        </script>

    Parameters:

        <param name="numrooms" value="1">
       
<param name="room_1_image" value="pano1.jpg">
    Html:

    These links would change the view to look east and west when click on.
        <a href=
"javascript:jsSetYaw(90);">Look East (90 degrees)</a>
        <a href=
"javascript:jsSetYaw(-90);">Look West (-90 degrees)</a>

JAVA METHOD:

setPitch(float pitch)

EXPLANATION:

This Java Method will change the pitch (vertical view) in the Applet.

Note that this function will cancel actions in progress, however they will not respond while there is a script or a blockingAction running.

EXAMPLE: 

 
    JavaScript: 

        <script language="JavaScript">
           
<!--
            function jsSetPitch(pitch)
            {
                document.applets["rubberneckapplet"].setPitch(parseFloat(pitch));
            }
            //-->
        </script>

    Parameters:

        <param name="numrooms" value="1">
       
<param name="room_1_image" value="pano1.jpg">
    Html:

    These links would change the view to look up or down at 20 degrees.
        <a href=
"javascript:jsSetPitch(-20);">Look Down (-20 degrees)</a>
        <a href=
"javascript:jsSetPitch(20);">Look Up (20 degrees)</a>

JAVA METHOD:

setZoom(float zoom)

EXPLANATION:

This Java Method will change the zoom level in the Applet.

Note that this function will cancel actions in progress, however they will not respond while there is a script or a blockingAction running.

EXAMPLE: 

 
    JavaScript: 

        <script language="JavaScript">
           
<!--
            function jsSetZoom(zoom)
            {
                document.applets["rubberneckapplet"].setZoom(parseInt(zoom));
            }
            //-->
        </script>

    Parameters:

        <param name="numrooms" value="1">
       
<param name="room_1_image" value="pano1.jpg">
    Html:

    These buttons would load rooms 1 or 2 respectively.
        <a href=
"javascript:jsSetZoom(1);">Zoom Factor 2</a>
        <a href=
"javascript:jsSetZoom(2);">Zoom Factor of 1</a>

JAVA METHOD:

float getYaw()

EXPLANATION:

This Java Method will get the current yaw (horizontal view angle) from the Applet.

EXAMPLE: 

 
    JavaScript: 

        <script language="JavaScript">
           
<!--
            function jsGetYaw()
            {

               return ( document.applets["rubberneckapplet"].getYaw() );
            }
            //-->
        </script>

    Parameters:

        <param name="numrooms" value="1">
       
<param name="room_1_image" value="pano1.jpg">
    Html:

    This button will display the yaw value when clicked.
        <input type= "button" onClick=
"javascript:this.value=jsGetYaw();" >< br>
 

JAVA METHOD:

float getPitch()

EXPLANATION:

This Java Method will get the current pitch (vertical view angle) from the Applet.

EXAMPLE: 

 
    JavaScript: 

        <script language="JavaScript">
           
<!--
            function jsGetPitch()
            {
               return ( document.applets["rubberneckapplet"].getPitch() );
            }
            //-->
        </script>

    Parameters:

        <param name="numrooms" value="1">
       
<param name="room_1_image" value="pano1.jpg">
    Html:

    This button will display the pitch value when clicked.
        <input type= "button" onClick=
"javascript:this.value=jsGetPitch();" >< br>
 

JAVA METHOD:

float getZoom()

EXPLANATION:

This Java Method will get the current zoom factor from the Applet.

EXAMPLE: 

 
    JavaScript: 

        <script language="JavaScript">
           
<!--
            function jsGetZoom()
            {

               return ( document.applets["rubberneckapplet"].getZoom() );
            }
            //-->
        </script>

    Parameters:

        <param name="numrooms" value="1">
       
<param name="room_1_image" value="pano1.jpg">
    Html:

    This button will display the yaw value when clicked.
        <input type= "button" onClick=
"javascript:this.value=jsGetZoom();" >< br>
 

Copyright 360 Degrees Of Freedom ABN 56 055 222 118, 1996-2003
Web Site Terms of Use |  About This Site |  Privacy and Security Statement