de.grogra.imp3d.objects
public class PolygonMesh extends PolygonsBase
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
indices |
protected float[] |
n |
protected int |
stamp |
protected float[] |
t |
protected float[] |
v |
COMPUTE_NORMALS, COMPUTE_UV| Constructor and Description |
|---|
PolygonMesh() |
| Modifier and Type | Method and Description |
|---|---|
float[] |
computeMaxMin()
Computes max and min values of vertex data.
|
float[] |
computeMaxMin(Matrix4d m)
Computes max and min values of vertex data.
|
int[] |
getIndexData() |
float[] |
getNormalData() |
int |
getStamp() |
float[] |
getTextureData() |
float[] |
getVertexData() |
void |
incrementStamp() |
static void |
multiplyMatrixWithTuple3d(Matrix4d matrix,
Tuple3d point)
Multiplies matrix with point and writes result into point.
|
void |
polygonize(ContextDependent source,
GraphState gs,
PolygonArray out,
int flags,
float flatness)
Performs the polygonization of the source into polygons.
|
void |
setIndexData(IntList indexData) |
void |
setNormalData(float[] normalData) |
void |
setTextureData(float[] textureData) |
void |
setVertexData(FloatList vertexData) |
void |
writeStamp(Cache.Entry cache,
GraphState gs)
Writes a stamp of the context into
cache. |
dependsOnContextprotected int[] indices
protected float[] n
protected int stamp
protected float[] t
protected float[] v
public float[] computeMaxMin()
public float[] computeMaxMin(Matrix4d m)
m - Use can use m to transform all vertices to global coordinates.public final int[] getIndexData()
public final float[] getNormalData()
public int getStamp()
getStamp in class PolygonsBasepublic final float[] getTextureData()
public final float[] getVertexData()
public void incrementStamp()
public static void multiplyMatrixWithTuple3d(Matrix4d matrix, Tuple3d point)
matrix - point - public void polygonize(ContextDependent source, GraphState gs, PolygonArray out, int flags, float flatness)
Polygonizationout.userObject is not modified.source - the data source as reported by a previous invocation of
Polygonizable.getPolygonizableSource(GraphState)
with the same gsgs - the current graph stateout - the polygons are written to outflags - combination of bit masksflatness - a parameter for the degree of flatness, a typical value is 1public void setIndexData(IntList indexData)
public void setNormalData(float[] normalData)
public void setTextureData(float[] textureData)
public void setVertexData(FloatList vertexData)
public void writeStamp(Cache.Entry cache, GraphState gs)
ContextDependentcache. Based on
this stamp, a cache detects whether the context of this
object has changed or not.writeStamp in interface ContextDependentwriteStamp in class PolygonsBasecache - a cache entry to write the stampgs - the current graph state