Class TLspHeadLight


public class TLspHeadLight extends ALspDirectionalLight
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 Details

    • TLspHeadLight

      public TLspHeadLight(ILspView aView)
      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

      public TLspHeadLight(ILspView aView, Color aColor)
      Creates a new headlight with the given color.
      Parameters:
      aView - the view in which the light will be used
      aColor - the color of the light
  • Method Details

    • getDirectionVector

      public ILcdPoint 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's yaw offset. The pitch is fixed as per getPitch().
      Specified by:
      getDirectionVector in class ALspDirectionalLight
      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: