edu.uprm.ece.terrainrenderer
Class ModelData

java.lang.Object
  extended by edu.uprm.ece.terrainrenderer.ModelData

public class ModelData
extends java.lang.Object

Author:
Ricardo Veguilla (veguilla@ece.uprm.edu)

Field Summary
static int COLOR_ID
           
private  float[] colors
           
private  java.nio.IntBuffer idBuffer
           
static int INDEX_ID
           
private  int[] indices
           
static int NORMAL_ID
           
private  float[] normals
           
private  float scale
           
private  java.awt.Dimension size
           
static int VERTEX_ID
           
private  float[] vertices
           
 
Constructor Summary
ModelData()
           
ModelData(float[] elevations, java.awt.Dimension size)
           
 
Method Summary
 java.nio.FloatBuffer getColorBuffer()
           
 float[] getColors()
           
 java.nio.IntBuffer getIdBuffer()
           
 java.nio.IntBuffer getIndexBuffer()
           
 int[] getIndices()
           
 java.nio.FloatBuffer getNormalBuffer()
           
 float[] getNormals()
           
 float getScale()
           
 java.awt.Dimension getSize()
           
 java.nio.FloatBuffer getVertexBuffer()
           
 float[] getVertices()
           
 void setColors(float[] colors)
           
 void setIdBuffer(java.nio.IntBuffer idBuffer)
           
 void setIndices(int[] indices)
           
 void setNormals(float[] normals)
           
 void setScale(float scale)
           
 void setSize(java.awt.Dimension size)
           
 void setVertices(float[] vertices)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERTEX_ID

public static final int VERTEX_ID
See Also:
Constant Field Values

COLOR_ID

public static final int COLOR_ID
See Also:
Constant Field Values

NORMAL_ID

public static final int NORMAL_ID
See Also:
Constant Field Values

INDEX_ID

public static final int INDEX_ID
See Also:
Constant Field Values

idBuffer

private java.nio.IntBuffer idBuffer

vertices

private float[] vertices

normals

private float[] normals

indices

private int[] indices

colors

private float[] colors

size

private java.awt.Dimension size

scale

private float scale
Constructor Detail

ModelData

public ModelData(float[] elevations,
                 java.awt.Dimension size)
Parameters:
vertices -
size -

ModelData

public ModelData()
Method Detail

getSize

public java.awt.Dimension getSize()
Returns:
Returns the size.

setSize

public void setSize(java.awt.Dimension size)
Parameters:
size - The size to set.

getScale

public float getScale()
Returns:
Returns the scale.

setScale

public void setScale(float scale)
Parameters:
scale - The scale to set.

getVertices

public float[] getVertices()
Returns:
Returns the vertices.

setVertices

public void setVertices(float[] vertices)
Parameters:
vertices - The vertices to set.

getNormals

public float[] getNormals()
Returns:
Returns the normals.

setNormals

public void setNormals(float[] normals)
Parameters:
normals - The normals to set.

getIndices

public int[] getIndices()

setIndices

public void setIndices(int[] indices)

getColors

public float[] getColors()

setColors

public void setColors(float[] colors)

getVertexBuffer

public java.nio.FloatBuffer getVertexBuffer()

getColorBuffer

public java.nio.FloatBuffer getColorBuffer()

getNormalBuffer

public java.nio.FloatBuffer getNormalBuffer()

getIndexBuffer

public java.nio.IntBuffer getIndexBuffer()

getIdBuffer

public java.nio.IntBuffer getIdBuffer()

setIdBuffer

public void setIdBuffer(java.nio.IntBuffer idBuffer)