Interface VolumePickSensor

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

public interface VolumePickSensor
extends X3DPickSensorNode
VolumePickSensor tests picking intersections using the pickingGeometry against the pickTarget geometry volume.

X3D node tooltip: (X3D version 3.2 or later) [X3DPickSensorNode] VolumePickSensor tests picking intersections using the pickingGeometry against the pickTarget geometry volume.
  • Hint: sort order is based on distance between centers of the bounds of the picking geometry and the picked geometry.
  • Warning: pickingGeometry volume is defined by the convex hull of the enclosing planes of the provided X3DGeometryNode. If the provided volume is not manifold, pick results are undefined.
  • Hint: a pick is successful if any vertex of the pickTarget geometry intersects the volume defined by the pickingGeometry.
  • Hint: Sorting is defined based on distance between the centers of the bounds of the picking geometry and the picked geometry.
  • 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: any geometry 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: VolumePickSensor, X3D Tooltips: VolumePickSensor, X3D Scene Authoring Hints: Volume
  • 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.
    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.
    VolumePickSensor setEnabled​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    VolumePickSensor setIntersectionType​(java.lang.String newValue)
    Accessor method to assign String enumeration value ("BOUNDS" | "GEOMETRY") to initializeOnly SFString field named intersectionType.
    VolumePickSensor 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.
    VolumePickSensor setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    VolumePickSensor setObjectType​(java.lang.String[] newValue)
    Accessor method to assign String enumeration array (""ALL"" | ""NONE"" | ""TERRAIN"") to inputOutput MFString field named objectType.
    VolumePickSensor 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).
    VolumePickSensor 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 (!
    VolumePickSensor 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

      VolumePickSensor 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:
      VolumePickSensor - 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

      VolumePickSensor 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:
      VolumePickSensor - 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

      VolumePickSensor 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:
      VolumePickSensor - 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

      VolumePickSensor 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:
      VolumePickSensor - 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

      VolumePickSensor 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:
      VolumePickSensor - 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
    • getPickingGeometry

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

      Tooltip: [X3DGeometryNode] 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

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

      Tooltip: [X3DGeometryNode] 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:
      VolumePickSensor - 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

      VolumePickSensor 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:
      VolumePickSensor - 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

      VolumePickSensor 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:
      VolumePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).