Node visitor which calculates the tangent space basis vectors from the texture coordinates of any geometry it encounters.
More...
#include <SurgSim/Graphics/TangentSpaceGenerator.h>
|
| | TangentSpaceGenerator (int textureCoordUnit, int tangentAttribIndex, int bitangentAttribIndex) |
| | Constructor. More...
|
| |
| virtual | ~TangentSpaceGenerator () |
| | Destructor. More...
|
| |
| void | setBasisOrthonormality (bool orthonormal) |
| | Sets whether the three tangent space basis vectors are made to be orthonormal; otherwise, each tangent is separately orthonormal to the normal, but not to each other. More...
|
| |
| bool | getBasisOrthonormality () |
| | Gets whether the three tangent space basis vectors are made to be orthonormal; otherwise, each tangent is separately orthonormal to the normal, but not to each other. More...
|
| |
| void | apply (osg::Geode &geode) override |
| | Generates tangent space vectors for all geometry in the geode. More...
|
| |
|
| static void | generateTangentSpace (osg::Geometry *geometry, int textureCoordUnit, int tangentAttribIndex, int bitangentAttribIndex, bool orthonormal) |
| | Generates tangent space basis vectors for the geometry. More...
|
| |
Node visitor which calculates the tangent space basis vectors from the texture coordinates of any geometry it encounters.
◆ TangentSpaceGenerator()
| SurgSim::Graphics::TangentSpaceGenerator::TangentSpaceGenerator |
( |
int |
textureCoordUnit, |
|
|
int |
tangentAttribIndex, |
|
|
int |
bitangentAttribIndex |
|
) |
| |
Constructor.
- Parameters
-
| textureCoordUnit | Texture unit of texture coordinates to use for calculating the tangent space |
| tangentAttribIndex | Index of the vertex attribute array to store the calculated tangents |
| bitangentAttribIndex | Index of the vertex attribute array to store the calculated bitangents |
◆ ~TangentSpaceGenerator()
| SurgSim::Graphics::TangentSpaceGenerator::~TangentSpaceGenerator |
( |
| ) |
|
|
virtual |
◆ apply()
| void SurgSim::Graphics::TangentSpaceGenerator::apply |
( |
osg::Geode & |
geode | ) |
|
|
override |
Generates tangent space vectors for all geometry in the geode.
- Parameters
-
| geode | Geode to generate tangent space vectors |
◆ generateTangentSpace()
| void SurgSim::Graphics::TangentSpaceGenerator::generateTangentSpace |
( |
osg::Geometry * |
geometry, |
|
|
int |
textureCoordUnit, |
|
|
int |
tangentAttribIndex, |
|
|
int |
bitangentAttribIndex, |
|
|
bool |
orthonormal |
|
) |
| |
|
static |
Generates tangent space basis vectors for the geometry.
- Parameters
-
| geometry | Geometry to generate normals |
| textureCoordUnit | Texture unit of texture coordinates to use for calculating the tangent space |
| tangentAttribIndex | Index of the vertex attribute array to store the calculated tangents |
| bitangentAttribIndex | Index of the vertex attribute array to store the calculated bi-tangents |
| orthonormal | Whether or not to create a fully orthonormal basis; otherwise, each tangent is separately orthonormal to the normal, but not to each other |
◆ getBasisOrthonormality()
| bool SurgSim::Graphics::TangentSpaceGenerator::getBasisOrthonormality |
( |
| ) |
|
Gets whether the three tangent space basis vectors are made to be orthonormal; otherwise, each tangent is separately orthonormal to the normal, but not to each other.
◆ setBasisOrthonormality()
| void SurgSim::Graphics::TangentSpaceGenerator::setBasisOrthonormality |
( |
bool |
orthonormal | ) |
|
Sets whether the three tangent space basis vectors are made to be orthonormal; otherwise, each tangent is separately orthonormal to the normal, but not to each other.
- Parameters
-
| orthonormal | Whether or not to create a fully orthonormal basis |
◆ m_bitangentAttribIndex
| int SurgSim::Graphics::TangentSpaceGenerator::m_bitangentAttribIndex |
|
private |
Index of the vertex attribute array to store the calculated bitangents.
◆ m_createOrthonormalBasis
| bool SurgSim::Graphics::TangentSpaceGenerator::m_createOrthonormalBasis |
|
private |
Whether or not to create a fully orthonormal basis; otherwise, each tangent is separately orthonormal to the normal, but not to each other.
◆ m_tangentAttribIndex
| int SurgSim::Graphics::TangentSpaceGenerator::m_tangentAttribIndex |
|
private |
Index of the vertex attribute array to store the calculated tangents.
◆ m_textureCoordUnit
| int SurgSim::Graphics::TangentSpaceGenerator::m_textureCoordUnit |
|
private |
Texture unit of texture coordinates to use for calculating the tangent space.
The documentation for this class was generated from the following files: