Go to the documentation of this file.
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)
@ VES_TANGENT
Tangent (X axis if normal is Z)
list< IndexRemap >::type IndexRemapList
List of indexes that were remapped (split vertices).
bool getSplitRotated() const
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex...
void remapIndexes(T *ibuf, size_t indexSet, Result &res)
void setSplitMirrored(bool split)
Sets whether or not to split vertices when a mirrored tangent space transition is detected (matrix pa...
Information about a remapped index.
std::pair< size_t, size_t > VertexSplit
IndexRemapList indexesRemapped
A list of indexes which were affected by splits.
size_t oppositeParityIndex
@ OT_TRIANGLE_LIST
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.
list< VertexSplit >::type VertexSplits
VertexInfoArray mVertexArray
Summary class collecting together vertex source information.
VertexElementSemantic
Vertex element semantics, used to identify the meaning of vertex buffer contents.
void setStoreParityInW(bool enabled)
Sets whether to store tangent space parity in the W of a 4-component tangent or not.
bool getSplitMirrored() const
Gets whether or not to split vertices when a mirrored tangent space transition is detected.
size_t faceIndex
The position in the index buffer that's affected.
vector< VertexInfo >::type VertexInfoArray
vector< RenderOperation::OperationType >::type OpTypeList
Standard 2-dimensional vector.
float Real
Software floating point type.
OperationType
The rendering operation type to perform.
bool getStoreParityInW() const
Gets whether to store tangent space parity in the W of a 4-component tangent or not.
vector< IndexData * >::type IndexDataList
The result of having built a tangent space basis.
IndexRemap(size_t i, size_t f, const VertexSplit &s)
Summary class collecting together index data source information.
Standard 3-dimensional vector.
void setSplitRotated(bool split)
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex...
VertexSplit splitVertex
The old and new vertex index.
VertexSplits vertexSplits
A list of vertex indices which were split off into new vertices because of mirroring.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15