Class for calculating a tangent space basis.
More...
#include <OgreTangentSpaceCalc.h>
Class for calculating a tangent space basis.
◆ IndexRemapList
List of indexes that were remapped (split vertices).
◆ VertexSplit
◆ VertexSplits
◆ TangentSpaceCalc()
Ogre::v1::TangentSpaceCalc::TangentSpaceCalc 
( 
 ) 

◆ ~TangentSpaceCalc()
virtual Ogre::v1::TangentSpaceCalc::~TangentSpaceCalc 
( 
 ) 


virtual 
◆ addIndexData()
Add a set of index data that references the vertex data.
This might be modified if there are vertex splits.
◆ build()
Build a tangent space basis from the provided data.
 Parameters

targetSemantic  The semantic to store the tangents in. Defaults to the explicit tangent binding, but note that this is only usable on more modern hardware (Shader Model 2), so if you need portability with older cards you should change this to a texture coordinate binding instead. 
sourceTexCoordSet  The texture coordinate index which should be used as the source of 2D texture coordinates, with which to calculate the tangents. 
index  The element index, ie the texture coordinate set which should be used to store the 3D coordinates representing a tangent vector per vertex, if targetSemantic is VES_TEXTURE_COORDINATES. If this already exists, it will be overwritten. 
 Returns
 A structure containing the results of the tangent space build. Vertex data will always be modified but it's also possible that the index data could be adjusted. This happens when mirroring is used on a mesh, which causes the tangent space to be inverted on opposite sides of an edge. This is discontinuous, therefore the vertices have to be split along this edge, resulting in new vertices.
◆ clear()
void Ogre::v1::TangentSpaceCalc::clear 
( 
 ) 

Reset the calculation object.
◆ getSplitMirrored()
bool Ogre::v1::TangentSpaceCalc::getSplitMirrored 
( 
 ) 
const 

inline 
Gets whether or not to split vertices when a mirrored tangent space transition is detected.
◆ getSplitRotated()
bool Ogre::v1::TangentSpaceCalc::getSplitRotated 
( 
 ) 
const 

inline 
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex.
◆ getStoreParityInW()
bool Ogre::v1::TangentSpaceCalc::getStoreParityInW 
( 
 ) 
const 

inline 
Gets whether to store tangent space parity in the W of a 4component tangent or not.
◆ setSplitMirrored()
void Ogre::v1::TangentSpaceCalc::setSplitMirrored 
( 
bool 
split  ) 


inline 
Sets whether or not to split vertices when a mirrored tangent space transition is detected (matrix parity differs).
 Note
 This option is automatically disabled if you provide any strip or fan based geometry.
◆ setSplitRotated()
void Ogre::v1::TangentSpaceCalc::setSplitRotated 
( 
bool 
split  ) 


inline 
Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex.
 Note
 This option is automatically disabled if you provide any strip or fan based geometry.
◆ setStoreParityInW()
void Ogre::v1::TangentSpaceCalc::setStoreParityInW 
( 
bool 
enabled  ) 


inline 
Sets whether to store tangent space parity in the W of a 4component tangent or not.
 Parameters

enabled  true to enable 4component tangents (default false). If you enable this, you will probably also want to enable mirror splitting (see setSplitMirrored), and your shader must understand how to deal with the parity. 
◆ setVertexData()
void Ogre::v1::TangentSpaceCalc::setVertexData 
( 
VertexData * 
v_in  ) 

Set the incoming vertex data (which will be modified)
The documentation for this class was generated from the following file: