Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLNavigationInfoNodeType

All Superinterfaces:
FrameStateListener, VRMLBindableNodeType, VRMLChildNodeType, VRMLNode, VRMLNodeType
All Known Subinterfaces:
OGLNavigationInfoNodeType

public interface VRMLNavigationInfoNodeType
extends VRMLBindableNodeType

Base representation of a node that provides navigation hints in the scene.

A viewpoint provides a place to examine the contents of the virtual world. Depending on the world type, the way of specifying a viewpoint's location and orientation may change. This base interface describes all of the common requirements for a viewpoint.

Version:
$Revision: 1.9 $
Author:
Alan Hudson, Justin Couch

Field Summary
static java.lang.String NAV_TYPE_ANY
          The navigation type is ANY
static java.lang.String NAV_TYPE_EXAMINE
          The navigation type is EXAMINE
static java.lang.String NAV_TYPE_FLY
          The navigation type is FLY
static java.lang.String NAV_TYPE_LOOKAT
          The navigation type is LOOKAT
static java.lang.String NAV_TYPE_NONE
          The navigation type is NONE
static java.lang.String NAV_TYPE_WALK
          The navigation type is WALK
static java.lang.String TRANSITION_TYPE_ANIMATE
          The transition type ANIMATE
static java.lang.String TRANSITION_TYPE_LINEAR
          The transition type LINEAR
static java.lang.String TRANSITION_TYPE_TELEPORT
          The transition type TELEPORT
 
Method Summary
 float[] getAvatarSize()
          Get the dimensions of the avatar in use.
 boolean getHeadlight()
          Get the status of the headlight that we are operating with.
 int getNumTypes()
          Get the number of valid navigation types in the result from getType().
 float getSpeed()
          Get the speed that we are currently moving at.
 java.lang.String[] getType()
          Get the list of navigation types that are to be used.
 float getVisibilityLimit()
          Get the visibility limit that we are currently operating at.
 void setAvatarSize(float[] size, int numValid)
          Set the dimensions of the avatar in use.
 void setHeadlight(boolean enable)
          Set the statte of the headlight to the new value.
 void setNavigationChangedListener(NavigationInfoChangeListener listener)
          Change the listener for navigation info changes.
 void setSpeed(float newSpeed)
          Set the speed to move at.
 void setType(java.lang.String[] types, int numValid)
          Set the navigation type to the new value(s).
 void setVisibilityLimit(float limit)
          Set the visibility limie to move at.
 void setWorldLocation(javax.vecmath.Vector3f wcpos)
          Sets the current position in world coordinates.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLBindableNodeType
addBindableNodeListener, getBindTime, getIsBound, removeBindableNodeListener, setBind, setOnStack
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, getFieldValue, getMetadataObject, getRefCount, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
 
Methods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
 
Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener
allEventsComplete
 

Field Detail

NAV_TYPE_ANY

public static final java.lang.String NAV_TYPE_ANY
The navigation type is ANY

See Also:
Constant Field Values

NAV_TYPE_WALK

public static final java.lang.String NAV_TYPE_WALK
The navigation type is WALK

See Also:
Constant Field Values

NAV_TYPE_EXAMINE

public static final java.lang.String NAV_TYPE_EXAMINE
The navigation type is EXAMINE

See Also:
Constant Field Values

NAV_TYPE_LOOKAT

public static final java.lang.String NAV_TYPE_LOOKAT
The navigation type is LOOKAT

See Also:
Constant Field Values

NAV_TYPE_FLY

public static final java.lang.String NAV_TYPE_FLY
The navigation type is FLY

See Also:
Constant Field Values

NAV_TYPE_NONE

public static final java.lang.String NAV_TYPE_NONE
The navigation type is NONE

See Also:
Constant Field Values

TRANSITION_TYPE_LINEAR

public static final java.lang.String TRANSITION_TYPE_LINEAR
The transition type LINEAR

See Also:
Constant Field Values

TRANSITION_TYPE_TELEPORT

public static final java.lang.String TRANSITION_TYPE_TELEPORT
The transition type TELEPORT

See Also:
Constant Field Values

TRANSITION_TYPE_ANIMATE

public static final java.lang.String TRANSITION_TYPE_ANIMATE
The transition type ANIMATE

See Also:
Constant Field Values
Method Detail

getType

public java.lang.String[] getType()
Get the list of navigation types that are to be used. It may contain some or all of the constants above. The array will always be non-null.

Returns:
The list of navigation types set

getNumTypes

public int getNumTypes()
Get the number of valid navigation types in the result from getType().

Returns:
The number of elements in getType().

setType

public void setType(java.lang.String[] types,
                    int numValid)
             throws InvalidFieldValueException
Set the navigation type to the new value(s). The array must be non-null. If the underlying implementation does not support any of the types requested, it shall default to the type NONE.

Parameters:
types - The list of types to now use in order of preference
numValid - number of valid items to use from the size array
Throws:
InvalidFieldValueException - The list was null or empty

getAvatarSize

public float[] getAvatarSize()
Get the dimensions of the avatar in use.

Returns:
A list of floats describing the dimension of the avatar.

setAvatarSize

public void setAvatarSize(float[] size,
                          int numValid)
                   throws InvalidFieldValueException
Set the dimensions of the avatar in use. The array must have at least three values in it as required by the specification.

Parameters:
size - The new size values to use
numValid - number of valid items to use from the size array
Throws:
InvalidFieldValueException - The array did not contain 3 values

getSpeed

public float getSpeed()
Get the speed that we are currently moving at.

Returns:
The current movement speed.

setSpeed

public void setSpeed(float newSpeed)
              throws InvalidFieldValueException
Set the speed to move at. The speed value must be non-negative.

Parameters:
newSpeed - The new speed value to use
Throws:
InvalidFieldValueException - The speed was negative

getVisibilityLimit

public float getVisibilityLimit()
Get the visibility limit that we are currently operating at.

Returns:
The current movement visibility limit.

setVisibilityLimit

public void setVisibilityLimit(float limit)
                        throws InvalidFieldValueException
Set the visibility limie to move at. The visibility limit value must be non-negative.

Parameters:
limit - The new visibility limit value to use
Throws:
InvalidFieldValueException - The visibility limit was negative

getHeadlight

public boolean getHeadlight()
Get the status of the headlight that we are operating with. A true value represents the headlight being on.

Returns:
true if the headlight is to be used

setHeadlight

public void setHeadlight(boolean enable)
Set the statte of the headlight to the new value.

Parameters:
enable - True if we are to use the headlight

setNavigationChangedListener

public void setNavigationChangedListener(NavigationInfoChangeListener listener)
Change the listener for navigation info changes. Specifying null disables updates until a non-null value is set.

Parameters:
listener - The new navigation info change listener

setWorldLocation

public void setWorldLocation(javax.vecmath.Vector3f wcpos)
Sets the current position in world coordinates.

Parameters:
wcpos - Location of the user in world coordinates(x,y,z)

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium