Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLDragSensorNodeType

All Superinterfaces:
FrameStateListener, VRMLChildNodeType, VRMLNode, VRMLNodeType, VRMLPointingDeviceSensorNodeType, VRMLSensorNodeType
All Known Implementing Classes:
BaseDragSensorNode

public interface VRMLDragSensorNodeType
extends VRMLPointingDeviceSensorNodeType

A sensor that is driven by pointing device dragging.

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

Method Summary
 boolean getAutoOffset()
          Get the current state of the autoOffset field.
 java.lang.String getDescription()
          Get the current state of the description field.
 void notifySensorDragChange(float[] position, float[] direction)
          Notify the drag sensor that a sensor is currently dragging this device and that it's position and orientation are as given.
 void notifySensorDragEnd(float[] position, float[] direction)
          Notification that this sensor has finished a drag action.
 void notifySensorDragStart(float[] hitPoint, float[] position)
          Notification that this sensor has just been clicked on to start a drag action.
 void setAutoOffset(boolean state)
          Set a new value for the autoOffset field.
 void setDescription(java.lang.String desc)
          Set a new value for the description field.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLPointingDeviceSensorNodeType
getIsOver, requiresPointOnly, setIsOver
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLSensorNodeType
getEnabled, getIsActive, setEnabled
 
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
 

Method Detail

setAutoOffset

public void setAutoOffset(boolean state)
Set a new value for the autoOffset field.

Parameters:
state - The new value for AutoOffset

getAutoOffset

public boolean getAutoOffset()
Get the current state of the autoOffset field. The default value is true.

Returns:
The current value of autoOffset

setDescription

public void setDescription(java.lang.String desc)
Set a new value for the description field.

Specified by:
setDescription in interface VRMLPointingDeviceSensorNodeType
Parameters:
desc - The new value for the description field

getDescription

public java.lang.String getDescription()
Get the current state of the description field.

Specified by:
getDescription in interface VRMLPointingDeviceSensorNodeType
Returns:
The current value of description

notifySensorDragStart

public void notifySensorDragStart(float[] hitPoint,
                                  float[] position)
Notification that this sensor has just been clicked on to start a drag action.

Parameters:
hitPoint - Intersection between the sensor and the device geometry in local coordinate system origin
position - Where the sensor origin is in local coordinates

notifySensorDragChange

public void notifySensorDragChange(float[] position,
                                   float[] direction)
Notify the drag sensor that a sensor is currently dragging this device and that it's position and orientation are as given.

Parameters:
position - Where the sensor origin is in local coordinates
direction - Vector showing the direction the sensor is pointing

notifySensorDragEnd

public void notifySensorDragEnd(float[] position,
                                float[] direction)
Notification that this sensor has finished a drag action.

Parameters:
position - Where the sensor origin is in local coordinates
direction - Vector showing the direction the sensor is pointing

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium