Class SurfaceLightingEffect
- java.lang.Object
- 
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
- 
- WildMagic.LibGraphics.Effects.Effect
- 
- WildMagic.LibGraphics.Effects.ShaderEffect
- 
- gov.nih.mipav.view.renderer.WildMagic.Render.VolumeClipEffect
- 
- gov.nih.mipav.view.renderer.WildMagic.Render.SurfaceLightingEffect
 
 
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- WildMagic.LibGraphics.ObjectSystem.NameIdInterface,- WildMagic.LibGraphics.ObjectSystem.StreamInterface
 
 public class SurfaceLightingEffect extends VolumeClipEffect Surface lighting uses the lights defined in the Volume/Surface/Tri-Planar view in the vertex and pixel shaders.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description private booleanm_bPerPixelLightingprivate booleanm_bUseNewImageprivate booleanm_bUseNewLUTprivate floatm_fBlendprivate intm_iReverseFaceprivate WildMagic.LibGraphics.Rendering.GraphicsImagem_kColorMapNewprivate ModelImagem_kImageNewprivate ModelStorageBasem_kLUTNewprivate WildMagic.LibGraphics.Shaders.PixelShaderm_kPPixelLightingprivate WildMagic.LibGraphics.Shaders.PixelShaderm_kPVertexLightingprivate VolumeImagem_kVolumeImageprivate WildMagic.LibGraphics.Rendering.GraphicsImagem_kVolumeImageNewprivate WildMagic.LibGraphics.Rendering.Texturem_kVolumeLUTNewprivate WildMagic.LibGraphics.Rendering.Texturem_kVolumeTextureNewprivate WildMagic.LibGraphics.Shaders.VertexShaderm_kVPixelLightingprivate WildMagic.LibGraphics.Shaders.VertexShaderm_kVVertexLightingprivate static longserialVersionUID- 
Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeClipEffectCLIP_A, CLIP_A_INV, CLIP_EYE, CLIP_EYE_INV, CLIP_X, CLIP_X_INV, CLIP_Y, CLIP_Y_INV, CLIP_Z, CLIP_Z_INV, m_aafClipData, m_afClipAll, m_afClipOBBAxis0, m_afClipOBBAxis1, m_afClipOBBAxis2, m_afClipOBBExtent, m_afClipSphereCenter, m_afClipSphereScale, m_afDoClip, m_afVolumeMatrix, m_bClipOBB, m_bClipSphere, MAX_CLIP_PLANES
 
- 
 - 
Constructor SummaryConstructors Constructor Description SurfaceLightingEffect(VolumeImage[] images, WildMagic.LibGraphics.Rendering.Texture colormap)SurfaceLightingEffect(VolumeImage kImageA, boolean bTransparent)Creates a LightingEffect
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidBlend(float fValue)Sets surface blend/transparency value for alph-blending in the shader.voiddispose()Delete memoryvoidDropper(WildMagic.LibFoundation.Mathematics.Vector3f kTexCoord, WildMagic.LibFoundation.Mathematics.ColorRGBA rkDropperColor)Reads the surface color from the texture map at the given location.voidOnLoadPrograms(int iPass, WildMagic.LibGraphics.Shaders.Program pkVProgram, WildMagic.LibGraphics.Shaders.Program pkPProgram, WildMagic.LibGraphics.Shaders.Program pkCProgram)voidSetClipping(boolean bClip)Enables/disables surface clipping for the per-pixel shader.private voidSetColorImage(WildMagic.LibGraphics.Shaders.Program pkCProgram)Sets the IsColor shader parameter values.voidSetImageNew(ModelImage kImage)Sets alternate volume data for texture mapping.voidSetLight(java.lang.String kLightType, float[] afType)Sets the light type for the given light.voidSetLUTNew(ModelStorageBase kLUT)Sets the alternate LUT for surface texture mapping.voidSetPerPixelLighting(boolean bOn)Sets the lighting shader to be per-pixel or per-vertex.voidSetReverseFace(int iReverse)Flag to reverse the direction of the triangle faces inside the vertex shader.voidSetSurfaceTexture(boolean bTextureOn, boolean bUseNewImage, boolean bUseNewLUT)Sets the surface texture on/off.- 
Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeClipEffectgetClip, getClipArb, getClipArbInv, getClipEnable, getClipEye, getClipEyeInv, getClipInv, getClipInvEnable, isClip, isClipAE, isClipOBB, isClipSphere, ResetClip, SetClip, SetClipArb, SetClipArbInv, SetClipEye, SetClipEyeInv, SetClipOBB, SetClipSphere, setVolumeMatrix
 - 
Methods inherited from class WildMagic.LibGraphics.Effects.ShaderEffectGetAllObjectsByName, 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
 
- 
 
- 
- 
- 
Field Detail- 
serialVersionUIDprivate static final long serialVersionUID - See Also:
- Constant Field Values
 
 - 
