public class SoVRMLSpotLight extends SoVRMLLight
SoVRMLSpotLight
node defines a light source that emits light from a specific point along a specific direction vector and constrained within a solid angle. SoVRMLSpotlights may illuminate geometry nodes that respond to light sources and intersect the solid angle. SoVRMLSpotlights are specified in their local coordinate system and are affected by parent transformations.
Note: SoVRMLSpotLights only illuminate objects in their enclosing parent group (similar to Directional lights). This is a slight deviation from the behavior described by the VRML97 specification.
<font color="#0000FF">NOTE:</font> This class does not exist in Open Inventor 10.0 and later.
This section describes the expected behavior of the node in a conforming VRML97 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.
This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at
The SoVRMLSpotLight
node defines a light source that emits light from a specific point along a specific direction vector and constrained within a solid angle. SoVRMLSpotlights may illuminate geometry nodes that respond to light sources and intersect the solid angle. SoVRMLSpotlights are specified in their local coordinate system and are affected by parent transformations.
See "Concepts - Light Sources" for a detailed description of ambientIntensity , color , intensity , and VRML's lighting equations. See "Concepts - Lighting Model" for a detailed description of the VRML lighting equations.
The location
field specifies a translation offset of the center point of the light source from the light's local coordinate system origin. This point is the apex of the solid angle which bounds light emission from the given light source. The direction
field specifies the direction vector of the light's central axis defined in its own local coordinate system. The on field specifies whether the light source emits lightradius
field specifies the radial extent of the solid angle and the maximum distance from location
than may be illuminated by the light source - the light source does not emit light outside this radius. The radius
must be >= 0.0.
The cutOffAngle
field specifies the outer bound of the solid angle. The light source does not emit light outside of this solid angle. The beamWidth
field specifies an inner solid angle in which the light source emits light at uniform full intensity. The light source's emission intensity drops off from the inner solid angle (beamWidth
) to the outer solid angle (cutOffAngle
). The drop off function from the inner angle to the outer angle is a cosine raised to a power function:
intensity(angle) = intensity * (cosine(angle) ** exponent) where exponent = 0.5*log(0.5)/log(cos(beamWidth)), intensity is the SpotLight's field value, intensity(angle) is the light intensity at an arbitrary angle from the direction vector, and angle ranges from 0.0 at central axis to cutOffAngle.
If beamWidth
> cutOffAngle
, then beamWidth
is assumed to be equal to cutOffAngle
and the light source emits full intensity within the entire solid angle defined by cutOffAngle
. Both beamWidth
and cutOffAngle
must be greater than 0.0 and less than or equal to pi/2. See the figure below for an illustration of the SoVRMLSpotLight
's field semantics (note: this example uses the default attenuation).
The light's illumination falls off with distance as specified by three attenuation
coefficients. The attenuation factor is
1/(
attenuation
[0] +
attenuation
[1]*r +
attenuation
[2]*r^2) , where
r is the distance of the light to the surface being illuminated. The default is no attenuation. An attenuation
value of 0 0 0 is identical to 1 0 0 . Attenuation values must be >= 0.0.
File format/default:
VRMLSpotLight {
ambientIntensity | 0 |
attenuation | 1 0 0 |
beamWidth | 1.570796 |
color | 1 1 1 |
cutOffAngle | 0.785398 |
direction | 0 0 -1 |
intensity | 1 |
location | 0 0 0 |
on | true |
radius | 100 |
metadata | NULL |
Action behavior:
SoGLRenderAction
Sets: SoGLLightIdElement
SoSFFloat | set_ambientIntensity |
SoSFVec3f | set_attenuation |
SoSFFloat | set_beamWidth |
SoSFColor | set_color |
SoSFFloat | set_cutOffAngle |
SoSFVec3f | set_direction |
SoSFFloat | set_intensity |
SoSFVec3f | set_location |
SoSFBool | set_on |
SoSFFloat | set_radius (Note: Not implemented) |
SoSFNode | set_metadata |
SoSFFloat | ambientIntensity_changed |
SoSFVec3f | attenuation_changed |
SoSFFloat | beamWidth_changed |
SoSFColor | color_changed |
SoSFFloat | cutOffAngle_changed |
SoSFVec3f | direction_changed |
SoSFFloat | intensity_changed |
SoSFVec3f | location_changed |
SoSFBool | on_changed |
SoSFFloat | radius_changed (Note: Not implemented) |
SoSFNode | metadata_changed |
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFVec3f |
attenuation
Deprecated.
Attenuation coefficients.
|
SoSFFloat |
beamWidth
Deprecated.
Inner solid angle of illumination.
|
SoSFFloat |
cutOffAngle
Deprecated.
Outer solid angle of illumination.
|
SoSFVec3f |
direction
Deprecated.
Direction vector of the light's central axis.
|
SoSFVec3f |
location
Deprecated.
Specifies a translation offset of the centerpoint of the light source from the light's local coordinate system origin.
|
SoSFFloat |
radius
Deprecated.
(Note: Not implemented) Specifies the radial extent of the solid angle and the maximum distances from
location that may be illuminated by the light source. |
ambientIntensity, color, intensity, on
metadata
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVRMLSpotLight()
Deprecated.
Constructor.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public final SoSFVec3f location
public final SoSFVec3f direction
public final SoSFFloat beamWidth
public final SoSFFloat cutOffAngle
public final SoSFFloat radius
location
that may be illuminated by the light source.public final SoSFVec3f attenuation
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com