Class SoftwareLightAmbient

java.lang.Object
gov.nih.mipav.view.renderer.J3D.SoftwareLight
gov.nih.mipav.view.renderer.J3D.SoftwareLightAmbient

public class SoftwareLightAmbient extends SoftwareLight
The class for ambient lights in a general lighting system to calculate ambient colors at a point in space. The other derived classes for lights make no ambient contribution, only diffuse and specular. As such, at most one ambient light is really needed in an environment.

See ShearWarpRendering.pdf for a detailed description of the lighting model.

  • Constructor Details

    • SoftwareLightAmbient

      public SoftwareLightAmbient()
      Construct an ambient light. The default colors are all black, the intensity is zero, and the light is off. The attenuation parameter are set to 1 (no attenuation) since an ambient light does not have a position that identifies its source.
    • SoftwareLightAmbient

      public SoftwareLightAmbient(SoftwareLightAmbient kThat)
      Copy (deep) constructor.
      Parameters:
      kThat - Light What to make "this" light like.
  • Method Details

    • colorOf

      public final javax.vecmath.Color3f colorOf(SoftwareMaterial kMaterial, SoftwareVertexProperty kVertexProperty, javax.vecmath.Point3f kEye)
      Compute the contribution of color from this light on the specified material with specified vertex properties.
      Specified by:
      colorOf in class SoftwareLight
      Parameters:
      kMaterial - SoftwareMaterial Default properties for the material including emissive, ambient, diffuse, and specular colors along with the specular shininess which can be used to disable specular highlighting.
      kVertexProperty - SoftwareVertexProperty Properties of the vertex which include its position and normal vector along with optional material property overrides for the diffuse and specular colors.
      kEye - Point3f The location of the observer in the coordinate system defined for the light.
      Returns:
      Color3f Reference to the computed color contribution by this light with this vertex and its material properties. The instance returned is owned by this light.
    • copy

      public SoftwareLight copy()
      Create a deep copy of this Light instance.
      Specified by:
      copy in class SoftwareLight
      Returns:
      Light Deep copy of this Light instance.