Package com.ardorcraft.world
Class GeometryHandler
java.lang.Object
com.ardorcraft.world.GeometryHandler
This is the class that
GeometryProducer
s use to set geometry into the world.-
Method Summary
Modifier and TypeMethodDescriptionfloat
getGlobalLighting
(int x, int y, int z) Gets the global lighting.int
Gets the index count.float
getLocalLighting
(int x, int y, int z) Gets the local lighting.int
Gets the vertex count.boolean
Checks for colors.boolean
Checks for indices.boolean
Checks for texture coords.boolean
Checks for vertices.void
setColor
(int index, float globalLight, float localLight) Sets the color.void
setIndex
(int index, int value) Sets the index.void
setIndexCount
(int count) Sets the index count.void
setTextureCoord
(int index, float u, float v) Sets the texture coord.void
setVertex
(int index, float x, float y, float z) Sets the vertex.void
setVertexCount
(int count) Sets the vertex count.
-
Method Details
-
setIndexCount
public void setIndexCount(int count) Sets the index count.- Parameters:
count
- the new index count
-
setVertexCount
public void setVertexCount(int count) Sets the vertex count.- Parameters:
count
- the new vertex count
-
getIndexCount
public int getIndexCount()Gets the index count.- Returns:
- the index count
-
getVertexCount
public int getVertexCount()Gets the vertex count.- Returns:
- the vertex count
-
hasVertices
public boolean hasVertices()Checks for vertices.- Returns:
- true, if successful
-
setVertex
public void setVertex(int index, float x, float y, float z) Sets the vertex.- Parameters:
index
- the indexx
- the xy
- the yz
- the z
-
hasTextureCoords
public boolean hasTextureCoords()Checks for texture coords.- Returns:
- true, if successful
-
setTextureCoord
public void setTextureCoord(int index, float u, float v) Sets the texture coord.- Parameters:
index
- the indexu
- the uv
- the v
-
hasColors
public boolean hasColors()Checks for colors.- Returns:
- true, if successful
-
setColor
public void setColor(int index, float globalLight, float localLight) Sets the color.- Parameters:
index
- the indexglobalLight
- the global lightlocalLight
- the local light
-
hasIndices
public boolean hasIndices()Checks for indices.- Returns:
- true, if successful
-
setIndex
public void setIndex(int index, int value) Sets the index.- Parameters:
index
- the indexvalue
- the value
-
getGlobalLighting
public float getGlobalLighting(int x, int y, int z) Gets the global lighting.- Parameters:
x
- the xy
- the yz
- the z- Returns:
- the global lighting
-
getLocalLighting
public float getLocalLighting(int x, int y, int z) Gets the local lighting.- Parameters:
x
- the xy
- the yz
- the z- Returns:
- the local lighting
-