123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- #ifndef __MIKKTSPACE_H__
- #define __MIKKTSPACE_H__
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef int tbool;
- typedef struct SMikkTSpaceContext SMikkTSpaceContext;
- typedef struct {
-
- int (*m_getNumFaces)(const SMikkTSpaceContext * pContext);
-
-
- int (*m_getNumVerticesOfFace)(const SMikkTSpaceContext * pContext, const int iFace);
-
-
- void (*m_getPosition)(const SMikkTSpaceContext * pContext, float fvPosOut[], const int iFace, const int iVert);
- void (*m_getNormal)(const SMikkTSpaceContext * pContext, float fvNormOut[], const int iFace, const int iVert);
- void (*m_getTexCoord)(const SMikkTSpaceContext * pContext, float fvTexcOut[], const int iFace, const int iVert);
-
-
-
-
-
-
-
-
-
- void (*m_setTSpaceBasic)(const SMikkTSpaceContext * pContext, const float fvTangent[], const float fSign, const int iFace, const int iVert);
-
-
-
-
-
-
-
-
-
-
-
- void (*m_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);
- } SMikkTSpaceInterface;
- struct SMikkTSpaceContext
- {
- SMikkTSpaceInterface * m_pInterface;
- void * m_pUserData;
- };
- tbool genTangSpaceDefault(const SMikkTSpaceContext * pContext);
- tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThreshold);
- #ifdef __cplusplus
- }
- #endif
- #endif
|