Interface ProximitySensor
- All Superinterfaces:
X3DChildNode
,X3DEnvironmentalSensorNode
,X3DNode
,X3DSensorNode
- All Known Implementing Classes:
ProximitySensor
public interface ProximitySensor extends X3DEnvironmentalSensorNode
ProximitySensor generates events when the viewer enters, exits and moves within a region of space (defined by a box).
X3D node tooltip: [X3DEnvironmentalSensorNode] ProximitySensor generates events when the viewer enters, exits and moves within a region of space (defined by a box).
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
X3D node tooltip: [X3DEnvironmentalSensorNode] ProximitySensor generates events when the viewer enters, exits and moves within a region of space (defined by a box).
- Hint: multiple USEd instances are cumulative, but avoid overlaps.
- Hint: can first use Transform to relocate/reorient box.
- Hint: surround entire world to start behaviors once scene is loaded.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
-
Method Summary
Modifier and Type Method Description float[]
getCenter()
Provide array of 3-tuple float results from inputOutput SFVec3f field named center.float[]
getCenterOfRotation()
Provide array of 3-tuple float results unit axis, angle (in radians) from outputOnly SFVec3f field named centerOfRotation_changed.boolean
getEnabled()
Provide boolean value from inputOutput SFBool field named enabled.double
getEnterTime()
Provide double value in seconds from outputOnly SFTime field named enterTime.double
getExitTime()
Provide double value in seconds from outputOnly SFTime field named exitTime.boolean
getIsActive()
Provide boolean value from outputOnly SFBool field named isActive.X3DMetadataObject
getMetadata()
Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.float[]
getOrientation()
Provide array of 4-tuple float results unit axis, angle (in radians) from outputOnly SFRotation field named orientation_changed.float[]
getPosition()
Provide array of 3-tuple float results from outputOnly SFVec3f field named position_changed.float[]
getSize()
Provide array of 3-tuple float results within allowed range of [0,infinity) from initializeOnly SFVec3f field named size.ProximitySensor
setCenter(float[] newValue)
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named center.ProximitySensor
setEnabled(boolean newValue)
Accessor method to assign boolean value to inputOutput SFBool field named enabled.ProximitySensor
setMetadata(X3DMetadataObject newValue)
Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.ProximitySensor
setSize(float[] newValue)
Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named size.
-
Method Details
-
getCenter
float[] getCenter()Provide array of 3-tuple float results from inputOutput SFVec3f field named center.
Tooltip: Position offset from origin of local coordinate system. *- Returns:
- value of center field
-
setCenter
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named center.
Tooltip: Position offset from origin of local coordinate system. *- Parameters:
newValue
- is new value for the center field.- Returns:
ProximitySensor
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCenterOfRotation
float[] getCenterOfRotation()Provide array of 3-tuple float results unit axis, angle (in radians) from outputOnly SFVec3f field named centerOfRotation_changed.
Tooltip: Sends changed centerOfRotation values, likely caused by user interaction.- 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 centerOfRotation_changed field
-
getEnabled
boolean getEnabled()Provide boolean value from inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
getEnabled
in interfaceX3DEnvironmentalSensorNode
- Specified by:
getEnabled
in 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:
setEnabled
in interfaceX3DEnvironmentalSensorNode
- Specified by:
setEnabled
in interfaceX3DSensorNode
- Parameters:
newValue
- is new value for the enabled field.- Returns:
ProximitySensor
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getEnterTime
double getEnterTime()Provide double value in seconds from outputOnly SFTime field named enterTime.
Tooltip: Time event generated when user's camera enters the box.- 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 enterTime field
-
getExitTime
double getExitTime()Provide double value in seconds from outputOnly SFTime field named exitTime.
Tooltip: Time event generated when user's camera exits the box.- 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 exitTime field
-
getIsActive
boolean getIsActive()Provide boolean value from outputOnly SFBool field named isActive.
Tooltip: isActive true/false events are sent as viewer enters/exits Proximity box. isActive=true when viewer enters Proximity box, isActive=false when viewer exits Proximity box.- 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 interfaceX3DEnvironmentalSensorNode
- Specified by:
getIsActive
in interfaceX3DSensorNode
- Returns:
- value of isActive field
-
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/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/core.html#Metadata
- Specified by:
getMetadata
in interfaceX3DChildNode
- Specified by:
getMetadata
in interfaceX3DEnvironmentalSensorNode
- Specified by:
getMetadata
in interfaceX3DNode
- Specified by:
getMetadata
in interfaceX3DSensorNode
- Returns:
- value of metadata field
- See Also:
- X3D Scene Authoring Hints: Metadata Nodes
-
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/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/core.html#Metadata
- Specified by:
setMetadata
in interfaceX3DChildNode
- Specified by:
setMetadata
in interfaceX3DEnvironmentalSensorNode
- Specified by:
setMetadata
in interfaceX3DNode
- Specified by:
setMetadata
in interfaceX3DSensorNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
ProximitySensor
- 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
-
getOrientation
float[] getOrientation()Provide array of 4-tuple float results unit axis, angle (in radians) from outputOnly SFRotation field named orientation_changed.
Tooltip: Sends rotation event relative to center.- 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 orientation_changed field
-
getPosition
float[] getPosition()Provide array of 3-tuple float results from outputOnly SFVec3f field named position_changed.
Tooltip: Sends translation event relative to center.- 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 position_changed field
-
getSize
float[] getSize()Provide array of 3-tuple float results within allowed range of [0,infinity) from initializeOnly SFVec3f field named size.
Tooltip: [0,+infinity) size of Proximity box.- Hint: size 0 0 0 is same as enabled false.
- Specified by:
getSize
in interfaceX3DEnvironmentalSensorNode
- Returns:
- value of size field
-
setSize
Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named size.
Tooltip: [0,+infinity) size of Proximity box.- Hint: size 0 0 0 is same as enabled false.
- Specified by:
setSize
in interfaceX3DEnvironmentalSensorNode
- Parameters:
newValue
- is new value for the size field.- Returns:
ProximitySensor
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-