Class MipavLightingEffect

java.lang.Object
WildMagic.LibGraphics.ObjectSystem.GraphicsObject
WildMagic.LibGraphics.Effects.Effect
WildMagic.LibGraphics.Effects.ShaderEffect
gov.nih.mipav.view.renderer.WildMagic.Render.MipavLightingEffect
All Implemented Interfaces:
Serializable, WildMagic.LibGraphics.ObjectSystem.NameIdInterface, WildMagic.LibGraphics.ObjectSystem.StreamInterface

public class MipavLightingEffect extends WildMagic.LibGraphics.Effects.ShaderEffect
MipavLightingEffect uses the lights defined in the Volume/Surface/Tri-Planar view in the light shader.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final long
     

    Fields inherited from class WildMagic.LibGraphics.Effects.ShaderEffect

    m_iPassQuantity, m_kAlphaState, m_kCompiledPrograms, m_kPShader, m_kVShader
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a MIPAV lighting effect.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Blend(float fValue)
    Set surface blend value.
    void
    OnLoadPrograms(int iPass, WildMagic.LibGraphics.Shaders.Program pkVProgram, WildMagic.LibGraphics.Shaders.Program pkPProgram, WildMagic.LibGraphics.Shaders.Program pkCProgram)
    This function is called in LoadPrograms once the shader programs are created.
    void
    SetLight(String kLightType, float[] afType)
    Sets the light type for the given light.

    Methods inherited from class WildMagic.LibGraphics.Effects.ShaderEffect

    dispose, GetAllObjectsByName, GetBlending, GetCProgram, GetDiskUsed, GetObjectByID, GetObjectByName, GetPassQuantity, GetPProgram, GetSamplerInformation, GetTexture, GetTexture, GetTextureQuantity, GetVProgram, Link, Load, LoadPrograms, LoadResources, OnReleasePrograms, Register, ReleasePrograms, ReleaseResources, RestoreGlobalState, Save, SaveStrings, SetCProgram, SetDefaultAlphaState, SetGlobalState, SetPassQuantity, SetPShader, SetVShader

    Methods inherited from class WildMagic.LibGraphics.Effects.Effect

    Draw

    Methods inherited from class WildMagic.LibGraphics.ObjectSystem.GraphicsObject

    GetID, GetName, GetNextID, GetObjectByIDBase, GetObjectByNameBase, SetName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MipavLightingEffect

      public MipavLightingEffect()
      Creates a MIPAV lighting effect.
  • Method Details

    • Blend

      public void Blend(float fValue)
      Set surface blend value.
      Parameters:
      fValue - surface blend/transparency value.
    • OnLoadPrograms

      public void OnLoadPrograms(int iPass, WildMagic.LibGraphics.Shaders.Program pkVProgram, WildMagic.LibGraphics.Shaders.Program pkPProgram, WildMagic.LibGraphics.Shaders.Program pkCProgram)
      This function is called in LoadPrograms once the shader programs are created. It gives the ShaderEffect-derived classes a chance to do any additional work to hook up the effect with the low-level objects.
      Overrides:
      OnLoadPrograms in class WildMagic.LibGraphics.Effects.ShaderEffect
      Parameters:
      iPass - the ith rendering pass
    • SetLight

      public void SetLight(String kLightType, float[] afType)
      Sets the light type for the given light.
      Parameters:
      kLightType - the name of the light to set (Light0, Light1, etc.)
      afType - the type of light (Ambient = 0, Directional = 1, Point = 2, Spot = 3).