28 #ifndef _OgreTangentSpaceCalc_H_
29 #define _OgreTangentSpaceCalc_H_
181 unsigned short sourceTexCoordSet = 0,
unsigned short index = 1);
209 parity(0), oppositeParityIndex(0) {}
215 void insertTangents(
Result& res,
217 unsigned short sourceTexCoordSet,
unsigned short index);
219 void populateVertexArray(
unsigned short sourceTexCoordSet);
220 void processFaces(
Result& result);
223 Real calculateAngleWeight(
size_t v0,
size_t v1,
size_t v2);
225 void addFaceTangentSpaceToVertices(
size_t indexSet,
size_t faceIndex,
size_t *localVertInd,
227 void normaliseVertices();
228 void remapIndexes(
Result& res);
229 template <
typename T>
248 for (
int v = 0; v < 3; ++v, ++pBuf)
list< VertexSplit >::type VertexSplits
Summary class collecting together vertex source information.
VertexSplit splitVertex
The old and new vertex index.
The result of having built a tangent space basis.
Standard 2-dimensional vector.
float Real
Software floating point type.
vector< IndexData * >::type IndexDataList
Summary class collecting together index data source information.
bool getStoreParityInW() const
Gets whether to store tangent space parity in the W of a 4-component tangent or not.
size_t oppositeParityIndex
IndexRemap(size_t i, size_t f, const VertexSplit &s)
Information about a remapped index.
IndexRemapList indexesRemapped
A list of indexes which were affected by splits.
VertexInfoArray mVertexArray
void remapIndexes(T *ibuf, size_t indexSet, Result &res)
bool getSplitRotated() const
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a verte...
Standard 3-dimensional vector.
bool getSplitMirrored() const
Gets whether or not to split vertices when a mirrored tangent space transition is detected...
void setSplitMirrored(bool split)
Sets whether or not to split vertices when a mirrored tangent space transition is detected (matrix pa...
void setSplitRotated(bool split)
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex...
void setStoreParityInW(bool enabled)
Sets whether to store tangent space parity in the W of a 4-component tangent or not.
VertexElementSemantic
Vertex element semantics, used to identify the meaning of vertex buffer contents. ...
OperationType
The rendering operation type to perform.
list< IndexRemap >::type IndexRemapList
List of indexes that were remapped (split vertices).
Tangent (X axis if normal is Z)
vector< VertexInfo >::type VertexInfoArray
A list of triangles, 3 vertices per triangle.
size_t indexSet
Index data set (can be >0 if more than one index data was added)
Class for calculating a tangent space basis.
vector< RenderOperation::OperationType >::type OpTypeList
size_t faceIndex
The position in the index buffer that's affected.
VertexSplits vertexSplits
A list of vertex indices which were split off into new vertices because of mirroring.
std::pair< size_t, size_t > VertexSplit