Class VolumePlaneEffect

  • All Implemented Interfaces:
    java.io.Serializable, WildMagic.LibGraphics.ObjectSystem.NameIdInterface, WildMagic.LibGraphics.ObjectSystem.StreamInterface

    public class VolumePlaneEffect
    extends WildMagic.LibGraphics.Effects.ShaderEffect
    implements WildMagic.LibGraphics.ObjectSystem.StreamInterface
    The VolumePlaneEffect ShaderEffect creates shaders for mapping the volume data onto the planes for the 3-orthogonal planes displayed in the VolumeViewer and for the PlaneRender objects.
    See Also:
    GPUVolumeRender.java, VolumeViewer.java, PlaneRender.java, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      VolumePlaneEffect​(VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, boolean bTransparent)
      Creates a new VolumeShaderEffect object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void Blend​(float fBlend)
      Sets the blend factor shader parameter between imageA and imageB.
      private java.lang.String createProgramText()  
      void dispose()
      memory cleanup.
      float GetBlend()
      Sets the blend factor shader parameter between imageA and imageB.
      private void Init()
      Initializes the ShaderEffect vertex and pixel shader programs.
      void OnLoadPrograms​(int iPass, WildMagic.LibGraphics.Shaders.Program pkVProgram, WildMagic.LibGraphics.Shaders.Program pkPProgram, WildMagic.LibGraphics.Shaders.Program pkCProgram)  
      WildMagic.LibGraphics.ObjectSystem.StringTree SaveStrings​(java.lang.String acTitle)  
      void setABBlend​(float fBlend)
      Sets the blend factor shader parameter between imageA and imageB.
      void setRGBTA​(ModelRGB RGBT)  
      void setRGBTB​(ModelRGB RGBT)  
      void ShowSurface​(boolean bOn)
      Turns rendering the planes with the surface mask on/off.
      • Methods inherited from class WildMagic.LibGraphics.Effects.ShaderEffect

        GetAllObjectsByName, GetBlending, GetCProgram, GetDiskUsed, GetObjectByID, GetObjectByName, GetPassQuantity, GetPProgram, GetSamplerInformation, GetTexture, GetTexture, GetTextureQuantity, GetVProgram, Link, Load, LoadPrograms, LoadResources, OnReleasePrograms, Register, ReleasePrograms, ReleaseResources, RestoreGlobalState, Save, 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
      • Methods inherited from interface WildMagic.LibGraphics.ObjectSystem.StreamInterface

        GetDiskUsed, Link, Load, Register, Save
    • Field Detail

      • m_kVolumeImageA

        private VolumeImage m_kVolumeImageA
        Shared volume data and textures.
      • m_kVolumeImageB

        private VolumeImage m_kVolumeImageB
        Shared volume data and textures.
      • m_bShowSurface

        private boolean m_bShowSurface
      • m_fBlend

        private float m_fBlend
      • m_kPShader

        private WildMagic.LibGraphics.Shaders.PixelShader m_kPShader
      • m_bTransparent

        private boolean m_bTransparent
      • basicParameters

        private static java.lang.String basicParameters
      • basicParametersB

        private static java.lang.String basicParametersB
      • basicParametersSurface

        private static java.lang.String basicParametersSurface
      • outputParameters

        private static java.lang.String outputParameters
      • outputParametersTransparency

        private static java.lang.String outputParametersTransparency
    • Constructor Detail

      • VolumePlaneEffect

        public VolumePlaneEffect​(VolumeImage kVolumeImageA,
                                 VolumeImage kVolumeImageB,
                                 boolean bTransparent)
        Creates a new VolumeShaderEffect object.
        Parameters:
        kVolumeImageA - the VolumeImage containing shared data and textures for rendering.
        kVolumeImageB - second VolumeImage.
        bUnique - when true the shader program must be unique.
    • Method Detail

      • Blend

        public void Blend​(float fBlend)
        Sets the blend factor shader parameter between imageA and imageB.
        Parameters:
        fBlend - blend factor (range = 0-1).
      • dispose

        public void dispose()
        memory cleanup.
        Overrides:
        dispose in class WildMagic.LibGraphics.Effects.ShaderEffect
      • GetBlend

        public float GetBlend()
        Sets the blend factor shader parameter between imageA and imageB.
        Parameters:
        fBlend - blend factor (range = 0-1).
      • OnLoadPrograms

        public void OnLoadPrograms​(int iPass,
                                   WildMagic.LibGraphics.Shaders.Program pkVProgram,
                                   WildMagic.LibGraphics.Shaders.Program pkPProgram,
                                   WildMagic.LibGraphics.Shaders.Program pkCProgram)
        Overrides:
        OnLoadPrograms in class WildMagic.LibGraphics.Effects.ShaderEffect
      • SaveStrings

        public WildMagic.LibGraphics.ObjectSystem.StringTree SaveStrings​(java.lang.String acTitle)
        Specified by:
        SaveStrings in interface WildMagic.LibGraphics.ObjectSystem.StreamInterface
        Overrides:
        SaveStrings in class WildMagic.LibGraphics.Effects.ShaderEffect
      • setABBlend

        public void setABBlend​(float fBlend)
        Sets the blend factor shader parameter between imageA and imageB.
        Parameters:
        fBlend - blend factor (range = 0-1).
      • setRGBTA

        public void setRGBTA​(ModelRGB RGBT)
      • setRGBTB

        public void setRGBTB​(ModelRGB RGBT)
      • ShowSurface

        public void ShowSurface​(boolean bOn)
        Turns rendering the planes with the surface mask on/off.
        Parameters:
        bOn - on/off.
      • Init

        private void Init()
        Initializes the ShaderEffect vertex and pixel shader programs.
      • createProgramText

        private java.lang.String createProgramText()