#include <OgreTangentSpaceCalc.h>
Public Types | |
typedef std::pair< size_t, size_t > | VertexSplit |
typedef std::list< IndexRemap > | IndexRemapList |
List of indexes that were remapped (split vertices). | |
typedef std::list< VertexSplit > | VertexSplits |
Public Member Functions | |
TangentSpaceCalc () | |
virtual | ~TangentSpaceCalc () |
void | clear () |
Reset the calculation object. | |
void | setVertexData (VertexData *v_in) |
Set the incoming vertex data (which will be modified). | |
void | addIndexData (IndexData *i_in, RenderOperation::OperationType opType=RenderOperation::OT_TRIANGLE_LIST) |
Add a set of index data that references the vertex data. | |
void | setStoreParityInW (bool enabled) |
Sets whether to store tangent space parity in the W of a 4-component tangent or not. | |
bool | getStoreParityInW () const |
Gets whether to store tangent space parity in the W of a 4-component tangent or not. | |
void | setSplitMirrored (bool split) |
Sets whether or not to split vertices when a mirrored tangent space transition is detected (matrix parity differs). | |
bool | getSplitMirrored () const |
Gets whether or not to split vertices when a mirrored tangent space transition is detected. | |
void | setSplitRotated (bool split) |
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex. | |
bool | getSplitRotated () const |
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex. | |
Result | build (VertexElementSemantic targetSemantic=VES_TANGENT, unsigned short sourceTexCoordSet=0, unsigned short index=1) |
Build a tangent space basis from the provided data. | |
Protected Types | |
typedef std::vector< IndexData * > | IndexDataList |
typedef std::vector< RenderOperation::OperationType > | OpTypeList |
typedef std::vector< VertexInfo > | VertexInfoArray |
Protected Member Functions | |
void | extendBuffers (VertexSplits &splits) |
void | insertTangents (Result &res, VertexElementSemantic targetSemantic, unsigned short sourceTexCoordSet, unsigned short index) |
void | populateVertexArray (unsigned short sourceTexCoordSet) |
void | processFaces (Result &result) |
void | calculateFaceTangentSpace (const size_t *vertInd, Vector3 &tsU, Vector3 &tsV, Vector3 &tsN) |
Calculate face tangent space, U and V are weighted by UV area, N is normalised. | |
Real | calculateAngleWeight (size_t v0, size_t v1, size_t v2) |
int | calculateParity (const Vector3 &u, const Vector3 &v, const Vector3 &n) |
void | addFaceTangentSpaceToVertices (size_t indexSet, size_t faceIndex, size_t *localVertInd, const Vector3 &faceTsU, const Vector3 &faceTsV, const Vector3 &faceNorm, Result &result) |
void | normaliseVertices () |
void | remapIndexes (Result &res) |
template<typename T> | |
void | remapIndexes (T *ibuf, size_t indexSet, Result &res) |
Protected Attributes | |
VertexData * | mVData |
IndexDataList | mIDataList |
OpTypeList | mOpTypes |
bool | mSplitMirrored |
bool | mSplitRotated |
bool | mStoreParityInW |
VertexInfoArray | mVertexArray |
Classes | |
struct | IndexRemap |
Information about a remapped index. More... | |
struct | Result |
The result of having built a tangent space basis. More... | |
struct | VertexInfo |
Definition at line 43 of file OgreTangentSpaceCalc.h.
|
Definition at line 180 of file OgreTangentSpaceCalc.h. |
|
List of indexes that were remapped (split vertices).
Definition at line 65 of file OgreTangentSpaceCalc.h. |
|
Definition at line 181 of file OgreTangentSpaceCalc.h. |
|
Definition at line 204 of file OgreTangentSpaceCalc.h. |
|
Definition at line 49 of file OgreTangentSpaceCalc.h. |
|
Definition at line 67 of file OgreTangentSpaceCalc.h. |
|
|
|
|
|
|
|
Add a set of index data that references the vertex data. This might be modified if there are vertex splits. |
|
Build a tangent space basis from the provided data.
|
|
|
|
Calculate face tangent space, U and V are weighted by UV area, N is normalised.
|
|
|
|
Reset the calculation object.
|
|
|
|
Gets whether or not to split vertices when a mirrored tangent space transition is detected.
Definition at line 129 of file OgreTangentSpaceCalc.h. |
|
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex.
Definition at line 149 of file OgreTangentSpaceCalc.h. |
|
Gets whether to store tangent space parity in the W of a 4-component tangent or not.
Definition at line 108 of file OgreTangentSpaceCalc.h. |
|
|
|
|
|
|
|
|
|
Definition at line 223 of file OgreTangentSpaceCalc.h. References Ogre::TangentSpaceCalc::IndexRemap::faceIndex, Ogre::TangentSpaceCalc::Result::indexesRemapped, Ogre::TangentSpaceCalc::IndexRemap::indexSet, and Ogre::TangentSpaceCalc::IndexRemap::splitVertex. |
|
|
|
Sets whether or not to split vertices when a mirrored tangent space transition is detected (matrix parity differs).
Definition at line 124 of file OgreTangentSpaceCalc.h. |
|
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex.
Definition at line 145 of file OgreTangentSpaceCalc.h. |
|
Sets whether to store tangent space parity in the W of a 4-component tangent or not.
Definition at line 105 of file OgreTangentSpaceCalc.h. |
|
Set the incoming vertex data (which will be modified).
|
|
Definition at line 182 of file OgreTangentSpaceCalc.h. |
|
Definition at line 183 of file OgreTangentSpaceCalc.h. |
|
Definition at line 184 of file OgreTangentSpaceCalc.h. |
|
Definition at line 185 of file OgreTangentSpaceCalc.h. |
|
Definition at line 186 of file OgreTangentSpaceCalc.h. |
|
Definition at line 179 of file OgreTangentSpaceCalc.h. |
|
Definition at line 205 of file OgreTangentSpaceCalc.h. |
Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat Apr 11 13:55:34 2009