Class TransformSensor

All Implemented Interfaces:
X3DChildNode, X3DNode, X3DSensorNode, TransformSensor, X3DEnvironmentalSensorNode

public class TransformSensor extends X3DConcreteNode implements TransformSensor
TransformSensor generates output events when its targetObject enters, exits, and moves within a region in space (defined by a box).

X3D node tooltip: (X3D version 3.2 or later) [X3DEnvironmentalSensorNode] TransformSensor generates output events when its targetObject enters, exits, and moves within a region in space (defined by a box).
  • Hint: Each TransformSensor node behaves independently of all other TransformSensor nodes, so that every enabled TransformSensor node affected by targetObject motion sends output events.
  • Hint: multiply instanced (DEF/USE) TransformSensor nodes in different locations use the union of all boxes to check for enter and exit, detecting enter and exit for all instances of the box, and sending enter/exit events appropriately. For non-overlapping bounding boxes, position_changed and orientation_changed events are calculated relative to the coordinate system associated with the bounding box in which the proximity was detected.
  • Warning: results are undefined if boxes overlap for multiply instanced TransformSensor nodes.
  • Warning: a TransformSensor node with a zero-volume box (i.e. any size dimension equal to 0.0) cannot generate events, equivalent to enabled=false.
  • Warning: unlike TouchSensor nodes, there is no notion of a TransformSensor node lower in the scene graph grabbing events.

Package hint: This org.web3d.x3d.jsail concrete class is used for implementing a standalone X3D object as a Plain Old Java Object (POJO). If you are writing Java code for use inside an X3D Script node, compile separate code using only the org.web3d.x3d.sai package instead.
See Also:
X3D Abstract Specification: TransformSensor, X3D Tooltips: TransformSensor, X3D Scene Authoring Hints
  • Field Details

    • NAME

      public static final String NAME
      String constant NAME provides name of this element: TransformSensor.
      See Also:
      Constant Field Values
    • COMPONENT

      public static final String COMPONENT
      String constant COMPONENT defines X3D component for the TransformSensor element: EnvironmentalSensor
      See Also:
      Constant Field Values
    • LEVEL

      public static final int LEVEL
      Integer constant LEVEL provides default X3D EnvironmentalSensor component level for this element: 3
      See Also:
      Constant Field Values
    • CENTER_DEFAULT_VALUE

      public static final float[] CENTER_DEFAULT_VALUE
      SFVec3f field named center has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax).
    • ENABLED_DEFAULT_VALUE

      public static final boolean ENABLED_DEFAULT_VALUE
      SFBool field named enabled has default value true (Java syntax) or true (XML syntax).
      See Also:
      Constant Field Values
    • IS_DEFAULT_VALUE

      public static final IS IS_DEFAULT_VALUE
      SFNode field named IS has default value null (Java syntax) or NULL (XML syntax).
    • METADATA_DEFAULT_VALUE

      public static final X3DMetadataObject METADATA_DEFAULT_VALUE
      SFNode field named metadata has default value null (Java syntax) or NULL (XML syntax).
    • SIZE_DEFAULT_VALUE

      public static final float[] SIZE_DEFAULT_VALUE
      SFVec3f field named size has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax).
    • TARGETOBJECT_DEFAULT_VALUE

      public static final X3DNode TARGETOBJECT_DEFAULT_VALUE
      SFNode field named targetObject has default value null (Java syntax) or NULL (XML syntax).
    • containerField_DEFAULT_VALUE

      public static final String containerField_DEFAULT_VALUE
      containerField describes typical field relationship of a node to its parent. Usage is not ordinarily needed when using this API, default value is provided for informational purposes.
      See Also:
      X3D Scene Authoring Hints: containerField, X3D Unified Object Model (X3DUOM), Constant Field Values
    • fromField_CENTER

      public static final String fromField_CENTER
      fromField ROUTE name for SFVec3f field named center.
      See Also:
      Constant Field Values
    • toField_CENTER

      public static final String toField_CENTER
      toField ROUTE name for SFVec3f field named center.
      See Also:
      Constant Field Values
    • fromField_ENABLED

      public static final String fromField_ENABLED
      fromField ROUTE name for SFBool field named enabled.
      See Also:
      Constant Field Values
    • toField_ENABLED

      public static final String toField_ENABLED
      toField ROUTE name for SFBool field named enabled.
      See Also:
      Constant Field Values
    • fromField_ENTERTIME

      public static final String fromField_ENTERTIME
      fromField ROUTE name for SFTime field named enterTime.
      See Also:
      Constant Field Values
    • fromField_EXITTIME

      public static final String fromField_EXITTIME
      fromField ROUTE name for SFTime field named exitTime.
      See Also:
      Constant Field Values
    • fromField_IS

      public static final String fromField_IS
      fromField ROUTE name for SFNode field named IS.
      See Also:
      Constant Field Values
    • fromField_ISACTIVE

      public static final String fromField_ISACTIVE
      fromField ROUTE name for SFBool field named isActive.
      See Also:
      Constant Field Values
    • fromField_METADATA

      public static final String fromField_METADATA
      fromField ROUTE name for SFNode field named metadata.
      See Also:
      Constant Field Values
    • toField_METADATA

      public static final String toField_METADATA
      toField ROUTE name for SFNode field named metadata.
      See Also:
      Constant Field Values
    • fromField_ORIENTATION_CHANGED

      public static final String fromField_ORIENTATION_CHANGED
      fromField ROUTE name for SFRotation field named orientation_changed.
      See Also:
      Constant Field Values
    • fromField_POSITION_CHANGED

      public static final String fromField_POSITION_CHANGED
      fromField ROUTE name for SFVec3f field named position_changed.
      See Also:
      Constant Field Values
    • fromField_SIZE

      public static final String fromField_SIZE
      fromField ROUTE name for SFVec3f field named size.
      See Also:
      Constant Field Values
    • toField_SIZE

      public static final String toField_SIZE
      toField ROUTE name for SFVec3f field named size.
      See Also:
      Constant Field Values
    • fromField_TARGETOBJECT

      public static final String fromField_TARGETOBJECT
      fromField ROUTE name for SFNode field named targetObject.
      See Also:
      Constant Field Values
    • toField_TARGETOBJECT

      public static final String toField_TARGETOBJECT
      toField ROUTE name for SFNode field named targetObject.
      See Also:
      Constant Field Values
  • Constructor Details

    • TransformSensor

      public TransformSensor()
      Constructor for TransformSensor to initialize member variables with default values.
    • TransformSensor

      public TransformSensor(String DEFlabel)
      Utility constructor that assigns DEF label after initializing member variables with default values.
      Parameters:
      DEFlabel - unique DEF name for this X3D node
  • Method Details