Interface PrimitivePickSensor

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

public interface PrimitivePickSensor extends X3DPickSensorNode
If a non-uniform scale is applied to the pick sensor, correct results may require level 3 support.

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: (X3D version 3.2 or later) [X3DPickSensorNode] PrimitivePickSensor tests picking intersections using one of the basic primitive shapes specified in the pickingGeometry field [Cone|Cylinder|Sphere|Box] against the pickTarget geometry. Warning: boolean fields used to control visibility of primitive pickingGeometry subsections are ignored when evaluating picking intersections. Example: a Cylinder without end caps is still treated as an enclosed Cylinder. Hint: Sorting is defined based on the primitive type as follows. For Cone, the closest picked primitive is defined to be that closest to the vertex point. For Cylinder, Box, and Sphere, the closest picked primitive is defined to be that closest to the center. 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 <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/concepts.html#ExecutionModelWarning" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/concepts.html#ExecutionModelWarning</a>: order of contained nodes is significant, single pickingGeometry node must precede pickTarget node array. Hint: Box, Cone, Cylinder or Sphere 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:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPickTarget(X3DNode[] newValue)
    Add array of child pickTarget nodes to array of existing nodes (if any).
    Provide String value from inputOutput SFString field named description.
    boolean
    Provide boolean value from inputOutput SFBool field named enabled.
    Provide String enumeration value (baseType xs:NMTOKEN) ["BOUNDS" | "GEOMETRY" | 'etc.'] from initializeOnly SFString field named intersectionType.
    boolean
    Provide boolean value from outputOnly SFBool field named isActive.
    Provide String enumeration value (baseType xs:NMTOKEN) ["MATCH_ANY" | "MATCH_EVERY" | "MATCH_ONLY_ONE"] from inputOutput SFString field named matchCriterion.
    Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    Provide array of String enumeration results with quoted value(s) ["ALL","NONE","TERRAIN",...] from inputOutput MFString field named objectType.
    Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from outputOnly MFNode field pickedGeometry.
    Provide org.web3d.x3d.sai.Rendering.X3DGeometryNode instance (using a properly typed node) from inputOutput SFNode field pickingGeometry.
    Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) with acceptable node types limited to X3DGroupingNode|X3DShapeNode|Inline, from inputOutput MFNode field pickTarget.
    Provide String enumeration value (baseType xs:NMTOKEN) ["ANY" | "CLOSEST" | "ALL" | "ALL_SORTED" | 'etc.'] from initializeOnly SFString field named sortOrder.
    Accessor method to assign String value to inputOutput SFString field named description.
    setEnabled(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    Accessor method to assign String enumeration value ("BOUNDS" | "GEOMETRY") to initializeOnly SFString field named intersectionType.
    Accessor method to assign String enumeration value ("MATCH_ANY" | "MATCH_EVERY" | "MATCH_ONLY_ONE") to inputOutput SFString field named matchCriterion.
    Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    setObjectType(String[] newValue)
    Accessor method to assign String enumeration array (""ALL"" | ""NONE"" | ""TERRAIN"") to inputOutput MFString field named objectType.
    Accessor method to assign org.web3d.x3d.sai.Rendering.X3DGeometryNode instance (using a properly typed node) to inputOutput SFNode field pickingGeometry.
    void
    Set single child pickTarget node, replacing prior array of existing nodes (if any).
    setPickTarget(X3DNode[] newValue)
    Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field pickTarget.
    setSortOrder(String newValue)
    Accessor method to assign String enumeration value ("ANY" | "CLOSEST" | "ALL" | "ALL_SORTED") to initializeOnly SFString field named sortOrder.
  • Method Details

    • getDescription

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

      Tooltip: Author-provided prose that describes intended purpose of the node. 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 X3DPickSensorNode
      Specified by:
      getDescription in interface X3DSensorNode
      Returns:
      value of description field
    • setDescription

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

      Tooltip: Author-provided prose that describes intended purpose of the node. 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 X3DPickSensorNode
      Specified by:
      setDescription in interface X3DSensorNode
      Parameters:
      newValue - is new value for the description field.
      Returns:
      PrimitivePickSensor - 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 X3DPickSensorNode
      Specified by:
      getEnabled in interface X3DSensorNode
      Returns:
      value of enabled field
    • setEnabled

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

      String getIntersectionType()
      Provide String enumeration value (baseType xs:NMTOKEN) ["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

      PrimitivePickSensor setIntersectionType(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:
      PrimitivePickSensor - 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

      String getMatchCriterion()
      Provide String enumeration value (baseType xs:NMTOKEN) ["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

      PrimitivePickSensor setMatchCriterion(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:
      PrimitivePickSensor - 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 X3DNode
      Specified by:
      getMetadata in interface X3DPickSensorNode
      Specified by:
      getMetadata in interface X3DSensorNode
      Returns:
      value of metadata field
      See Also:
    • setMetadata

      PrimitivePickSensor 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 X3DNode
      Specified by:
      setMetadata in interface X3DPickSensorNode
      Specified by:
      setMetadata in interface X3DSensorNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      PrimitivePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also:
    • getObjectType

      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

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

      X3DNode[] getPickedGeometry()
      Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) 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:
    • getPickingGeometry

      X3DGeometryNode getPickingGeometry()
      Provide org.web3d.x3d.sai.Rendering.X3DGeometryNode instance (using a properly typed node) from inputOutput SFNode field pickingGeometry.

      Tooltip: [Cone|Cylinder|Sphere|Box] 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

      PrimitivePickSensor setPickingGeometry(X3DGeometryNode newValue)
      Accessor method to assign org.web3d.x3d.sai.Rendering.X3DGeometryNode instance (using a properly typed node) to inputOutput SFNode field pickingGeometry.

      Tooltip: [Cone|Cylinder|Sphere|Box] 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:
      PrimitivePickSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getPickTarget

      X3DNode[] getPickTarget()
      Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) 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:
    • setPickTarget

      PrimitivePickSensor setPickTarget(X3DNode[] newValue)
      Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to 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. *


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

      String getSortOrder()
      Provide String enumeration value (baseType xs:NMTOKEN) ["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 any single object that 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

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