public class MikkTSpaceImpl extends java.lang.Object implements MikkTSpaceContext
| Constructor and Description | 
|---|
MikkTSpaceImpl(Mesh mesh)  | 
| 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. 
 | 
public MikkTSpaceImpl(Mesh mesh)
public int getNumFaces()
MikkTSpaceContextgetNumFaces in interface MikkTSpaceContextpublic int getNumVerticesOfFace(int face)
MikkTSpaceContextgetNumVerticesOfFace in interface MikkTSpaceContextpublic void getPosition(float[] posOut,
                        int face,
                        int vert)
MikkTSpaceContextgetPosition in interface MikkTSpaceContextpublic void getNormal(float[] normOut,
                      int face,
                      int vert)
getNormal in interface MikkTSpaceContextpublic void getTexCoord(float[] texOut,
                        int face,
                        int vert)
getTexCoord in interface MikkTSpaceContextpublic void setTSpaceBasic(float[] tangent,
                           float sign,
                           int face,
                           int vert)
MikkTSpaceContextsetTSpaceBasic in interface MikkTSpaceContextpublic void setTSpace(float[] tangent,
                      float[] biTangent,
                      float magS,
                      float magT,
                      boolean isOrientationPreserving,
                      int face,
                      int vert)
MikkTSpaceContextfSign = 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 INCRORRECT results. DO NOT! use an already existing index list.
setTSpace in interface MikkTSpaceContext