Interface PlaneSensor
- All Superinterfaces:
X3DChildNode,X3DDragSensorNode,X3DNode,X3DPointingDeviceSensorNode,X3DSensorNode
- All Known Implementing Classes:
PlaneSensor
PlaneSensor converts pointing device motion into 2D translation parallel to the local Z=0 plane.
PlaneSensor node tooltip: [X3DDragSensorNode] PlaneSensor converts pointing device motion into 2D translation parallel to the local Z=0 plane.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
PlaneSensor node tooltip: [X3DDragSensorNode] PlaneSensor converts pointing device motion into 2D translation parallel to the local Z=0 plane.
- Hint: create a LineSensor by constraining one axis: (minPosition.x=maxPosition.x) or (minPosition.y=maxPosition.y).
- 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: X3D Architecture 20.2.1 Overview of pointing device sensors https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/pointingDeviceSensor.html#OverviewOfPointingDeviceSensors
- Hint: X3D Architecture 20.2.2 Drag sensors https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/pointingDeviceSensor.html#DragSensors
- Hint: X3D Architecture 20.2.3 Activating and manipulating pointing device sensors https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/pointingDeviceSensor.html#Activatingandmanipulating
- Hint: example scenes and authoring assets at https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity
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 TypeMethodDescriptionbooleanProvide 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.booleanProvide boolean value from inputOutput SFBool field named enabled.booleanProvide boolean value from outputOnly SFBool field named isActive.booleanProvide boolean value from outputOnly SFBool field named isOver.float[]Provide array of 2-tuple float results from inputOutput SFVec2f field named maxPosition.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.float[]Provide array of 2-tuple float results from inputOutput SFVec2f field named minPosition.float[]Provide array of 3-tuple float results from inputOutput SFVec3f field named offset.float[]Provide array of 3-tuple float results from outputOnly SFVec3f field named trackPoint_changed.float[]Provide array of 3-tuple float results from outputOnly SFVec3f field named translation_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.setDescription(String newValue) 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.setMaxPosition(float[] newValue) Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named maxPosition.setMetadata(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setMinPosition(float[] newValue) Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named minPosition.setOffset(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput SFVec3f 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:
getAutoOffsetin interfaceX3DDragSensorNode- Returns:
- value of autoOffset field
-
setAutoOffset
Accessor method to assign boolean value to inputOutput SFBool field named autoOffset.
Tooltip: Determines whether previous offset values are remembered/accumulated. *- Specified by:
setAutoOffsetin interfaceX3DDragSensorNode- Parameters:
newValue- is new value for the autoOffset field.- Returns:
PlaneSensor- 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
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:
PlaneSensor- 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 & for & ampersand character, or " for " quotation-mark character).
- Specified by:
getDescriptionin interfaceX3DDragSensorNode- Specified by:
getDescriptionin interfaceX3DPointingDeviceSensorNode- Specified by:
getDescriptionin interfaceX3DSensorNode- Returns:
- value of description field
-
setDescription
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 & for & ampersand character, or " for " quotation-mark character).
- Specified by:
setDescriptionin interfaceX3DDragSensorNode- Specified by:
setDescriptionin interfaceX3DPointingDeviceSensorNode- Specified by:
setDescriptionin interfaceX3DSensorNode- Parameters:
newValue- is new value for the description field.- Returns:
PlaneSensor- 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:
getEnabledin interfaceX3DDragSensorNode- Specified by:
getEnabledin interfaceX3DPointingDeviceSensorNode- Specified by:
getEnabledin interfaceX3DSensorNode- Returns:
- value of enabled field
-
setEnabled
Accessor method to assign boolean value to inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
setEnabledin interfaceX3DDragSensorNode- Specified by:
setEnabledin interfaceX3DPointingDeviceSensorNode- Specified by:
setEnabledin interfaceX3DSensorNode- Parameters:
newValue- is new value for the enabled field.- Returns:
PlaneSensor- 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:
getIsActivein interfaceX3DDragSensorNode- Specified by:
getIsActivein interfaceX3DPointingDeviceSensorNode- Specified by:
getIsActivein interfaceX3DSensorNode- 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:
getIsOverin interfaceX3DDragSensorNode- Specified by:
getIsOverin interfaceX3DPointingDeviceSensorNode- Returns:
- value of isOver field
-
getMaxPosition
float[] getMaxPosition()Provide array of 2-tuple float results from inputOutput SFVec2f field named maxPosition.
Tooltip: minPosition and maxPosition clamp translations to a range of values measured from origin of Z=0 plane default maxPosition < minPosition means no clamping.- Hint: create a LineSensor by constraining one axis (minPosition.x=maxPosition.x) or (minPosition.y=maxPosition.y).
- Returns:
- value of maxPosition field
-
setMaxPosition
Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named maxPosition.
Tooltip: minPosition and maxPosition clamp translations to a range of values measured from origin of Z=0 plane default maxPosition < minPosition means no clamping.- Hint: create a LineSensor by constraining one axis (minPosition.x=maxPosition.x) or (minPosition.y=maxPosition.y).
- Parameters:
newValue- is new value for the maxPosition field.- Returns:
PlaneSensor- 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 https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/core.html#Metadata
- Specified by:
getMetadatain interfaceX3DChildNode- Specified by:
getMetadatain interfaceX3DDragSensorNode- Specified by:
getMetadatain interfaceX3DNode- Specified by:
getMetadatain interfaceX3DPointingDeviceSensorNode- Specified by:
getMetadatain interfaceX3DSensorNode- Returns:
- value of metadata field
- See Also:
-
setMetadata
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 https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/core.html#Metadata
- Specified by:
setMetadatain interfaceX3DChildNode- Specified by:
setMetadatain interfaceX3DDragSensorNode- Specified by:
setMetadatain interfaceX3DNode- Specified by:
setMetadatain interfaceX3DPointingDeviceSensorNode- Specified by:
setMetadatain interfaceX3DSensorNode- Parameters:
newValue- is new value for the metadata field.- Returns:
PlaneSensor- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getMinPosition
float[] getMinPosition()Provide array of 2-tuple float results from inputOutput SFVec2f field named minPosition.
Tooltip: minPosition and maxPosition clamp translations to a range of values measured from origin of Z=0 plane default maxPosition < minPosition means no clamping.- Hint: create a LineSensor by constraining one axis (minPosition.x=maxPosition.x) or (minPosition.y=maxPosition.y).
- Returns:
- value of minPosition field
-
setMinPosition
Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named minPosition.
Tooltip: minPosition and maxPosition clamp translations to a range of values measured from origin of Z=0 plane default maxPosition < minPosition means no clamping.- Hint: create a LineSensor by constraining one axis (minPosition.x=maxPosition.x) or (minPosition.y=maxPosition.y).
- Parameters:
newValue- is new value for the minPosition field.- Returns:
PlaneSensor- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getOffset
float[] getOffset()Provide array of 3-tuple float results from inputOutput SFVec3f field named offset.
Tooltip: Sends event and remembers last value sensed.- Warning: ROUTE connecting translation_changed to set_offset creates a self-reinforcing positive feedback loop and results in unmanageable response.
- Returns:
- value of offset field
-
setOffset
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named offset.
Tooltip: Sends event and remembers last value sensed.- Warning: ROUTE connecting translation_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:
PlaneSensor- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
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:
getTrackPointin interfaceX3DDragSensorNode- Returns:
- value of trackPoint_changed field
-
getTranslation
float[] getTranslation()Provide array of 3-tuple float results from outputOnly SFVec3f field named translation_changed.
Tooltip: translation_changed events equal sum of relative translation change plus offset value.- 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 translation_changed field
-