Interface DirectionalLight
- All Superinterfaces:
X3DChildNode,X3DLightNode,X3DNode
- All Known Implementing Classes:
DirectionalLight
DirectionalLight might not be scoped by parent Group or Transform at levels 1 or 2.
DirectionalLight node tooltip: [X3DLightNode] DirectionalLight defines parallel light rays that illuminate geometric shapes. Lighting illuminates all geometry except lines and points. By default, light scope only illuminates peer geometry and children nodes within the scene graph hierarchy. No source location is needed since rays are parallel from an infinitely distant source. DirectionalLight nodes do not attenuate with distance. Lights have no visible shape themselves and lighting effects continue through any intermediate geometry.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
DirectionalLight node tooltip: [X3DLightNode] DirectionalLight defines parallel light rays that illuminate geometric shapes. Lighting illuminates all geometry except lines and points. By default, light scope only illuminates peer geometry and children nodes within the scene graph hierarchy. No source location is needed since rays are parallel from an infinitely distant source. DirectionalLight nodes do not attenuate with distance. Lights have no visible shape themselves and lighting effects continue through any intermediate geometry.
- Hint: animate direction to simulate time-of-day sunlight effects.
- Hint: the bound NavigationInfo controls whether headlight is enabled on/off. Interchange profile
- Hint: light might not be scoped by parent Group or Transform.
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 TypeMethodDescriptionfloatProvide float value within allowed range of [0,1] from inputOutput SFFloat field named ambientIntensity.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.float[]Provide array of 3-tuple float results from inputOutput SFVec3f field named direction.booleanProvide boolean value from inputOutput SFBool field named global.floatProvide float value within allowed range of [0,infinity) from inputOutput SFFloat field named intensity.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.booleangetOn()Provide boolean value from inputOutput SFBool field named on.floatProvide float value within allowed range of [0,1] from inputOutput SFFloat field named shadowIntensity.booleanProvide boolean value from inputOutput SFBool field named shadows.setAmbientIntensity(float newValue) Accessor method to assign float value to inputOutput SFFloat field named ambientIntensity.setColor(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named color.setDirection(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named direction.setGlobal(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named global.setIntensity(float newValue) Accessor method to assign float value to inputOutput SFFloat field named intensity.setMetadata(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setOn(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named on.setShadowIntensity(float newValue) Accessor method to assign float value to inputOutput SFFloat field named shadowIntensity.setShadows(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named shadows.
-
Method Details
-
getAmbientIntensity
float getAmbientIntensity()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named ambientIntensity.
Tooltip: [0,1] Brightness of ambient (nondirectional background) emission from the light. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
getAmbientIntensityin interfaceX3DLightNode- Returns:
- value of ambientIntensity field
-
setAmbientIntensity
Accessor method to assign float value to inputOutput SFFloat field named ambientIntensity.
Tooltip: [0,1] Brightness of ambient (nondirectional background) emission from the light. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
setAmbientIntensityin interfaceX3DLightNode- Parameters:
newValue- is new value for the ambientIntensity field.- Returns:
DirectionalLight- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
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] color of light, applied to colors of objects.- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Specified by:
getColorin interfaceX3DLightNode- 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] color of light, applied to colors of objects.- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Specified by:
setColorin interfaceX3DLightNode- Parameters:
newValue- is new value for the color field.- Returns:
DirectionalLight- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDirection
float[] getDirection()Provide array of 3-tuple float results from inputOutput SFVec3f field named direction.
Tooltip: Orientation vector of light relative to local coordinate system.- Hint: animate direction to simulate time-of-day sunlight effects.
- Returns:
- value of direction field
-
setDirection
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named direction.
Tooltip: Orientation vector of light relative to local coordinate system.- Hint: animate direction to simulate time-of-day sunlight effects.
- Parameters:
newValue- is new value for the direction field.- Returns:
DirectionalLight- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getGlobal
boolean getGlobal()Provide boolean value from inputOutput SFBool field named global.
Tooltip: Global lights illuminate all objects within their volume of lighting influence. Scoped lights only illuminate objects within the same transformation hierarchy.- Warning: DirectionalLight default global=false to limit scope and avoid inadvertently illuminating every object in a large scene. PointLight and SpotLight default global=true since their effects are each limited by maximum radius value.
- Returns:
- value of global field
-
setGlobal
Accessor method to assign boolean value to inputOutput SFBool field named global.
Tooltip: Global lights illuminate all objects within their volume of lighting influence. Scoped lights only illuminate objects within the same transformation hierarchy.- Warning: DirectionalLight default global=false to limit scope and avoid inadvertently illuminating every object in a large scene. PointLight and SpotLight default global=true since their effects are each limited by maximum radius value.
- Parameters:
newValue- is new value for the global field.- Returns:
DirectionalLight- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getIntensity
float getIntensity()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named intensity.
Tooltip: [0,+infinity] Brightness of direct emission from the light. *- Specified by:
getIntensityin interfaceX3DLightNode- Returns:
- value of intensity field
-
setIntensity
Accessor method to assign float value to inputOutput SFFloat field named intensity.
Tooltip: [0,+infinity] Brightness of direct emission from the light. *- Specified by:
setIntensityin interfaceX3DLightNode- Parameters:
newValue- is new value for the intensity field.- Returns:
DirectionalLight- 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 interfaceX3DLightNode- Specified by:
getMetadatain 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:
setMetadatain interfaceX3DChildNode- Specified by:
setMetadatain interfaceX3DLightNode- Specified by:
setMetadatain interfaceX3DNode- Parameters:
newValue- is new value for the metadata field.- Returns:
DirectionalLight- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getOn
boolean getOn()Provide boolean value from inputOutput SFBool field named on.
Tooltip: Enables/disables this light source. *- Specified by:
getOnin interfaceX3DLightNode- Returns:
- value of on field
-
setOn
Accessor method to assign boolean value to inputOutput SFBool field named on.
Tooltip: Enables/disables this light source. *- Specified by:
setOnin interfaceX3DLightNode- Parameters:
newValue- is new value for the on field.- Returns:
DirectionalLight- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getShadowIntensity
float getShadowIntensity()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named shadowIntensity.
Tooltip: [0,1] shadowIntensity field defines how much light is obscured by shapes that cast shadows, ranging from 0 (light not obscured, no visible shadows) to 1 (light completely obscured, full-intensity shadows). *- Specified by:
getShadowIntensityin interfaceX3DLightNode- Returns:
- value of shadowIntensity field
-
setShadowIntensity
Accessor method to assign float value to inputOutput SFFloat field named shadowIntensity.
Tooltip: [0,1] shadowIntensity field defines how much light is obscured by shapes that cast shadows, ranging from 0 (light not obscured, no visible shadows) to 1 (light completely obscured, full-intensity shadows). *- Specified by:
setShadowIntensityin interfaceX3DLightNode- Parameters:
newValue- is new value for the shadowIntensity field.- Returns:
DirectionalLight- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getShadows
boolean getShadows()Provide boolean value from inputOutput SFBool field named shadows.
Tooltip: shadows field indicates whether or not this light casts a shadow behind illuminated X3DShapeNode geometry. *- Specified by:
getShadowsin interfaceX3DLightNode- Returns:
- value of shadows field
-
setShadows
Accessor method to assign boolean value to inputOutput SFBool field named shadows.
Tooltip: shadows field indicates whether or not this light casts a shadow behind illuminated X3DShapeNode geometry. *- Specified by:
setShadowsin interfaceX3DLightNode- Parameters:
newValue- is new value for the shadows field.- Returns:
DirectionalLight- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-