Interface LinePickSensor

All Superinterfaces:
X3DChildNode, X3DNode, X3DPickSensorNode, X3DSensorNode
All Known Implementing Classes:
LinePickSensorObject

public interface LinePickSensor
extends X3DPickSensorNode
LinePickSensor uses one or more pickingGeometry line segments to compute intersections with pickTarget shapes.

X3D node tooltip: (X3D version 3.2 or later) [X3DPickSensorNode] LinePickSensor uses one or more pickingGeometry line segments to compute intersections with pickTarget shapes. As each line intersection generates a known point in space, useful event information is returned including normal, geometry and texCoord values.
  • Hint: sort order for line picking is based on each pair of coordinates that defining a line segment, with first declared vertex of the segment defined to be the start of the line to which the intersection points are closest.
  • Hint: when the picking line segment intersects a coplanar polygon, computed intersection point(s) are illustrated in Figure 38.1 http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/picking.html#f-LineIntersection
  • Hint: picking is performed between rendered frames of the event model. An author sets up the picking request in one frame by placing a LinePickSensor in the desired location. At the start of the next frame, any picking intersections are reported by the pick sensor.
  • Hint: picking notification is performed at the start of the frame for all enabled pick sensors once all other sensors are processed.
  • Hint: event timing details are explained in X3D Specification 4.4.8.3 Execution model http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#ExecutionModelWarning: order of contained nodes is significant, single pickingGeometry node must precede pickTarget node array.
  • Hint: IndexedLineSet or Lineset can be used for pickingGeometry node.

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

    Modifier and Type Method Description
    void addPickTarget​(X3DNode[] newValue)
    Add array of child pickTarget nodes to array of existing nodes (if any).
    boolean getEnabled()
    Provide boolean value from inputOutput SFBool field named enabled.
    java.lang.String getIntersectionType()
    Provide String enumeration value ( baseType intersectionTypeValues) ["BOUNDS" | "GEOMETRY" | 'etc.'] from initializeOnly SFString field named intersectionType.
    boolean getIsActive()
    Provide boolean value from outputOnly SFBool field named isActive.
    java.lang.String getMatchCriterion()
    Provide String enumeration value ( baseType pickSensorMatchCriterionChoices) ["MATCH_ANY" | "MATCH_EVERY" | "MATCH_ONLY_ONE"] from inputOutput SFString field named matchCriterion.
    X3DMetadataObject getMetadata()
    Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    java.lang.String[] getObjectType()
    Provide array of String enumeration results with quoted value(s) ["ALL","NONE","TERRAIN",...] from inputOutput MFString field named objectType.
    X3DNode[] getPickedGeometry()
    Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from outputOnly MFNode field pickedGeometry.
    float[] getPickedNormal()
    Provide array of 3-tuple float results from outputOnly MFVec3f field named pickedNormal.
    float[] getPickedPoint()
    Provide array of 3-tuple float results from outputOnly MFVec3f field named pickedPoint.
    float[] getPickedTextureCoordinate()
    Provide array of 3-tuple float results from outputOnly MFVec3f field named pickedTextureCoordinate.
    X3DGeometryNode getPickingGeometry()
    Provide X3DGeometryNode instance (using a properly typed node) from inputOutput SFNode field pickingGeometry.
    X3DNode[] getPickTarget()
    Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) with acceptable node types limited to X3DGroupingNode|X3DShapeNode|Inline, from inputOutput MFNode field pickTarget.
    java.lang.String getSortOrder()
    Provide String enumeration value ( baseType pickSensorSortOrderValues) ["ANY" | "CLOSEST" | "ALL" | "ALL_SORTED" | 'etc.'] from initializeOnly SFString field named sortOrder.
    LinePickSensor setEnabled​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    LinePickSensor setIntersectionType​(java.lang.String newValue)
    Accessor method to assign String enumeration value ("BOUNDS" | "GEOMETRY") to initializeOnly SFString field named intersectionType.
    LinePickSensor setMatchCriterion​(java.lang.String newValue)
    Accessor method to assign String enumeration value ("MATCH_ANY" | "MATCH_EVERY" | "MATCH_ONLY_ONE") to inputOutput SFString field named matchCriterion.
    LinePickSensor setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    LinePickSensor setObjectType​(java.lang.String[] newValue)
    Accessor method to assign String enumeration array (""ALL"" | ""NONE"" | ""TERRAIN"") to inputOutput MFString field named objectType.
    LinePickSensor setPickingGeometry​(X3DGeometryNode newValue)
    Accessor method to assign X3DGeometryNode instance (using a properly typed node) to inputOutput SFNode field pickingGeometry.
    void setPickTarget​(X3DNode newValue)
    Set single child pickTarget node, replacing prior array of existing nodes (if any).
    LinePickSensor setPickTarget​(X3DNode[] newValue)
    Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field pickTarget. // newValueInstanceAcceptableNodeTypesTest checks are needed for methods that override/subset X3DNode interfaces #1 boolean isNodeTypeAllowed = (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.Grouping.X3DGroupingNode) || (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.Shape.X3DShapeNode) || (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.jsail.Networking.InlineObject); if (!
    LinePickSensor setSortOrder​(java.lang.String newValue)
    Accessor method to assign String enumeration value ("ANY" | "CLOSEST" | "ALL" | "ALL_SORTED") to initializeOnly SFString field named sortOrder.
  • Method Details

    • getEnabled

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

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

      LinePickSensor 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 X3DPickSensorNode
      Specified by:
      setEnabled in interface X3DSensorNode
      Parameters:
      newValue - is new value for the enabled field.
      Returns:
      LinePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getIntersectionType

      java.lang.String getIntersectionType()
      Provide String enumeration value ( baseType intersectionTypeValues) ["BOUNDS" | "GEOMETRY" | 'etc.'] from initializeOnly SFString field named intersectionType.

      Tooltip: intersectionType specifies precision of the collision computation.
      • Hint: intersectionType constants may be extended by the browser to provide additional options.
      • Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
      Specified by:
      getIntersectionType in interface X3DPickSensorNode
      Returns:
      value of intersectionType field
    • setIntersectionType

      LinePickSensor setIntersectionType​(java.lang.String newValue)
      Accessor method to assign String enumeration value ("BOUNDS" | "GEOMETRY") to initializeOnly SFString field named intersectionType.

      Tooltip: intersectionType specifies precision of the collision computation.
      • Hint: intersectionType constants may be extended by the browser to provide additional options.
      • Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
      Specified by:
      setIntersectionType in interface X3DPickSensorNode
      Parameters:
      newValue - is new value for the intersectionType field.
      Returns:
      LinePickSensor - 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: isActive indicates when the intersecting object is picked by the picking geometry. Output event isActive=true gets sent once a picked item is found. Output event isActive=false gets sent once no picked item is found.
      • 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 X3DPickSensorNode
      Specified by:
      getIsActive in interface X3DSensorNode
      Returns:
      value of isActive field
    • getMatchCriterion

      java.lang.String getMatchCriterion()
      Provide String enumeration value ( baseType pickSensorMatchCriterionChoices) ["MATCH_ANY" | "MATCH_EVERY" | "MATCH_ONLY_ONE"] from inputOutput SFString field named matchCriterion.

      Tooltip: defines whether the intersection test (i.e. pick) by this X3DPickSensorNode must match one or more objectType. Specifically MATCH_ANY means any match of objectType values is acceptable, MATCH_EVERY means that every objectType value in this node shall match an objectType value in the X3DPickableObject, and MATCH_ONLY_ONE means that one and only one objectType value can match. *
      Specified by:
      getMatchCriterion in interface X3DPickSensorNode
      Returns:
      value of matchCriterion field
    • setMatchCriterion

      LinePickSensor setMatchCriterion​(java.lang.String newValue)
      Accessor method to assign String enumeration value ("MATCH_ANY" | "MATCH_EVERY" | "MATCH_ONLY_ONE") to inputOutput SFString field named matchCriterion.

      Tooltip: defines whether the intersection test (i.e. pick) by this X3DPickSensorNode must match one or more objectType. Specifically MATCH_ANY means any match of objectType values is acceptable, MATCH_EVERY means that every objectType value in this node shall match an objectType value in the X3DPickableObject, and MATCH_ONLY_ONE means that one and only one objectType value can match. *
      Specified by:
      setMatchCriterion in interface X3DPickSensorNode
      Parameters:
      newValue - is new value for the matchCriterion field.
      Returns:
      LinePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getMetadata

      X3DMetadataObject getMetadata()
      Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
      Specified by:
      getMetadata in interface X3DChildNode
      Specified by:
      getMetadata in interface X3DNode
      Specified by:
      getMetadata in interface X3DPickSensorNode
      Specified by:
      getMetadata in interface X3DSensorNode
      Returns:
      value of metadata field
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      LinePickSensor setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      Specified by:
      setMetadata in interface X3DChildNode
      Specified by:
      setMetadata in interface X3DNode
      Specified by:
      setMetadata in interface X3DPickSensorNode
      Specified by:
      setMetadata in interface X3DSensorNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      LinePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • getObjectType

      java.lang.String[] getObjectType()
      Provide array of String enumeration results with quoted value(s) ["ALL","NONE","TERRAIN",...] from inputOutput MFString field named objectType.

      Tooltip: The objectType field specifies a set of labels used in the picking process. Each string specified is treated as an independent label that needs to be matched against the same type in one of the pick sensor instances. Example: labeling a PickableGroup with the objectType value "WATER" and then attempting to intersect a pick sensor with objectType value "GROUND" fails since the objectType values do not match. Example: the special value "ALL" means that each node is available for picking regardless of the type specified by the pick sensor. Example: the special value "NONE" effectively disables all picking for this node and is the equivalent of setting the pickable field of the corresponding PickableGroup to false.
      • Hint: authors may define any value for objectType.
      • Hint: MFString arrays can have multiple values, so "separate each individual string" "by using quote marks".
      Specified by:
      getObjectType in interface X3DPickSensorNode
      Returns:
      value of objectType field
    • setObjectType

      LinePickSensor setObjectType​(java.lang.String[] newValue)
      Accessor method to assign String enumeration array (""ALL"" | ""NONE"" | ""TERRAIN"") to inputOutput MFString field named objectType.

      Tooltip: The objectType field specifies a set of labels used in the picking process. Each string specified is treated as an independent label that needs to be matched against the same type in one of the pick sensor instances. Example: labeling a PickableGroup with the objectType value "WATER" and then attempting to intersect a pick sensor with objectType value "GROUND" fails since the objectType values do not match. Example: the special value "ALL" means that each node is available for picking regardless of the type specified by the pick sensor. Example: the special value "NONE" effectively disables all picking for this node and is the equivalent of setting the pickable field of the corresponding PickableGroup to false.
      • Hint: authors may define any value for objectType.
      • Hint: MFString arrays can have multiple values, so "separate each individual string" "by using quote marks".
      Specified by:
      setObjectType in interface X3DPickSensorNode
      Parameters:
      newValue - is new value for the objectType field.
      Returns:
      LinePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getPickedGeometry

      X3DNode[] getPickedGeometry()
      Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from outputOnly MFNode field pickedGeometry.

      Tooltip: Output event containing the node or nodes that have been found to intersect with the picking geometry from the last time this node performed a picking operation, given in the 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.


      Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DChildNode.
      Specified by:
      getPickedGeometry in interface X3DPickSensorNode
      Returns:
      value of pickedGeometry field
      See Also:
      X3DChildNode
    • getPickedNormal

      float[] getPickedNormal()
      Provide array of 3-tuple float results from outputOnly MFVec3f field named pickedNormal.

      Tooltip: Output event containing surface normal vectors computed by the picking intersection computations.
      • 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 pickedNormal field
    • getPickedPoint

      float[] getPickedPoint()
      Provide array of 3-tuple float results from outputOnly MFVec3f field named pickedPoint.

      Tooltip: Output event containing 3D points on surface of underlying pickingGeometry computed by the picking intersection computations, given in the 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 pickedPoint field
    • getPickedTextureCoordinate

      float[] getPickedTextureCoordinate()
      Provide array of 3-tuple float results from outputOnly MFVec3f field named pickedTextureCoordinate.

      Tooltip: Output event containing 3D texture coordinates of surfaces computed by the picking intersection computations. Picked texture coordinates are in three dimensions. If the target texture coordinate has two dimensions, the third coordinate (z component of an SFVec3f) shall be zero.
      • Warning: if the target object has multiple textures defined, only texture coordinates for the first texture are returned and all other textures are ignored.
      • 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 pickedTextureCoordinate field
    • getPickingGeometry

      X3DGeometryNode getPickingGeometry()
      Provide X3DGeometryNode instance (using a properly typed node) from inputOutput SFNode field pickingGeometry.

      Tooltip: [IndexedLineSet|LineSet] pickingGeometry specifies the exact geometry coordinates that are used to perform the intersection testing of the picking operation. *
      Specified by:
      getPickingGeometry in interface X3DPickSensorNode
      Returns:
      value of pickingGeometry field
    • setPickingGeometry

      LinePickSensor setPickingGeometry​(X3DGeometryNode newValue)
      Accessor method to assign X3DGeometryNode instance (using a properly typed node) to inputOutput SFNode field pickingGeometry.

      Tooltip: [IndexedLineSet|LineSet] pickingGeometry specifies the exact geometry coordinates that are used to perform the intersection testing of the picking operation. *
      Specified by:
      setPickingGeometry in interface X3DPickSensorNode
      Parameters:
      newValue - is new value for the pickingGeometry field.
      Returns:
      LinePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getPickTarget

      X3DNode[] getPickTarget()
      Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) with acceptable node types limited to X3DGroupingNode|X3DShapeNode|Inline, from inputOutput MFNode field pickTarget.

      Tooltip: [X3DGroupingNode|X3DShapeNode|Inline] pickTarget specifies the list of nodes against which picking operations are performed. All nodes declared in this field and their descendents are evaluated for intersections. *


      Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DGroupingNode|X3DShapeNode|Inline.
      Specified by:
      getPickTarget in interface X3DPickSensorNode
      Returns:
      value of pickTarget field
      See Also:
      X3DGroupingNode, X3DShapeNode, InlineObject
    • setPickTarget

      LinePickSensor setPickTarget​(X3DNode[] newValue)
      Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field pickTarget. // newValueInstanceAcceptableNodeTypesTest checks are needed for methods that override/subset X3DNode interfaces #1 boolean isNodeTypeAllowed = (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.Grouping.X3DGroupingNode) || (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.Shape.X3DShapeNode) || (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.jsail.Networking.InlineObject); if (!isNodeTypeAllowed) { throw new org.web3d.x3d.sai.InvalidFieldValueException("X3DNode newValue is not instanceof " + "acceptableNodeTypes X3DGroupingNode|X3DShapeNode|Inline; newValue=" + newValue); }

      Tooltip: [X3DGroupingNode|X3DShapeNode|Inline] pickTarget specifies the list of nodes against which picking operations are performed. All nodes declared in this field and their descendents are evaluated for intersections. *


      Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DGroupingNode|X3DShapeNode|Inline.
      Specified by:
      setPickTarget in interface X3DPickSensorNode
      Parameters:
      newValue - is new value for the pickTarget field.
      Returns:
      LinePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • addPickTarget

      void addPickTarget​(X3DNode[] newValue)
      Add array of child pickTarget nodes to array of existing nodes (if any).

      Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DGroupingNode|X3DShapeNode|Inline.
      Specified by:
      addPickTarget in interface X3DPickSensorNode
      Parameters:
      newValue - is new value array to be appended the pickTarget field.
    • setPickTarget

      void setPickTarget​(X3DNode newValue)
      Set single child pickTarget node, replacing prior array of existing nodes (if any).
      Specified by:
      setPickTarget in interface X3DPickSensorNode
      Parameters:
      newValue - is new node for the pickTarget field
    • getSortOrder

      java.lang.String getSortOrder()
      Provide String enumeration value ( baseType pickSensorSortOrderValues) ["ANY" | "CLOSEST" | "ALL" | "ALL_SORTED" | 'etc.'] from initializeOnly SFString field named sortOrder.

      Tooltip: The sortOrder field determines the order provided for picked output events. Example: ANY means that any single object can satisfy picking conditions for this pick sensor. Consistency of results is not guaranteed. Example: ALL means that every object that satisfies the picking conditions for this pick sensor shall be returned. Example: ALL_SORTED means that every object that satisfies the picking conditions for this pick sensor shall be returned with the order of the output fields provided in a distance-sorted order from closest to farthest away. The exact algorithm for sorting is defined by the individual node definitions. Example: CLOSEST means that the closest object by distance that satisfies the conditions of this pick sensor. *The exact algorithm for distance determination shall be defined by individual node definitions*.
      • Hint: browser implementations may define additional values and algorithms beyond these four required values.
      • Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
      Specified by:
      getSortOrder in interface X3DPickSensorNode
      Returns:
      value of sortOrder field
    • setSortOrder

      LinePickSensor setSortOrder​(java.lang.String newValue)
      Accessor method to assign String enumeration value ("ANY" | "CLOSEST" | "ALL" | "ALL_SORTED") to initializeOnly SFString field named sortOrder.

      Tooltip: The sortOrder field determines the order provided for picked output events. Example: ANY means that any single object can satisfy picking conditions for this pick sensor. Consistency of results is not guaranteed. Example: ALL means that every object that satisfies the picking conditions for this pick sensor shall be returned. Example: ALL_SORTED means that every object that satisfies the picking conditions for this pick sensor shall be returned with the order of the output fields provided in a distance-sorted order from closest to farthest away. The exact algorithm for sorting is defined by the individual node definitions. Example: CLOSEST means that the closest object by distance that satisfies the conditions of this pick sensor. *The exact algorithm for distance determination shall be defined by individual node definitions*.
      • Hint: browser implementations may define additional values and algorithms beyond these four required values.
      • Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
      Specified by:
      setSortOrder in interface X3DPickSensorNode
      Parameters:
      newValue - is new value for the sortOrder field.
      Returns:
      LinePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).