com.hedgehog.x3d.sensor
Class CylinderSensorNode

java.lang.Object
  extended by com.hedgehog.HObject
      extended by com.hedgehog.x3d.nodes.X3DNode
          extended by com.hedgehog.x3d.nodes.X3DChildNode
              extended by com.hedgehog.x3d.sensor.X3DSensorNode
                  extended by com.hedgehog.x3d.sensor.X3DPointingDeviceSensorNode
                      extended by com.hedgehog.x3d.sensor.X3DDragSensorNode
                          extended by com.hedgehog.x3d.sensor.CylinderSensorNode
All Implemented Interfaces:
java.lang.Comparable, java.util.Comparator

public class CylinderSensorNode
extends X3DDragSensorNode

Title: CylinderSensorNode - represents the X3D CylinderSensor node.

Description: Represents the X3D CylinderSensor node.

Copyright: Copyright (c) Hedgehog Software.

Company: Hedgehog Software.

Since:
1.2
Version:
1.2

Field Summary
protected  SFRotation mAxisRotation
          Axis of rotation.
protected  SFFloat mDiskAngle
          Maximum position.
protected  SFFloat mMaxAngle
          Maximum angle.
protected  SFFloat mMinAngle
          Minimum angle.
protected  SFFloat mOffset
          Offset.
 
Fields inherited from class com.hedgehog.x3d.sensor.X3DDragSensorNode
mAutoOffset
 
Fields inherited from class com.hedgehog.x3d.sensor.X3DPointingDeviceSensorNode
mDescription, mEnabled
 
Fields inherited from class com.hedgehog.x3d.nodes.X3DNode
mDefine, mMetadata
 
Fields inherited from class com.hedgehog.HObject
mID, mName
 
Constructor Summary
CylinderSensorNode()
          Default constructor.
CylinderSensorNode(CylinderSensorNode object)
          Copy constructor.
CylinderSensorNode(SFString description, SFBool enabled, SFBool autoOffset, SFRotation axisRotation, SFFloat diskAngle, SFFloat maxAngle, SFFloat minAngle, SFFloat offset)
          Constructor.
 
Method Summary
 SFRotation getAxisRotation()
          Returns the axis of rotation.
 SFFloat getDiskAngle()
          Returns the disk angle.
 SFFloat getMaxAngle()
          Returns the maximum angle.
 SFFloat getMinAngle()
          Returns the minimum angle.
 SFFloat getOffset()
          Returns the offset.
 void setAxisRotation(SFRotation axisRotation)
          sets the axis rotation.
 void setDiskAngle(SFFloat diskAngle)
          Sets the disk angle.
 void setMaxAngle(SFFloat maxAngle)
          Sets the maximum angle.
 void setMinAngle(SFFloat minAngle)
          Sets the minimum angle.
 void setOffset(SFFloat offset)
          Sets the offset.
 org.w3c.dom.Element toXMLNode(org.w3c.dom.Document document, org.w3c.dom.Element documentRootNode)
          Converts this X3D node to an XML node.
 
Methods inherited from class com.hedgehog.x3d.sensor.X3DDragSensorNode
getAutoOffset, setAutoOffset
 
Methods inherited from class com.hedgehog.x3d.sensor.X3DPointingDeviceSensorNode
getDescription, getEnabled, setDescription, setEnabled
 
Methods inherited from class com.hedgehog.x3d.nodes.X3DNode
getDefine, getMeatadata, hasDefine, setDefine, setMetadata
 
Methods inherited from class com.hedgehog.HObject
clone, compare, compareTo, copy, equals, getID, getName, hashCode, hasID, hasName, setID, setName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mAxisRotation

protected SFRotation mAxisRotation
Axis of rotation.


mDiskAngle

protected SFFloat mDiskAngle
Maximum position.


mMaxAngle

protected SFFloat mMaxAngle
Maximum angle.


mMinAngle

protected SFFloat mMinAngle
Minimum angle.


mOffset

protected SFFloat mOffset
Offset.

Constructor Detail

CylinderSensorNode

public CylinderSensorNode()
Default constructor. Sets the description to "", enabled to true and auto offset to true. Sets the axis of rotation to (0,1,0,0), disk angle to PI/12, maximum angle to -1, minimum angle to 0 and offset to 0.


CylinderSensorNode

public CylinderSensorNode(SFString description,
                          SFBool enabled,
                          SFBool autoOffset,
                          SFRotation axisRotation,
                          SFFloat diskAngle,
                          SFFloat maxAngle,
                          SFFloat minAngle,
                          SFFloat offset)
Constructor.

Parameters:
description - Description.
enabled - Enabled/disabled.
autoOffset - Auto offset.
axisRotation - Axis of rotation.
diskAngle - Disk angle.
maxAngle - Maximum angle.
minAngle - Minimum angle.
offset - Offset.

CylinderSensorNode

public CylinderSensorNode(CylinderSensorNode object)
Copy constructor.

Parameters:
object - Object to oopy.
Method Detail

getAxisRotation

public SFRotation getAxisRotation()
Returns the axis of rotation.

Returns:
The axis of rotation.

getDiskAngle

public SFFloat getDiskAngle()
Returns the disk angle.

Returns:
The disk angle.

getMaxAngle

public SFFloat getMaxAngle()
Returns the maximum angle.

Returns:
The maximum angle.

getMinAngle

public SFFloat getMinAngle()
Returns the minimum angle.

Returns:
The minimum angle.

getOffset

public SFFloat getOffset()
Returns the offset.

Returns:
The offset.

setAxisRotation

public void setAxisRotation(SFRotation axisRotation)
sets the axis rotation.

Parameters:
axisRotation - New axis rotation.

setDiskAngle

public void setDiskAngle(SFFloat diskAngle)
Sets the disk angle.

Parameters:
diskAngle - New disk angle.

setMaxAngle

public void setMaxAngle(SFFloat maxAngle)
Sets the maximum angle.

Parameters:
maxAngle - New minimum angle.

setMinAngle

public void setMinAngle(SFFloat minAngle)
Sets the minimum angle.

Parameters:
minAngle - New minimum angle.

setOffset

public void setOffset(SFFloat offset)
Sets the offset.

Parameters:
offset - New offset.

toXMLNode

public org.w3c.dom.Element toXMLNode(org.w3c.dom.Document document,
                                     org.w3c.dom.Element documentRootNode)
                              throws InvalidObjectException
Converts this X3D node to an XML node.

Specified by:
toXMLNode in class X3DNode
Parameters:
document - XML document.
documentRootNode - Document root node; ie .
Returns:
XML node representation of this X3D node.
Throws:
InvalidObjectException - Thrown if this object is invalid.