Class TerrainMesh


  • public class TerrainMesh
    extends Object
    Class that represent one terrain grid and its morphing variants into lower lod
    Author:
    Darius Dinger
    • Constructor Detail

      • TerrainMesh

        public TerrainMesh​(VertexArrayObject vao,
                           IndexBuffer fullMesh,
                           IndexBuffer morphT,
                           IndexBuffer morphB,
                           IndexBuffer morphR,
                           IndexBuffer morphL,
                           IndexBuffer morphTL,
                           IndexBuffer morphTR,
                           IndexBuffer morphBL,
                           IndexBuffer morphBR)
        Create new terrain mesh with its morphing variants into lower lod
        Parameters:
        vao - VertexArrayObject of the mesh with all vertices
        fullMesh - Indices for full terrain mesh without morphing
        morphT - Indices for terrain mesh with top morphing
        morphB - Indices for terrain mesh with bottom morphing
        morphR - Indices for terrain mesh with right morphing
        morphL - Indices for terrain mesh with left morphing
        morphTL - Indices for terrain mesh with top left morphing
        morphTR - Indices for terrain mesh with top right morphing
        morphBL - Indices for terrain mesh with bottom left morphing
        morphBR - Indices for terrain mesh with bottom right morphing
    • Method Detail

      • getVao

        public VertexArrayObject getVao()
        Returns:
        VertexArrayObject of the mesh with all vertices
      • getFullMesh

        public IndexBuffer getFullMesh()
        Returns:
        Indices for full terrain mesh without morphing
      • getMorphT

        public IndexBuffer getMorphT()
        Returns:
        Indices for terrain mesh with top morphing
      • getMorphB

        public IndexBuffer getMorphB()
        Returns:
        Indices for terrain mesh with bottom morphing
      • getMorphR

        public IndexBuffer getMorphR()
        Returns:
        Indices for terrain mesh with right morphing
      • getMorphL

        public IndexBuffer getMorphL()
        Returns:
        Indices for terrain mesh with left morphing
      • getMorphTL

        public IndexBuffer getMorphTL()
        Returns:
        Indices for terrain mesh with top left morphing
      • getMorphTR

        public IndexBuffer getMorphTR()
        Returns:
        Indices for terrain mesh with top right morphing
      • getMorphBL

        public IndexBuffer getMorphBL()
        Returns:
        Indices for terrain mesh with bottom left morphing
      • getMorphBR

        public IndexBuffer getMorphBR()
        Returns:
        Indices for terrain mesh with bottom right morphing
      • getInstance

        public static TerrainMesh getInstance()
        Returns:
        Get terrain mesh singleton instance