Module imp3d

Class LightBase

java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp3d.objects.LightBase
All Implemented Interfaces:
Light, Scattering, Manageable, Shareable, Emitter, Light, Scattering
Direct Known Subclasses:
AmbientLight, DirectionalLight, PointLight

public abstract class LightBase extends ShareableBase implements Light
  • Field Details

    • color

      protected RGBColor color
    • visualize

      protected boolean visualize
    • numberofrays

      protected int numberofrays
    • raylength

      protected float raylength
    • $TYPE

      public static final LightBase.Type $TYPE
    • color$FIELD

      public static final SCOType.Field color$FIELD
    • shadowless$FIELD

      public static final SCOType.Field shadowless$FIELD
    • visualize$FIELD

      public static final SCOType.Field visualize$FIELD
    • numberofrays$FIELD

      public static final SCOType.Field numberofrays$FIELD
    • raylength$FIELD

      public static final SCOType.Field raylength$FIELD
  • Constructor Details

    • LightBase

      public LightBase()
  • Method Details

    • isShadowless

      public boolean isShadowless()
      Description copied from interface: Light
      Determines whether the light source casts shadows or not.
      Specified by:
      isShadowless in interface Light
      Returns:
      true iff the light source does not cast shadows
    • setShadowless

      public void setShadowless(boolean value)
    • isVisualize

      public boolean isVisualize()
    • setVisualize

      public void setVisualize(boolean value)
    • getNumberofrays

      public int getNumberofrays()
    • setNumberofrays

      public void setNumberofrays(int value)
    • getRaylength

      public float getRaylength()
    • setRaylength

      public void setRaylength(float value)
    • getColor

      public RGBColor getColor()
    • setColor

      public void setColor(RGBColor value)
    • getAverageColor

      public int getAverageColor()
      Description copied from interface: Scattering
      Returns an average color for the scattering entity. This color is used for simplified graphical representations of the corresponding objects.
      Specified by:
      getAverageColor in interface Scattering
      Returns:
      an average color in Java's default sRGB color space, encoded as an int (0xAARRGGBB).
    • getFlags

      public int getFlags()
      Specified by:
      getFlags in interface Scattering
    • isIgnoredWhenHit

      public boolean isIgnoredWhenHit()
      Description copied from interface: Light
      Determines whether the light source shall be ignored when a shot ray happens to hit the geometry of the light source.
      Specified by:
      isIgnoredWhenHit in interface Light
      Returns:
      true iff the light source shall be ignored
    • draw

      protected void draw(Tuple3f color, RenderState rs)
    • completeRay

      public double completeRay(Environment env, Point3d vertex, Ray out)
      Specified by:
      completeRay in interface Emitter
    • resolveLight

      public Light resolveLight()
      Specified by:
      resolveLight in interface Light