#include <MikktspaceWrap.h>
|
static int | GetNumFaces (const SMikkTSpaceContext *pContext) |
|
static int | GetNumVerticesOfFace (const SMikkTSpaceContext *pContext, const int iFace) |
|
static MikkTSpace * | GetUserDataFromContext (const SMikkTSpaceContext *pContext) |
|
static SModelVertex | GetVertex (const SMikkTSpaceContext *pContext, const int iFace, const int iVert) |
|
static void | GetPosition (const SMikkTSpaceContext *pContext, float *fvPosOut, const int iFace, const int iVert) |
|
static void | GetNormal (const SMikkTSpaceContext *pContext, float *fvNormOut, const int iFace, const int iVert) |
|
static void | GetTexCoord (const SMikkTSpaceContext *pContext, float *fvTexcOut, const int iFace, const int iVert) |
|
static void | SetTSpace (const SMikkTSpaceContext *pContext, const float *fvTangent, const float *fvBiTangent, const float fMagS, const float fMagT, const tbool bIsOrientationPreserving, const int iFace, const int iVert) |
| This function is used to return tangent space results to the application. More...
|
|
◆ MikkTSpace()
MikkTSpace::MikkTSpace |
( |
const CModelDefPtr & |
m, |
|
|
std::vector< float > & |
v, |
|
|
bool |
gpuSkinning |
|
) |
| |
◆ Generate()
void MikkTSpace::Generate |
( |
| ) |
|
◆ GetNormal()
void MikkTSpace::GetNormal |
( |
const SMikkTSpaceContext * |
pContext, |
|
|
float * |
fvNormOut, |
|
|
const int |
iFace, |
|
|
const int |
iVert |
|
) |
| |
|
staticprivate |
- Parameters
-
[in] | pContext | - Pointer to the MikkTSpace context. |
[out] | fvNormOut | iVert - The array containing the normal. |
[in] | iFace | - Number in the range { 0, 1, ..., getNumFaces() - 1 }. |
[in] | iVert | - Number in the range { 0, 1, 2 } for triangles and { 0, 1, 2, 3 } for quads. |
◆ GetNumFaces()
int MikkTSpace::GetNumFaces |
( |
const SMikkTSpaceContext * |
pContext | ) |
|
|
staticprivate |
- Parameters
-
- Returns
- - the number of faces (triangles/quads) on the mesh to be processed.
◆ GetNumVerticesOfFace()
int MikkTSpace::GetNumVerticesOfFace |
( |
const SMikkTSpaceContext * |
pContext, |
|
|
const int |
iFace |
|
) |
| |
|
staticprivate |
- Parameters
-
[in] | pContext | - Pointer to the MikkTSpace context. |
[in] | iFace | - Number in the range { 0, 1, ..., getNumFaces() - 1 }. |
- Returns
- - the number of faces (triangles/quads) on the mesh to be processed.
◆ GetPosition()
void MikkTSpace::GetPosition |
( |
const SMikkTSpaceContext * |
pContext, |
|
|
float * |
fvPosOut, |
|
|
const int |
iFace, |
|
|
const int |
iVert |
|
) |
| |
|
staticprivate |
- Parameters
-
[in] | pContext | - Pointer to the MikkTSpace context. |
[out] | fvPosOut | - The array containing the face. |
[in] | iFace | - Number in the range { 0, 1, ..., getNumFaces() - 1 }. |
[in] | iVert | - Number in the range { 0, 1, 2 } for triangles and { 0, 1, 2, 3 } for quads. |
◆ GetTexCoord()
void MikkTSpace::GetTexCoord |
( |
const SMikkTSpaceContext * |
pContext, |
|
|
float * |
fvTexcOut, |
|
|
const int |
iFace, |
|
|
const int |
iVert |
|
) |
| |
|
staticprivate |
- Parameters
-
[in] | pContext | - Pointer to the MikkTSpace context. |
[out] | fvTexcOut | iVert - Array containing the UV. |
[in] | iFace | - Number in the range { 0, 1, ..., getNumFaces() - 1 }. |
[in] | iVert | - Number in the range { 0, 1, 2 } for triangles and { 0, 1, 2, 3 } for quads. |
◆ GetUserDataFromContext()
MikkTSpace * MikkTSpace::GetUserDataFromContext |
( |
const SMikkTSpaceContext * |
pContext | ) |
|
|
staticprivate |
◆ GetVertex()
SModelVertex MikkTSpace::GetVertex |
( |
const SMikkTSpaceContext * |
pContext, |
|
|
const int |
iFace, |
|
|
const int |
iVert |
|
) |
| |
|
staticprivate |
- Parameters
-
[in] | pContext | - Pointer to the MikkTSpace context. |
[in] | iFace | - Number in the range { 0, 1, ..., getNumFaces() - 1 }. |
[in] | iVert | - Number in the range { 0, 1, 2 } for triangles and { 0, 1, 2, 3 } for quads. |
- Returns
- - The MikkTSpace.
◆ SetTSpace()
void MikkTSpace::SetTSpace |
( |
const SMikkTSpaceContext * |
pContext, |
|
|
const float * |
fvTangent, |
|
|
const float * |
fvBiTangent, |
|
|
const float |
fMagS, |
|
|
const float |
fMagT, |
|
|
const tbool |
bIsOrientationPreserving, |
|
|
const int |
iFace, |
|
|
const int |
iVert |
|
) |
| |
|
staticprivate |
This function is used to return tangent space results to the application.
For normal maps it is sufficient to use the following simplified version of the bitangent which is generated at pixel/vertex level. fSign = bIsOrientationPreserving ? 1.0f : (-1.0f); bitangent = fSign * cross(vN, tangent);
- Parameters
-
[in] | pContext | - Pointer to the MikkTSpace context. |
[in] | fvTangent | - fvTangent - The tangent vector. |
[in] | fvBiTangent | - The "real" bitangent vector. Not be perpendicular to fvTangent. However, both are perpendicular to the vertex normal. |
[in] | fMagS | - magniture of the fvTangent vector. |
[in] | fMagT | - magniture of the fvBiTangent vector. |
[in] | bIsOrientationPreserving | - Whether the orientation should be preserved. |
[in] | iFace | - Number in the range {0,1,2} for triangles and {0,1,2,3} for quads. |
[in] | iVert | - Array containing the position vector of the face. |
◆ m_Context
SMikkTSpaceContext MikkTSpace::m_Context |
|
private |
◆ m_GpuSkinning
bool MikkTSpace::m_GpuSkinning |
|
private |
◆ m_Interface
SMikkTSpaceInterface MikkTSpace::m_Interface |
|
private |
◆ m_Model
◆ m_NewVertices
std::vector<float>& MikkTSpace::m_NewVertices |
|
private |
The documentation for this class was generated from the following files: