Triangle index functor which calculates the tangent space basis vectors for the vertices of a geometry from texture coordinates.
More...
#include <TangentSpaceGenerator.h>
|
| GenerateTangentSpaceTriangleIndexFunctor () |
| Constructor.
|
|
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 () |
|
void | set (const osg::Vec3Array *vertexArray, const osg::Vec3Array *normalArray, const osg::Vec2Array *textureCoordArray, osg::Vec4Array *tangentArray, osg::Vec4Array *bitangentArray) |
| Sets the arrays required to generate tangent space basis vectors. More...
|
|
void | orthogonalize () |
| Orthogonalize and normalize the calculated tangent space basis vectors.
|
|
void | reset () |
| Resets all calculated tangent space basis vectors to 0.
|
|
void | operator() (unsigned int vertexIndex1, unsigned int vertexIndex2, unsigned int vertexIndex3) |
| Calculates the triangle tangent space basis vectors and adds it to each adjacent vertex's tangent. More...
|
|
Triangle index functor which calculates the tangent space basis vectors for the vertices of a geometry from texture coordinates.
§ getBasisOrthonormality()
bool SurgSim::Graphics::GenerateTangentSpaceTriangleIndexFunctor::getBasisOrthonormality |
( |
| ) |
|
- Returns
- 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
§ operator()()
void SurgSim::Graphics::GenerateTangentSpaceTriangleIndexFunctor::operator() |
( |
unsigned int |
vertexIndex1, |
|
|
unsigned int |
vertexIndex2, |
|
|
unsigned int |
vertexIndex3 |
|
) |
| |
Calculates the triangle tangent space basis vectors and adds it to each adjacent vertex's tangent.
- Parameters
-
vertexIndex1 | First triangle vertex index |
vertexIndex2 | Second triangle vertex index |
vertexIndex3 | Third triangle vertex index |
§ set()
void SurgSim::Graphics::GenerateTangentSpaceTriangleIndexFunctor::set |
( |
const osg::Vec3Array * |
vertexArray, |
|
|
const osg::Vec3Array * |
normalArray, |
|
|
const osg::Vec2Array * |
textureCoordArray, |
|
|
osg::Vec4Array * |
tangentArray, |
|
|
osg::Vec4Array * |
bitangentArray |
|
) |
| |
Sets the arrays required to generate tangent space basis vectors.
- Parameters
-
vertexArray | Array containing vertex positions |
normalArray | Array containing vertex normals |
textureCoordArray | Array containing texture coordinates |
tangentArray | Array to store calculated tangents |
bitangentArray | Array to store calculated bitangents |
§ setBasisOrthonormality()
void SurgSim::Graphics::GenerateTangentSpaceTriangleIndexFunctor::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: