com.jme3.terrain.geomipmap
クラス LODGeomap

java.lang.Object
  上位を拡張 com.jme3.terrain.GeoMap
      上位を拡張 com.jme3.terrain.geomipmap.LODGeomap
すべての実装されたインタフェース:
Savable

public class LODGeomap
extends GeoMap

Produces the mesh for the TerrainPatch. This LOD algorithm generates a single triangle strip by first building the center of the mesh, minus one outer edge around it. Then it builds the edges in counter-clockwise order, starting at the bottom right and working up, then left across the top, then down across the left, then right across the bottom. It needs to know what its neighbour's LOD's are so it can stitch the edges. It creates degenerate polygons in order to keep the winding order of the polygons and to move the strip to a new position while still maintaining the continuity of the overall mesh. These degenerates are removed quickly by the video card.


入れ子のクラスの概要
 class LODGeomap.VerboseIntBuffer
          Keeps a count of the number of indexes, good for debugging
 
コンストラクタの概要
LODGeomap()
           
LODGeomap(int size, java.nio.FloatBuffer heightMap)
           
 
メソッドの概要
 Mesh createMesh(Vector3f scale, Vector2f tcScale, Vector2f tcOffset, float offsetAmount, int totalSize, boolean center)
           
 Mesh createMesh(Vector3f scale, Vector2f tcScale, Vector2f tcOffset, float offsetAmount, int totalSize, boolean center, int lod, boolean rightLod, boolean topLod, boolean leftLod, boolean bottomLod)
           
 Vector2f getUV(int x, int y, Vector2f store, Vector2f offset, float offsetAmount, int totalSize)
           
 void read(JmeImporter im)
           
 void write(JmeExporter ex)
           
 java.nio.IntBuffer writeIndexArrayLodDiff(java.nio.IntBuffer store, int lod, boolean rightLod, boolean topLod, boolean leftLod, boolean bottomLod)
          Create the LOD index array that will seam its edges with its neighbour's LOD.
 java.nio.IntBuffer writeIndexArrayLodVariable(java.nio.IntBuffer store, int lod, int rightLod, int topLod, int leftLod, int bottomLod)
           
 java.nio.FloatBuffer writeNormalArray(java.nio.FloatBuffer store, Vector3f scale)
          Creates a normal array from the normal data in this Geomap
 java.nio.FloatBuffer writeTexCoordArray(java.nio.FloatBuffer store, Vector2f offset, Vector2f scale, float offsetAmount, int totalSize)
           
 
クラス com.jme3.terrain.GeoMap から継承されたメソッド
copySubGeomap, createMesh, getHeight, getHeightData, getMaximumValue, getNormal, getNormal, getNormalData, getUV, getUV, getValue, getValue, getWidth, hasNormalmap, isLoaded, populateHdataFromMesh, writeIndexArray, writeTexCoordArray, writeVertexArray
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

LODGeomap

public LODGeomap()

LODGeomap

public LODGeomap(int size,
                 java.nio.FloatBuffer heightMap)
メソッドの詳細

createMesh

public Mesh createMesh(Vector3f scale,
                       Vector2f tcScale,
                       Vector2f tcOffset,
                       float offsetAmount,
                       int totalSize,
                       boolean center)

createMesh

public Mesh createMesh(Vector3f scale,
                       Vector2f tcScale,
                       Vector2f tcOffset,
                       float offsetAmount,
                       int totalSize,
                       boolean center,
                       int lod,
                       boolean rightLod,
                       boolean topLod,
                       boolean leftLod,
                       boolean bottomLod)

writeTexCoordArray

public java.nio.FloatBuffer writeTexCoordArray(java.nio.FloatBuffer store,
                                               Vector2f offset,
                                               Vector2f scale,
                                               float offsetAmount,
                                               int totalSize)

getUV

public Vector2f getUV(int x,
                      int y,
                      Vector2f store,
                      Vector2f offset,
                      float offsetAmount,
                      int totalSize)

writeIndexArrayLodDiff

public java.nio.IntBuffer writeIndexArrayLodDiff(java.nio.IntBuffer store,
                                                 int lod,
                                                 boolean rightLod,
                                                 boolean topLod,
                                                 boolean leftLod,
                                                 boolean bottomLod)
Create the LOD index array that will seam its edges with its neighbour's LOD. This is a scary method!!! It will break your mind.

パラメータ:
store - to store the index buffer
lod - level of detail of the mesh
rightLod - LOD of the right neighbour
topLod - LOD of the top neighbour
leftLod - LOD of the left neighbour
bottomLod - LOD of the bottom neighbour
戻り値:
the LOD-ified index buffer

writeIndexArrayLodVariable

public java.nio.IntBuffer writeIndexArrayLodVariable(java.nio.IntBuffer store,
                                                     int lod,
                                                     int rightLod,
                                                     int topLod,
                                                     int leftLod,
                                                     int bottomLod)

writeNormalArray

public java.nio.FloatBuffer writeNormalArray(java.nio.FloatBuffer store,
                                             Vector3f scale)
クラス GeoMap の記述:
Creates a normal array from the normal data in this Geomap

オーバーライド:
クラス GeoMap 内の writeNormalArray
パラメータ:
store - A preallocated FloatBuffer where to store the data (optional), size must be >= getWidth()*getHeight()*3

write

public void write(JmeExporter ex)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
オーバーライド:
クラス GeoMap 内の write
例外:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
オーバーライド:
クラス GeoMap 内の read
例外:
java.io.IOException