m_kVolumeImageprivate VolumeImage m_kVolumeImage 
 - 
m_fBlendprivate float m_fBlend 
 - 
m_iReverseFaceprivate int m_iReverseFace 
 - 
m_kVVertexLightingprivate WildMagic.LibGraphics.Shaders.VertexShader m_kVVertexLighting 
 - 
m_kPVertexLightingprivate WildMagic.LibGraphics.Shaders.PixelShader m_kPVertexLighting 
 - 
m_kVPixelLightingprivate WildMagic.LibGraphics.Shaders.VertexShader m_kVPixelLighting 
 - 
m_kPPixelLightingprivate WildMagic.LibGraphics.Shaders.PixelShader m_kPPixelLighting 
 - 
m_bPerPixelLightingprivate boolean m_bPerPixelLighting 
 - 
m_kVolumeTextureNewprivate WildMagic.LibGraphics.Rendering.Texture m_kVolumeTextureNew 
 - 
m_kVolumeImageNewprivate WildMagic.LibGraphics.Rendering.GraphicsImage m_kVolumeImageNew 
 - 
m_kVolumeLUTNewprivate WildMagic.LibGraphics.Rendering.Texture m_kVolumeLUTNew 
 - 
m_kColorMapNewprivate WildMagic.LibGraphics.Rendering.GraphicsImage m_kColorMapNew 
 - 
m_bUseNewLUTprivate boolean m_bUseNewLUT 
 - 
m_bUseNewImageprivate boolean m_bUseNewImage 
 - 
m_kImageNewprivate ModelImage m_kImageNew 
 - 
m_kLUTNewprivate ModelStorageBase m_kLUTNew 
 
- 
 - 
Constructor Detail- 
SurfaceLightingEffectpublic SurfaceLightingEffect(VolumeImage kImageA, boolean bTransparent) Creates a LightingEffect- Parameters:
- kImageA- VolumeImage containing data and textures for the effect.
 
 - 
SurfaceLightingEffectpublic SurfaceLightingEffect(VolumeImage[] images, WildMagic.LibGraphics.Rendering.Texture colormap) 
 
- 
 - 
Method Detail- 
Blendpublic void Blend(float fValue) Sets surface blend/transparency value for alph-blending in the shader.- Parameters:
- fValue- surface blend/transparency value for alph-blending in the shader.
 
 - 
disposepublic void dispose() Delete memory- Overrides:
- disposein class- VolumeClipEffect
 
 - 
Dropperpublic void Dropper(WildMagic.LibFoundation.Mathematics.Vector3f kTexCoord, WildMagic.LibFoundation.Mathematics.ColorRGBA rkDropperColor)Reads the surface color from the texture map at the given location.- Parameters:
- kTexCoord- texture location.
- rkDropperColor- returned color.
 
 - 
OnLoadProgramspublic void OnLoadPrograms(int iPass, WildMagic.LibGraphics.Shaders.Program pkVProgram, WildMagic.LibGraphics.Shaders.Program pkPProgram, WildMagic.LibGraphics.Shaders.Program pkCProgram)- Overrides:
- OnLoadProgramsin class- VolumeClipEffect
 
 - 
SetClippingpublic void SetClipping(boolean bClip) Enables/disables surface clipping for the per-pixel shader.- Parameters:
- bClip- surface clipping on/off.
 
 - 
SetImageNewpublic void SetImageNew(ModelImage kImage) Sets alternate volume data for texture mapping.- Parameters:
- kImage- alternate volume data for texture mapping.
 
 - 
SetLightpublic void SetLight(java.lang.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).
 
 - 
SetLUTNewpublic void SetLUTNew(ModelStorageBase kLUT) Sets the alternate LUT for surface texture mapping.- Parameters:
- kLUT- LUT for grayscale images.
- kRGBT- LUT for color images.
 
 - 
SetPerPixelLightingpublic void SetPerPixelLighting(boolean bOn) Sets the lighting shader to be per-pixel or per-vertex.- Parameters:
- bOn- turns per-pixel lighting on/off.
 
 - 
SetReverseFacepublic void SetReverseFace(int iReverse) Flag to reverse the direction of the triangle faces inside the vertex shader. Useful for rendering from inside a mesh.- Parameters:
- iReverse- 1 reverses the triangle face direction, 0 does nothing.
 
 - 
SetSurfaceTexturepublic void SetSurfaceTexture(boolean bTextureOn, boolean bUseNewImage, boolean bUseNewLUT)Sets the surface texture on/off.- Parameters:
- bTextureOn- texture on/off
- bUseNewImage- indicates which volume to use as the texture.
- bUseNewLUT- indicates which LUT to use.
 
 - 
SetColorImageprivate void SetColorImage(WildMagic.LibGraphics.Shaders.Program pkCProgram) Sets the IsColor shader parameter values.
 
- 
 
-