|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JHeightMap.JDefaultDataMap
public class JDefaultDataMap
Class JDefaultDataMap extends class AbstractDataMap (first level). Class used to create all of necessary data for height map. The class JDefaultDataMap is designed to store data for class JDefaultHeightMap
Field Summary | |
---|---|
protected int |
height
width loaded maps |
protected int[] |
indexes
array points height map |
protected float |
maxHeight
height loaded maps |
protected javax.vecmath.Vector3f[] |
normals
array indexes points |
protected javax.vecmath.Point3f[] |
points
maximum value from loaded maps |
protected float |
stepX
array values, where the value is a number of used points in row (TriangleStrip, LineStrip) |
protected float |
stepY
step in the x-axis |
protected int[] |
stripCounts
array normals points |
protected int |
width
|
Constructor Summary | |
---|---|
JDefaultDataMap(JHeightMap.AbstractLoadMap load)
The constructor creates an arrays: array points, array normals, array indexes and array strip (for TriangleStrip)from input values. |
|
JDefaultDataMap(float[] dataArea)
The constructor creates an arrays: array points, array normals, array indexes and array strip (for TriangleStrip)from input values. |
|
JDefaultDataMap(float[] dataArea,
float dX,
float dY)
The constructor creates an arrays: array points, array normals, array indexes and array strip (for TriangleStrip)from input values. |
|
JDefaultDataMap(float[] dataArea,
int widthMap,
int heightMap)
The constructor creates an arrays: array points, array normals, array indexes and array strip (for TriangleStrip)from input values. |
|
JDefaultDataMap(float[] dataArea,
int widthMap,
int heightMap,
float dX,
float dY)
The constructor creates an arrays: array points, array normals, array indexes and array strip (for TriangleStrip)from input values. |
|
JDefaultDataMap(javax.vecmath.Point3f[] dataAreaPoints)
The constructor creates an arrays: array points, array normals, array indexes and array strip (for TriangleStrip)from input values. |
|
JDefaultDataMap(javax.vecmath.Point3f[] dataAreaPoints,
int[] indexes)
The constructor creates an arrays: array points, array normals, array indexes and array strip (for TriangleStrip)from input values. |
|
JDefaultDataMap(javax.vecmath.Point3f[] dataAreaPoints,
javax.vecmath.Vector3f[] normals)
The constructor creates an arrays: array points, array normals, array indexes and array strip (for TriangleStrip)from input values. |
Method Summary | |
---|---|
void |
createDataMap(float[] dataArea,
float stepX,
float stepY)
The method creates points from values (z-coordinates) loaded map. |
void |
createIndexes()
The method creates indexes points of the height map. |
void |
createNormals()
The method creates normals points of the height map. |
void |
createStripCounts()
The method create array values (for TriangleStrip). |
int |
getHeight()
The method returns height loaded map. |
int[] |
getIndexes()
The method returns array indexes of a height map. |
javax.vecmath.Vector3f[] |
getNormals()
The method returns array normals of a height map. |
javax.vecmath.Point3f[] |
getPoints()
The method returns array points of a height map. |
float |
getStepX()
The method returns step in the x-axis. |
float |
getStepY()
The method returns step in the y-axis. |
int[] |
getStripCounts()
The method returns array values (for TriangleStrip) of a height map. |
int |
getWidth()
The method returns width loaded map. |
static float[] |
matrix2vector(float[][] matrix)
Converts matrix array to vector |
static float[] |
matrix2vector(float[][] matrix,
double multiple)
Converts matrix array to vector and multiplies values with the coefficient |
void |
setIndexes(int[] areaIndexes)
The method sets array indexes. |
void |
setStripCounts(int[] areaStripCounts)
The method sets array values for TriangleStrip. |
boolean |
validDimension()
The method controls the dimensions loaded map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int width
protected int height
protected float maxHeight
protected javax.vecmath.Point3f[] points
protected int[] indexes
protected javax.vecmath.Vector3f[] normals
protected int[] stripCounts
protected float stepX
protected float stepY
Constructor Detail |
---|
public JDefaultDataMap(float[] dataArea)
dataArea
- Values of height mappublic JDefaultDataMap(float[] dataArea, int widthMap, int heightMap)
dataArea
- Values of height mapwidthMap
- width height mapheightMap
- height loaded height mappublic JDefaultDataMap(float[] dataArea, int widthMap, int heightMap, float dX, float dY)
dataArea
- Values of height mapwidthMap
- width height mapheightMap
- height loaded height mapdX
- step in the x-axisdY
- step in the y-axispublic JDefaultDataMap(JHeightMap.AbstractLoadMap load)
load
- Data is loaded for file (using class AbstractLoadMap)public JDefaultDataMap(float[] dataArea, float dX, float dY)
dataArea
- Values of height mapdX
- step in the x-axisdY
- step in the y-axispublic JDefaultDataMap(javax.vecmath.Point3f[] dataAreaPoints)
dataAreaPoints
- Array points of height mappublic JDefaultDataMap(javax.vecmath.Point3f[] dataAreaPoints, javax.vecmath.Vector3f[] normals)
dataAreaPoints
- Array points of height mapnormals
- Array normals of height mappublic JDefaultDataMap(javax.vecmath.Point3f[] dataAreaPoints, int[] indexes)
dataAreaPoints
- Array points of height mapindexes
- Array indexes of height mapMethod Detail |
---|
public void createDataMap(float[] dataArea, float stepX, float stepY)
dataArea
- Array values (z-coordinates) loaded mapstepX
- Step in the x-axisstepY
- Step in the y-axispublic void createIndexes()
public void createNormals()
public void createStripCounts()
public void setIndexes(int[] areaIndexes)
areaIndexes
- Array indexes loaded map.public void setStripCounts(int[] areaStripCounts)
areaStripCounts
- Array values (for TriangleStrip) loaded mappublic javax.vecmath.Point3f[] getPoints()
public int[] getIndexes()
public int[] getStripCounts()
public javax.vecmath.Vector3f[] getNormals()
public int getHeight()
public int getWidth()
public float getStepX()
public float getStepY()
public boolean validDimension()
public static float[] matrix2vector(float[][] matrix, double multiple)
matrix
- original 2D arraymultiple
- multiplication coefficient (if =1 values are not changed)
public static float[] matrix2vector(float[][] matrix)
matrix
- original 2D array
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |