Node visitor which calculates the tangent space basis vectors from the texture coordinates of any geometry it encounters.
More...
#include <TangentSpaceGenerator.h>
|
| | TangentSpaceGenerator (int textureCoordUnit, int tangentAttribIndex, int bitangentAttribIndex) |
| | Constructor. More...
|
| |
|
virtual | ~TangentSpaceGenerator () |
| | Destructor.
|
| |
| 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.
|
| |
| 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 |
§ 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 |
§ 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 |
The documentation for this class was generated from the following files: