Class RipplingOceanEffect

    • Field Detail

      • m_afLightDir

        protected float[] m_afLightDir
        The light direction is a 3-tuple. The last component is unused.
      • m_afWaveDirX

        protected float[] m_afWaveDirX
        Wave x-direction:
      • m_afWaveDirY

        protected float[] m_afWaveDirY
        Wave y-direction:
      • m_afWaveSpeed

        protected float[] m_afWaveSpeed
        Wave speed:
      • m_afWaveOffset

        protected float[] m_afWaveOffset
        Wave offset:
      • m_afWaveHeight

        protected float[] m_afWaveHeight
        Wave height:
      • m_afBumpSpeed

        protected float[] m_afBumpSpeed
        Bump-map speed:
      • m_afConstants

        protected float[] m_afConstants
        Index 0 is averageDuDxDvDy, index 1 is ambient, index 2 is texture repeat, and index 3 is time.
    • Constructor Detail

      • RipplingOceanEffect

        public RipplingOceanEffect()
        streaming constructor
      • RipplingOceanEffect

        public RipplingOceanEffect​(java.lang.String acBumpName,
                                   java.lang.String acWaterName,
                                   java.lang.String acEnvName)
        Creates a new RipplingOceanEffect
        Parameters:
        acBumpName - the name for the BumpMap image file
        acWaterName - the name for the Water image file
        acEnvName - the name for the Environment image file
    • Method Detail

      • dispose

        public void dispose()
        Delete data members:
        Overrides:
        dispose in class ShaderEffect
      • GetAmbient

        public float GetAmbient()
        Returns the Ambient value
        Returns:
        the Ambient value
      • GetAverageDuDxDvDy

        public float GetAverageDuDxDvDy()
        Returns the Average DuDxDvDy value
        Returns:
        the Average DuDxDvDy value
      • GetBumpSpeed

        public void GetBumpSpeed​(float[] afValue)
        Returns the Bump speed values
        Parameters:
        afValue - return parameter for the Bump speed values.
      • GetDiskUsed

        public int GetDiskUsed​(StreamVersion rkVersion)
        Returns the size of this object and it's children on disk for the current StreamVersion parameter.
        Specified by:
        GetDiskUsed in interface StreamInterface
        Overrides:
        GetDiskUsed in class ShaderEffect
        Parameters:
        rkVersion - the current version of the Stream file being created.
        Returns:
        the size of this object on disk.
      • GetLightDir

        public Vector3f GetLightDir()
        Returns the Light direction
        Returns:
        the light direction vector.
      • GetTextureRepeat

        public float GetTextureRepeat()
        Returns the Texture repeat value
        Returns:
        the Texture repeat value
      • GetTime

        public float GetTime()
        Returns the animation time value
        Returns:
        the animation time value
      • GetWaveDirX

        public void GetWaveDirX​(float[] afValue)
        Returns the Wave x-direction
        Parameters:
        afValue - return parameter for the Wave x-direction values.
      • GetWaveDirY

        public void GetWaveDirY​(float[] afValue)
        Returns the Wave y-direction
        Parameters:
        afValue - return parameter for the Wave y-direction values.
      • GetWaveHeight

        public void GetWaveHeight​(float[] afValue)
        Returns the Wave height values
        Parameters:
        afValue - return parameter for the Wave height values.
      • GetWaveOffset

        public void GetWaveOffset​(float[] afValue)
        Returns the Wave offset values
        Parameters:
        afValue - -- return parameter the Wave offset values.
      • GetWaveSpeed

        public void GetWaveSpeed​(float[] afValue)
        Returns the Wave speed values
        Parameters:
        afValue - -- return parameter the Wave speed values.
      • Link

        public void Link​(Stream rkStream,
                         Stream.Link pkLink)
        Copies this objects children objects from the input Stream's HashTable, based on the LinkID of the child stored in the pkLink parameter.
        Specified by:
        Link in interface StreamInterface
        Overrides:
        Link in class ShaderEffect
        Parameters:
        rkStream - the Stream where the child objects are stored.
        pkLink - the Link class from which the child object IDs are read.
      • Load

        public void Load​(Stream rkStream,
                         Stream.Link pkLink)
        Loads this object from the input parameter rkStream, using the input Stream.Link to store the IDs of children objects of this object for linking after all objects are loaded from the Stream.
        Specified by:
        Load in interface StreamInterface
        Overrides:
        Load in class ShaderEffect
        Parameters:
        rkStream - the Stream from which this object is being read.
        pkLink - the Link class for storing the IDs of this object's children objects.
      • OnLoadPrograms

        public void OnLoadPrograms​(int iPass,
                                   Program pkVProgram,
                                   Program pkPProgram,
                                   Program pkCProgram)
        Exchange information between the effect and the programs.
        Overrides:
        OnLoadPrograms in class ShaderEffect
        Parameters:
        iPass - the rendering pass
        pkVProgram - the Vertex Program
        pkPProgram - the Pixel Program
      • Register

        public boolean Register​(Stream rkStream)
        Registers this object with the input Stream parameter. All objects streamed to disk are registered with the Stream so that a unique list of objects is maintained.
        Specified by:
        Register in interface StreamInterface
        Overrides:
        Register in class ShaderEffect
        Parameters:
        rkStream - the Stream where the child objects are stored.
        Returns:
        true if this object is registered, false if the object has already been registered.
      • Save

        public void Save​(Stream rkStream)
        Write this object and all it's children to the Stream.
        Specified by:
        Save in interface StreamInterface
        Overrides:
        Save in class ShaderEffect
        Parameters:
        rkStream - the Stream where the child objects are stored.
      • SaveStrings

        public StringTree SaveStrings​(java.lang.String acTitle)
        Write this object into a StringTree for the scene-graph visualization.
        Specified by:
        SaveStrings in interface StreamInterface
        Overrides:
        SaveStrings in class ShaderEffect
        Parameters:
        acTitle - the header for this object in the StringTree.
        Returns:
        StringTree containing a String-based representation of this object and it's children.
      • SetAmbient

        public void SetAmbient​(float fValue)
        Sets the Ambient value
        Parameters:
        fValue - the Ambient value
      • SetAverageDuDxDvDy

        public void SetAverageDuDxDvDy​(float fValue)
        Sets the Average DuDxDvDy value
        Parameters:
        fValue - the Average DuDxDvDy value
      • SetBumpSpeed

        public void SetBumpSpeed​(float[] afValue)
        Sets the Bump speed values
        Parameters:
        afValue - the Bump speed values.
      • SetLightDir

        public void SetLightDir​(Vector3f rkLightDir)
        Sets the Light direction
        Parameters:
        rkLightDir - the light direction vector.
      • SetTextureRepeat

        public void SetTextureRepeat​(float fValue)
        Sets the Texture repeat value
        Parameters:
        fValue - the Texture repeat value
      • SetTime

        public void SetTime​(float fValue)
        Sets the animation time value
        Parameters:
        fValue - the animation time value
      • SetWaveDirX

        public void SetWaveDirX​(float[] afValue)
        Sets the Wave x-direction
        Parameters:
        afValue - the Wave x-direction values.
      • SetWaveDirY

        public void SetWaveDirY​(float[] afValue)
        Sets the Wave y-direction
        Parameters:
        afValue - the Wave y-direction values.
      • SetWaveHeight

        public void SetWaveHeight​(float[] afValue)
        Sets the Wave height values
        Parameters:
        afValue - the Wave height values.
      • SetWaveOffset

        public void SetWaveOffset​(float[] afValue)
        Sets the Wave offset values
        Parameters:
        afValue - the Wave offset values.
      • SetWaveSpeed

        public void SetWaveSpeed​(float[] afValue)
        Sets the Wave speed values
        Parameters:
        afValue - the Wave speed values.