Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLViewpointNodeType

All Superinterfaces:
FrameStateListener, VRMLBindableNodeType, VRMLChildNodeType, VRMLNode, VRMLNodeType
All Known Subinterfaces:
J3DViewpointNodeType, OGLViewpointNodeType

public interface VRMLViewpointNodeType
extends VRMLBindableNodeType

Base representation of a viewpoint node 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 int PROJECTION_ORTHO
           
static int PROJECTION_PERSPECTIVE
           
 
Method Summary
 float[] getCenterOfRotation()
          Get the center of rotation defined by this viewpoint.
 java.lang.String getDescription()
          Get the description string associated with this viewpoint.
 float getFieldOfView()
          Get the field of view used by this viewpoint.
 boolean getJump()
          Get the Jump field value of this viewpoint.
 int getProjectionType()
          Get the projection type.
 void setCenterOfRotation(float[] pos)
          Set the center of rotation of this viewpoint.
 void setDescription(java.lang.String desc)
          Set the description string of this viewpoint.
 void setJump(boolean jump)
          Set the jump field value of this viewpoint to the new value
 
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

PROJECTION_PERSPECTIVE

public static final int PROJECTION_PERSPECTIVE
See Also:
Constant Field Values

PROJECTION_ORTHO

public static final int PROJECTION_ORTHO
See Also:
Constant Field Values
Method Detail

getProjectionType

public int getProjectionType()
Get the projection type.

Returns:
The type of projection. One of the PROJECTION_ constants.

getFieldOfView

public float getFieldOfView()
Get the field of view used by this viewpoint. The value returned is an angle that is not less than zero and less than or equal to PI.

Returns:
The field of view used by this viewpoint

getCenterOfRotation

public float[] getCenterOfRotation()
Get the center of rotation defined by this viewpoint. The center of rotation is a point in space relative to the coordinate systems of this node.

Returns:
The position of the center of rotation

setCenterOfRotation

public void setCenterOfRotation(float[] pos)
                         throws InvalidFieldValueException
Set the center of rotation of this viewpoint. The center is a position in 3-space.

Parameters:
pos - The new position to use
Throws:
InvalidFieldValueException - The field used is not 3 values

getJump

public boolean getJump()
Get the Jump field value of this viewpoint.

Returns:
true if this viewpoint should jump to new positions

setJump

public void setJump(boolean jump)
Set the jump field value of this viewpoint to the new value

Parameters:
jump - True if the viewpoint should jump to ne positions

getDescription

public java.lang.String getDescription()
Get the description string associated with this viewpoint. If no description is set, this will return null.

Returns:
The description string of this viewpoint

setDescription

public void setDescription(java.lang.String desc)
Set the description string of this viewpoint. A zero length string or null will clear the currently set description.

Parameters:
desc - The new description to use

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium