Class TLspHeadLight
java.lang.Object
com.luciad.view.lightspeed.services.effects.ALspGraphicsEffect
com.luciad.view.lightspeed.services.effects.ALspLight
com.luciad.view.lightspeed.services.effects.ALspDirectionalLight
com.luciad.view.lightspeed.services.effects.TLspHeadLight
A directional light source which automatically follows the orientation of
the viewer. In a 3D view, this means that the light follows the azimuth from
the eye point to the reference point of the camera. The direction can be
offset, however, using the
yaw offset
property. The vertical orientation, or pitch, of the camera does not impact
the direction of the headlight; instead, it uses its own independent
pitch
property.- Since:
- 2013.0
-
Constructor Summary
ConstructorDescriptionTLspHeadLight
(ILspView aView) Creates a new headlight for the given view.TLspHeadLight
(ILspView aView, Color aColor) Creates a new headlight with the given color. -
Method Summary
Modifier and TypeMethodDescriptionReturns a direction vector computed from the orientation of the viewer.double
getPitch()
Returns the pitch of the headlight, in degrees.double
Returns the yaw offset of the headlight.void
setPitch
(double aPitch) Sets the pitch of the headlight.void
setYawOffset
(double aYawOffset) Sets the yaw offset of the headlight.Methods inherited from class com.luciad.view.lightspeed.services.effects.ALspLight
equals, getColor, hashCode, setColor
Methods inherited from class com.luciad.view.lightspeed.services.effects.ALspGraphicsEffect
addPropertyChangeListener, firePropertyChange, isEnabled, removePropertyChangeListener, setEnabled
-
Constructor Details
-
TLspHeadLight
Creates a new headlight for the given view. The color of the light is set to white.- Parameters:
aView
- the view in which the light will be used
-
TLspHeadLight
Creates a new headlight with the given color.- Parameters:
aView
- the view in which the light will be usedaColor
- the color of the light
-
-
Method Details
-
getDirectionVector
Returns a direction vector computed from the orientation of the viewer. The azimuth (or yaw) of the light is that of the camera plus the light'syaw offset
. The pitch is fixed as pergetPitch()
.- Specified by:
getDirectionVector
in classALspDirectionalLight
- Returns:
- the direction vector of the light
-
getYawOffset
public double getYawOffset()Returns the yaw offset of the headlight. This is the angle between the yaw of the camera in the view and the direction of the light. The angle is expressed in degrees.- Returns:
- the yaw offset of the headlight in degrees
- See Also:
-
setYawOffset
public void setYawOffset(double aYawOffset) Sets the yaw offset of the headlight.- Parameters:
aYawOffset
- the yaw offset- See Also:
-
getPitch
public double getPitch()Returns the pitch of the headlight, in degrees. A value of -90 points down towards the ground, a value of 90 points straight up at the sky.- Returns:
- the pitch of the headlight
-
setPitch
public void setPitch(double aPitch) Sets the pitch of the headlight.- Parameters:
aPitch
- the pitch of the headlight- See Also:
-