public abstract class BaseMesh extends BaseGraphicsResource implements Mesh
Modifier and Type | Class and Description |
---|---|
static class |
BaseMesh.FaceMembers |
(package private) class |
BaseMesh.MeshGeomComp2VB |
Modifier and Type | Field and Description |
---|---|
private boolean |
allHardEdges |
private boolean |
allSameSmoothing |
private float[] |
cachedBitangents |
private float[] |
cachedNormals |
private float[] |
cachedTangents |
private boolean[] |
dirtyVertices |
static int |
FACE_MEMBERS_SIZE |
private int[] |
faces |
private int[] |
indexBuffer |
private short[] |
indexBufferShort |
private int |
indexBufferSize |
private int |
nFaces |
protected static int |
NORMAL_SIZE |
protected static int |
NORMAL_SIZE_VB |
private java.util.HashMap<java.lang.Integer,BaseMesh.MeshGeomComp2VB> |
normal2vbMap |
private int |
nTVerts |
private int |
numberOfVertices |
private int |
nVerts |
protected static int |
POINT_SIZE |
protected static int |
POINT_SIZE_VB |
private java.util.HashMap<java.lang.Integer,BaseMesh.MeshGeomComp2VB> |
point2vbMap |
private float[] |
pos |
private int[] |
smoothing |
protected static int |
TEXCOORD_SIZE |
protected static int |
TEXCOORD_SIZE_VB |
private java.util.HashMap<java.lang.Integer,BaseMesh.MeshGeomComp2VB> |
texCoord2vbMap |
private float[] |
uv |
protected static int |
VERTEX_SIZE_VB |
private float[] |
vertexBuffer |
disposerRecord
Modifier | Constructor and Description |
---|---|
protected |
BaseMesh(Disposer.Record disposerRecord) |
Modifier and Type | Method and Description |
---|---|
boolean |
buildGeometry(boolean userDefinedNormals,
float[] points,
int[] pointsFromAndLengthIndices,
float[] normals,
int[] normalsFromAndLengthIndices,
float[] texCoords,
int[] texCoordsFromAndLengthIndices,
int[] faces,
int[] facesFromAndLengthIndices,
int[] faceSmoothingGroups,
int[] faceSmoothingGroupsFromAndLengthIndices) |
private void |
buildIndexBuffer(MeshVertex[] pool,
int[] indexBuffer,
short[] indexBufferShort) |
abstract boolean |
buildNativeGeometry(float[] vertexBuffer,
int vertexBufferLength,
int[] indexBufferInt,
int indexBufferLength) |
abstract boolean |
buildNativeGeometry(float[] vertexBuffer,
int vertexBufferLength,
short[] indexBufferShort,
int indexBufferLength) |
private boolean |
buildPNTGeometry(float[] points,
int[] pointsFromAndLengthIndices,
float[] normals,
int[] normalsFromAndLengthIndices,
float[] texCoords,
int[] texCoordsFromAndLengthIndices,
int[] faces,
int[] facesFromAndLengthIndices) |
private boolean |
buildPTGeometry(float[] pos,
int[] posFromAndLengthIndices,
float[] uv,
int[] uvFromAndLengthIndices,
int[] faces,
int[] facesFromAndLengthIndices,
int[] smoothing,
int[] smoothingFromAndLengthIndices) |
private boolean |
buildSkipMeshNormalGeometry() |
private void |
buildVertexBuffer(MeshVertex[] pVerts,
float[] vertexBuffer) |
private void |
buildVSQuat(Vec3f[] tm,
Quat4f quat) |
private void |
checkSmoothingGroup() |
private void |
computeTBNormal(MeshVertex[] pool,
MeshVertex[] pVertex,
int[] indexBuffer) |
private void |
convertNormalsToQuats(MeshTempState instance,
int numberOfVertices,
float[] normals,
float[] tangents,
float[] bitangents,
float[] vertexBuffer,
boolean[] dirtys) |
private boolean |
doBuildPNTGeometry(float[] points,
float[] normals,
float[] texCoords,
int[] faces) |
int[] |
getFace(int fIdx,
int[] face) |
int |
getNumFaces() |
int |
getNumTVerts() |
int |
getNumVerts() |
Vec2f |
getTVertex(int tIdx,
Vec2f texCoord) |
Vec3f |
getVertex(int pIdx,
Vec3f vertex) |
(package private) int |
test_getNumberOfVertices() |
(package private) int |
test_getVertexBufferLength() |
(package private) boolean |
test_isVertexBufferNull() |
private boolean |
updatePNTGeometry(float[] points,
int[] pointsFromAndLengthIndices,
float[] normals,
int[] normalsFromAndLengthIndices,
float[] texCoords,
int[] texCoordsFromAndLengthIndices) |
private boolean |
updateSkipMeshNormalGeometry(int[] posFromAndLengthIndices,
int[] uvFromAndLengthIndices) |
dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose
private int nVerts
private int nTVerts
private int nFaces
private float[] pos
private float[] uv
private int[] faces
private int[] smoothing
private boolean allSameSmoothing
private boolean allHardEdges
protected static final int POINT_SIZE
protected static final int NORMAL_SIZE
protected static final int TEXCOORD_SIZE
protected static final int POINT_SIZE_VB
protected static final int TEXCOORD_SIZE_VB
protected static final int NORMAL_SIZE_VB
protected static final int VERTEX_SIZE_VB
public static final int FACE_MEMBERS_SIZE
private boolean[] dirtyVertices
private float[] cachedNormals
private float[] cachedTangents
private float[] cachedBitangents
private float[] vertexBuffer
private int[] indexBuffer
private short[] indexBufferShort
private int indexBufferSize
private int numberOfVertices
private java.util.HashMap<java.lang.Integer,BaseMesh.MeshGeomComp2VB> point2vbMap
private java.util.HashMap<java.lang.Integer,BaseMesh.MeshGeomComp2VB> normal2vbMap
private java.util.HashMap<java.lang.Integer,BaseMesh.MeshGeomComp2VB> texCoord2vbMap
protected BaseMesh(Disposer.Record disposerRecord)
public abstract boolean buildNativeGeometry(float[] vertexBuffer, int vertexBufferLength, int[] indexBufferInt, int indexBufferLength)
public abstract boolean buildNativeGeometry(float[] vertexBuffer, int vertexBufferLength, short[] indexBufferShort, int indexBufferLength)
private boolean updateSkipMeshNormalGeometry(int[] posFromAndLengthIndices, int[] uvFromAndLengthIndices)
private boolean buildSkipMeshNormalGeometry()
private void convertNormalsToQuats(MeshTempState instance, int numberOfVertices, float[] normals, float[] tangents, float[] bitangents, float[] vertexBuffer, boolean[] dirtys)
private boolean doBuildPNTGeometry(float[] points, float[] normals, float[] texCoords, int[] faces)
private boolean updatePNTGeometry(float[] points, int[] pointsFromAndLengthIndices, float[] normals, int[] normalsFromAndLengthIndices, float[] texCoords, int[] texCoordsFromAndLengthIndices)
public boolean buildGeometry(boolean userDefinedNormals, float[] points, int[] pointsFromAndLengthIndices, float[] normals, int[] normalsFromAndLengthIndices, float[] texCoords, int[] texCoordsFromAndLengthIndices, int[] faces, int[] facesFromAndLengthIndices, int[] faceSmoothingGroups, int[] faceSmoothingGroupsFromAndLengthIndices)
buildGeometry
in interface Mesh
private boolean buildPNTGeometry(float[] points, int[] pointsFromAndLengthIndices, float[] normals, int[] normalsFromAndLengthIndices, float[] texCoords, int[] texCoordsFromAndLengthIndices, int[] faces, int[] facesFromAndLengthIndices)
private boolean buildPTGeometry(float[] pos, int[] posFromAndLengthIndices, float[] uv, int[] uvFromAndLengthIndices, int[] faces, int[] facesFromAndLengthIndices, int[] smoothing, int[] smoothingFromAndLengthIndices)
private void computeTBNormal(MeshVertex[] pool, MeshVertex[] pVertex, int[] indexBuffer)
private void buildVertexBuffer(MeshVertex[] pVerts, float[] vertexBuffer)
private void buildIndexBuffer(MeshVertex[] pool, int[] indexBuffer, short[] indexBufferShort)
public int getNumVerts()
public int getNumTVerts()
public int getNumFaces()
private void checkSmoothingGroup()
public int[] getFace(int fIdx, int[] face)
boolean test_isVertexBufferNull()
int test_getVertexBufferLength()
int test_getNumberOfVertices()