Interface Fog
- All Superinterfaces:
X3DBindableNode
,X3DChildNode
,X3DFogObject
,X3DNode
- All Known Implementing Classes:
Fog
Fog simulates atmospheric effects by blending distant objects with fog color.
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
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
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.
Fog node tooltip: [X3DBindableNode,X3DFogObject] Fog simulates atmospheric effects by blending distant objects with fog color.
- Hint: Background, Fog, GeoViewpoint, NavigationInfo, OrthoViewpoint, TextureBackground and Viewpoint are bindable nodes, meaning that no more than one of each node type can be active at a given time.
- Warning: results are undefined if a bindable node (Background, Fog, NavigationInfo, OrthoViewpoint, TextureBackground, Viewpoint) is a contained descendant node of either LOD or Switch. Avoid this authoring pattern.
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 TypeMethodDescriptiondouble
Provide double value in seconds from outputOnly SFTime field named bindTime.float[]
getColor()
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named color.Provide String enumeration value (baseType xs:NMTOKEN) ["LINEAR" | "EXPONENTIAL"] from inputOutput SFString field named fogType.boolean
Provide boolean value from outputOnly SFBool field named isBound.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.float
Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named visibilityRange.setColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named color.setFogType
(String newValue) Accessor method to assign String enumeration value ("LINEAR" | "EXPONENTIAL") to inputOutput SFString field named fogType.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setVisibilityRange
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named visibilityRange.
-
Method Details
-
getBindTime
double getBindTime()Provide double value in seconds from outputOnly SFTime field named bindTime.
Tooltip: Event sent reporting timestamp when node becomes active/inactive.- 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:
getBindTime
in interfaceX3DBindableNode
- Returns:
- value of bindTime field
-
getColor
float[] getColor()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named color.
Tooltip: [0,1] Fog color.- Hint: match Background color to make objects fade away.
- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Specified by:
getColor
in interfaceX3DFogObject
- Returns:
- value of color field
-
setColor
Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named color.
Tooltip: [0,1] Fog color.- Hint: match Background color to make objects fade away.
- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Specified by:
setColor
in interfaceX3DFogObject
- Parameters:
newValue
- is new value for the color field.- Returns:
Fog
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFogType
String getFogType()Provide String enumeration value (baseType xs:NMTOKEN) ["LINEAR" | "EXPONENTIAL"] from inputOutput SFString field named fogType.
Tooltip: Specifies algorithm for rate of increasing Fog, either LINEAR or EXPONENTIAL.- Hint: EXPONENTIAL is more natural but also more computationally expensive.
- Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
- Specified by:
getFogType
in interfaceX3DFogObject
- Returns:
- value of fogType field
-
setFogType
Accessor method to assign String enumeration value ("LINEAR" | "EXPONENTIAL") to inputOutput SFString field named fogType.
Tooltip: Specifies algorithm for rate of increasing Fog, either LINEAR or EXPONENTIAL.- Hint: EXPONENTIAL is more natural but also more computationally expensive.
- Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
- Specified by:
setFogType
in interfaceX3DFogObject
- Parameters:
newValue
- is new value for the fogType field.- Returns:
Fog
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getIsBound
boolean getIsBound()Provide boolean value from outputOnly SFBool field named isBound.
Tooltip: Output event true gets sent when node becomes bound and activated, otherwise output event false gets sent when node becomes unbound and deactivated.- Hint: paired node operations can be established by connecting set_bind and isBound fields of corresponding bindable nodes.
- 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:
getIsBound
in interfaceX3DBindableNode
- Returns:
- value of isBound 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/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/core.html#Metadata
- Specified by:
getMetadata
in interfaceX3DBindableNode
- Specified by:
getMetadata
in interfaceX3DChildNode
- Specified by:
getMetadata
in interfaceX3DNode
- 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:
setMetadata
in interfaceX3DBindableNode
- Specified by:
setMetadata
in interfaceX3DChildNode
- Specified by:
setMetadata
in interfaceX3DNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
Fog
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getVisibilityRange
float getVisibilityRange()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named visibilityRange.
Tooltip: Distance in meters where objects are totally obscured by the fog, using local coordinate system.- Hint: visibilityRange 0 disables Fog.
- Specified by:
getVisibilityRange
in interfaceX3DFogObject
- Returns:
- value of visibilityRange field
-
setVisibilityRange
Accessor method to assign float value to inputOutput SFFloat field named visibilityRange.
Tooltip: Distance in meters where objects are totally obscured by the fog, using local coordinate system.- Hint: visibilityRange 0 disables Fog.
- Specified by:
setVisibilityRange
in interfaceX3DFogObject
- Parameters:
newValue
- is new value for the visibilityRange field.- Returns:
Fog
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-