public interface MikkTSpaceContext
Modifier and Type | Method and Description |
---|---|
void |
getNormal(float[] normOut,
int face,
int vert) |
int |
getNumFaces()
Returns the number of faces (triangles/quads) on the mesh to be
processed.
|
int |
getNumVerticesOfFace(int face)
Returns the number of vertices on face number iFace iFace is a number in
the range {0, 1, ..., getNumFaces()-1}
|
void |
getPosition(float[] posOut,
int face,
int vert)
returns the position/normal/texcoord of the referenced face of vertex
number iVert.
|
void |
getTexCoord(float[] texOut,
int face,
int vert) |
void |
setTSpace(float[] tangent,
float[] biTangent,
float magS,
float magT,
boolean isOrientationPreserving,
int face,
int vert)
This function is used to return tangent space results to the application.
|
void |
setTSpaceBasic(float[] tangent,
float sign,
int face,
int vert)
The call-backsetTSpaceBasic() is sufficient for basic normal mapping.
|
int getNumFaces()
int getNumVerticesOfFace(int face)
face
- void getPosition(float[] posOut, int face, int vert)
posOut
- face
- vert
- void getNormal(float[] normOut, int face, int vert)
void getTexCoord(float[] texOut, int face, int vert)
void setTSpaceBasic(float[] tangent, float sign, int face, int vert)
tangent
- sign
- face
- vert
- void setTSpace(float[] tangent, float[] biTangent, float magS, float magT, boolean isOrientationPreserving, int face, int vert)
fSign = bIsOrientationPreserving ? 1.0f : (-1.0f); bitangent = fSign * cross(vN, tangent);Note that the results are returned unindexed. It is possible to generate a new index list. But averaging/overwriting tangent spaces by using an already existing index list WILL produce INCORRECT results. DO NOT! use an already existing index list.
tangent
- biTangent
- magS
- magT
- isOrientationPreserving
- face
- vert
-