Interface CylinderSensor

All Superinterfaces:
X3DChildNode, X3DDragSensorNode, X3DNode, X3DPointingDeviceSensorNode, X3DSensorNode
All Known Implementing Classes:
CylinderSensor

public interface CylinderSensor extends X3DDragSensorNode
CylinderSensor converts pointer motion (for example, a mouse or wand) into rotation values using an invisible cylinder aligned with local Y-axis.

Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the org.web3d.x3d.jsail classes. X3D node tooltip: [X3DDragSensorNode] CylinderSensor converts pointer motion (for example, a mouse or wand) into rotation values using an invisible cylinder aligned with local Y-axis. Hint: this sensor detects user interactions affecting peer nodes and their child geometry. Hint: add semi-transparent surrounding geometry to see the effect of the sensor. Hint: initial relative bearing of pointer drag determines whether cylinder sides or end-cap disks are used for manipulation. Hint: X3D Architecture 20.2.1 Overview of pointing device sensors <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/pointingDeviceSensor.html#OverviewOfPointingDeviceSensors" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/pointingDeviceSensor.html#OverviewOfPointingDeviceSensors</a> Hint: X3D Architecture 20.2.2 Drag sensors <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/pointingDeviceSensor.html#DragSensors" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/pointingDeviceSensor.html#DragSensors</a> Hint: X3D Architecture 20.2.3 Activating and manipulating pointing device sensors <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/pointingDeviceSensor.html#Activatingandmanipulating" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/pointingDeviceSensor.html#Activatingandmanipulating</a> Hint: example scenes and authoring assets at <a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity</a> *


Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Provide boolean value from inputOutput SFBool field named autoOffset.
    float[]
    Provide array of 4-tuple float results unit axis, angle (in radians) from inputOutput SFRotation field named axisRotation.
    Provide String value from inputOutput SFString field named description.
    float
    Provide float value unit axis, angle (in radians) within allowed range of [0,1.5708] from inputOutput SFFloat field named diskAngle.
    boolean
    Provide boolean value from inputOutput SFBool field named enabled.
    boolean
    Provide boolean value from outputOnly SFBool field named isActive.
    boolean
    Provide boolean value from outputOnly SFBool field named isOver.
    float
    Provide float value unit axis, angle (in radians) within allowed range of (-6.2832,6.2832) from inputOutput SFFloat field named maxAngle.
    Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    float
    Provide float value unit axis, angle (in radians) within allowed range of (-6.2832,6.2832) from inputOutput SFFloat field named minAngle.
    float
    Provide float value from inputOutput SFFloat field named offset.
    float[]
    Provide array of 4-tuple float results unit axis, angle (in radians) from outputOnly SFRotation field named rotation_changed.
    float[]
    Provide array of 3-tuple float results from outputOnly SFVec3f field named trackPoint_changed.
    setAutoOffset(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named autoOffset.
    setAxisRotation(float[] newValue)
    Accessor method to assign 4-tuple float array unit axis, angle (in radians) to inputOutput SFRotation field named axisRotation.
    Accessor method to assign String value to inputOutput SFString field named description.
    setDiskAngle(float newValue)
    Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named diskAngle.
    setEnabled(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    setMaxAngle(float newValue)
    Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named maxAngle.
    Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    setMinAngle(float newValue)
    Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named minAngle.
    setOffset(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named offset.
  • Method Details

    • getAutoOffset

      boolean getAutoOffset()
      Provide boolean value from inputOutput SFBool field named autoOffset.

      Tooltip: determines whether previous offset values are remembered/accumulated. *
      Specified by:
      getAutoOffset in interface X3DDragSensorNode
      Returns:
      value of autoOffset field
    • setAutoOffset

      CylinderSensor setAutoOffset(boolean newValue)
      Accessor method to assign boolean value to inputOutput SFBool field named autoOffset.

      Tooltip: determines whether previous offset values are remembered/accumulated. *
      Specified by:
      setAutoOffset in interface X3DDragSensorNode
      Parameters:
      newValue - is new value for the autoOffset field.
      Returns:
      CylinderSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getAxisRotation

      float[] getAxisRotation()
      Provide array of 4-tuple float results unit axis, angle (in radians) from inputOutput SFRotation field named axisRotation.

      Tooltip: axisRotation determines local sensor coordinate system by rotating the local coordinate system. *
      Returns:
      value of axisRotation field
    • setAxisRotation

      CylinderSensor setAxisRotation(float[] newValue)
      Accessor method to assign 4-tuple float array unit axis, angle (in radians) to inputOutput SFRotation field named axisRotation.

      Tooltip: axisRotation determines local sensor coordinate system by rotating the local coordinate system. *
      Parameters:
      newValue - is new value for the axisRotation field.
      Returns:
      CylinderSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getDescription

      String getDescription()
      Provide String value from inputOutput SFString field named description.

      Tooltip: Author-provided prose that describes intended purpose of this node. Hint: include space characters since a description is not a DEF identifier. Write short phrases that make descriptions clear and readable. Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as &#38; for & ampersand character, or &#34; for " quotation-mark character). *
      Specified by:
      getDescription in interface X3DDragSensorNode
      Specified by:
      getDescription in interface X3DPointingDeviceSensorNode
      Specified by:
      getDescription in interface X3DSensorNode
      Returns:
      value of description field
    • setDescription

      CylinderSensor setDescription(String newValue)
      Accessor method to assign String value to inputOutput SFString field named description.

      Tooltip: Author-provided prose that describes intended purpose of this node. Hint: include space characters since a description is not a DEF identifier. Write short phrases that make descriptions clear and readable. Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as &#38; for & ampersand character, or &#34; for " quotation-mark character). *
      Specified by:
      setDescription in interface X3DDragSensorNode
      Specified by:
      setDescription in interface X3DPointingDeviceSensorNode
      Specified by:
      setDescription in interface X3DSensorNode
      Parameters:
      newValue - is new value for the description field.
      Returns:
      CylinderSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getDiskAngle

      float getDiskAngle()
      Provide float value unit axis, angle (in radians) within allowed range of [0,1.5708] from inputOutput SFFloat field named diskAngle.

      Tooltip: Help decide rotation behavior from initial relative bearing of pointer drag: acute angle whether cylinder sides or end-cap disks of virtual-geometry sensor are used for manipulation. Hint: diskAngle 0 forces disk-like behavior, diskAngle 1.570796 (90 degrees) forces cylinder-like behavior. *
      Returns:
      value of diskAngle field
    • setDiskAngle

      CylinderSensor setDiskAngle(float newValue)
      Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named diskAngle.

      Tooltip: Help decide rotation behavior from initial relative bearing of pointer drag: acute angle whether cylinder sides or end-cap disks of virtual-geometry sensor are used for manipulation. Hint: diskAngle 0 forces disk-like behavior, diskAngle 1.570796 (90 degrees) forces cylinder-like behavior. *
      Parameters:
      newValue - is new value for the diskAngle field.
      Returns:
      CylinderSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getEnabled

      boolean getEnabled()
      Provide boolean value from inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      getEnabled in interface X3DDragSensorNode
      Specified by:
      getEnabled in interface X3DPointingDeviceSensorNode
      Specified by:
      getEnabled in interface X3DSensorNode
      Returns:
      value of enabled field
    • setEnabled

      CylinderSensor setEnabled(boolean newValue)
      Accessor method to assign boolean value to inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      setEnabled in interface X3DDragSensorNode
      Specified by:
      setEnabled in interface X3DPointingDeviceSensorNode
      Specified by:
      setEnabled in interface X3DSensorNode
      Parameters:
      newValue - is new value for the enabled field.
      Returns:
      CylinderSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getIsActive

      boolean getIsActive()
      Provide boolean value from outputOnly SFBool field named isActive.

      Tooltip: Select geometry by activating the pointing device (for example, clicking the mouse) to generate isActive events. Output event isActive=true is sent when geometry is selected (for example, when primary mouse button is pressed), output event isActive=false is sent when geometry is deselected (for example, when primary mouse button is released). Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. *
      Specified by:
      getIsActive in interface X3DDragSensorNode
      Specified by:
      getIsActive in interface X3DPointingDeviceSensorNode
      Specified by:
      getIsActive in interface X3DSensorNode
      Returns:
      value of isActive field
    • getIsOver

      boolean getIsOver()
      Provide boolean value from outputOnly SFBool field named isOver.

      Tooltip: Hover over geometry by aiming the mouse (or pointing device) to generate isOver events. Sensor sends output event isOver=true event when pointing device moves over sensor's geometry, and later sends output event isOver=false event when pointing device moves off. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. *
      Specified by:
      getIsOver in interface X3DDragSensorNode
      Specified by:
      getIsOver in interface X3DPointingDeviceSensorNode
      Returns:
      value of isOver field
    • getMaxAngle

      float getMaxAngle()
      Provide float value unit axis, angle (in radians) within allowed range of (-6.2832,6.2832) from inputOutput SFFloat field named maxAngle.

      Tooltip: clamps rotation_changed events within range of min/max values Hint: if minAngle &gt; maxAngle, rotation is not clamped. Hint: radian units for angular measure <a href="https://en.wikipedia.org/wiki/Radian" target="_blank">https://en.wikipedia.org/wiki/Radian</a> *
      Returns:
      value of maxAngle field
    • setMaxAngle

      CylinderSensor setMaxAngle(float newValue)
      Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named maxAngle.

      Tooltip: clamps rotation_changed events within range of min/max values Hint: if minAngle &gt; maxAngle, rotation is not clamped. Hint: radian units for angular measure <a href="https://en.wikipedia.org/wiki/Radian" target="_blank">https://en.wikipedia.org/wiki/Radian</a> *
      Parameters:
      newValue - is new value for the maxAngle field.
      Returns:
      CylinderSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getMetadata

      X3DMetadataObject getMetadata()
      Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.

      Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node. Hint: X3D Architecture 7.2.4 Metadata <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata</a> *
      Specified by:
      getMetadata in interface X3DChildNode
      Specified by:
      getMetadata in interface X3DDragSensorNode
      Specified by:
      getMetadata in interface X3DNode
      Specified by:
      getMetadata in interface X3DPointingDeviceSensorNode
      Specified by:
      getMetadata in interface X3DSensorNode
      Returns:
      value of metadata field
      See Also:
    • setMetadata

      CylinderSensor setMetadata(X3DMetadataObject newValue)
      Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.

      Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node. Hint: X3D Architecture 7.2.4 Metadata <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata</a> *
      Specified by:
      setMetadata in interface X3DChildNode
      Specified by:
      setMetadata in interface X3DDragSensorNode
      Specified by:
      setMetadata in interface X3DNode
      Specified by:
      setMetadata in interface X3DPointingDeviceSensorNode
      Specified by:
      setMetadata in interface X3DSensorNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      CylinderSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also:
    • getMinAngle

      float getMinAngle()
      Provide float value unit axis, angle (in radians) within allowed range of (-6.2832,6.2832) from inputOutput SFFloat field named minAngle.

      Tooltip: clamps rotation_changed events within range of min/max values Hint: if minAngle &gt; maxAngle, rotation is not clamped. Hint: radian units for angular measure <a href="https://en.wikipedia.org/wiki/Radian" target="_blank">https://en.wikipedia.org/wiki/Radian</a> *
      Returns:
      value of minAngle field
    • setMinAngle

      CylinderSensor setMinAngle(float newValue)
      Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named minAngle.

      Tooltip: clamps rotation_changed events within range of min/max values Hint: if minAngle &gt; maxAngle, rotation is not clamped. Hint: radian units for angular measure <a href="https://en.wikipedia.org/wiki/Radian" target="_blank">https://en.wikipedia.org/wiki/Radian</a> *
      Parameters:
      newValue - is new value for the minAngle field.
      Returns:
      CylinderSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getOffset

      float getOffset()
      Provide float value from inputOutput SFFloat field named offset.

      Tooltip: Sends event and remembers last value sensed. Warning: ROUTE connecting rotation_changed to set_offset creates a self-reinforcing positive feedback loop and results in unmanageable response. *
      Returns:
      value of offset field
    • setOffset

      CylinderSensor setOffset(float newValue)
      Accessor method to assign float value to inputOutput SFFloat field named offset.

      Tooltip: Sends event and remembers last value sensed. Warning: ROUTE connecting rotation_changed to set_offset creates a self-reinforcing positive feedback loop and results in unmanageable response. *
      Parameters:
      newValue - is new value for the offset field.
      Returns:
      CylinderSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getRotation

      float[] getRotation()
      Provide array of 4-tuple float results unit axis, angle (in radians) from outputOnly SFRotation field named rotation_changed.

      Tooltip: rotation_changed events equal sum of relative bearing changes plus offset value about Y-axis in local coordinate system. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. *
      Returns:
      value of rotation_changed field
    • getTrackPoint

      float[] getTrackPoint()
      Provide array of 3-tuple float results from outputOnly SFVec3f field named trackPoint_changed.

      Tooltip: trackPoint_changed events give intersection point of bearing with sensor's virtual geometry. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. Warning: trackPoint_changed events represent unclamped intersection points on plane surface. Browsers can interpret drags off of the surface in various ways. Note that translation_changed events are clamped by minPosition/maxPosition and thus may be preferable. *
      Specified by:
      getTrackPoint in interface X3DDragSensorNode
      Returns:
      value of trackPoint_changed field