Classes | |
struct | NormalVertexCycle |
class | NormalVertexCycles |
struct | NeighborWrapper |
class | TangentSpaceNormalData |
Functions | |
Vector | ComputeNormal (const Vector &prevPoint, const Vector &currPoint, const Vector &nextPoint) |
Vector | ComputeTangent (const Vector &prevPoint, const Vector &currPoint, const Vector &nextPoint) |
Vector | ConvertToTangentSpaceNormal (const Vector &prevPoint, const Vector &currPoint, const Vector &nextPoint, const Vector &objectSpaceNormal) |
Vector | ConvertToObjectSpaceNormal (const Vector &prevPoint, const Vector &currPoint, const Vector &nextPoint, const Vector &tangentSpaceNormal) |
Vector | ComputeNormal (const Block< const Vector > &points, const Block< const Int32 > polygonPoints, Int32 index) |
Vector | ComputeTangent (const Block< const Vector > &points, const Block< const Int32 > polygonPoints, Int32 index) |
Vector | ComputeBiTangent (const Vector &normal, const Vector &tangent) |
Vector | ConvertToTangentSpaceNormal (const Block< const Vector > &points, const Block< const Int32 > polygonPoints, Int32 index, const Vector &objectSpaceNormal) |
Vector | ConvertToObjectSpaceNormal (const Block< const Vector > &points, const Block< const Int32 > polygonPoints, Int32 index, const Vector &tangentSpaceNormal) |
Vector maxon::TangentSpaceNormalHelper::ComputeNormal | ( | const Vector & | prevPoint, |
const Vector & | currPoint, | ||
const Vector & | nextPoint | ||
) |
Computes the normal of a triangle from the three points.
[in] | prevPoint | Previous triangle point. |
[in] | currPoint | Corner triangle point. |
[in] | nextPoint | Next triangle point. |
Vector maxon::TangentSpaceNormalHelper::ComputeTangent | ( | const Vector & | prevPoint, |
const Vector & | currPoint, | ||
const Vector & | nextPoint | ||
) |
Computes the tangent of a triangle from the three points.
[in] | prevPoint | Previous triangle point. |
[in] | currPoint | Corner triangle point. |
[in] | nextPoint | Next triangle point. |
Vector maxon::TangentSpaceNormalHelper::ConvertToTangentSpaceNormal | ( | const Vector & | prevPoint, |
const Vector & | currPoint, | ||
const Vector & | nextPoint, | ||
const Vector & | objectSpaceNormal | ||
) |
Computes the tangent space normal from the object space normal in the space of the given triangle points.
[in] | prevPoint | Previous triangle point. |
[in] | currPoint | Corner triangle point. |
[in] | nextPoint | Next triangle point. |
[in] | objectSpaceNormal | The normal in object space. |
Vector maxon::TangentSpaceNormalHelper::ConvertToObjectSpaceNormal | ( | const Vector & | prevPoint, |
const Vector & | currPoint, | ||
const Vector & | nextPoint, | ||
const Vector & | tangentSpaceNormal | ||
) |
Computes the object space normal from the tangent space normal in the space of the given triangle points.
[in] | prevPoint | Previous triangle point. |
[in] | currPoint | Corner triangle point. |
[in] | nextPoint | Next triangle point. |
[in] | tangentSpaceNormal | The normal in tangent space. |
Vector maxon::TangentSpaceNormalHelper::ComputeNormal | ( | const Block< const Vector > & | points, |
const Block< const Int32 > | polygonPoints, | ||
Int32 | index | ||
) |
Computes the normal of the given polygon, at the corner specified by the given index. The normal is computed in object space, as the cross product of the incoming and outgoing edges.
[in] | points | The points of the polygon object. |
[in] | polygonPoints | The vertex indices which form the current polygon. The list should not contain duplicate entries. In case of a triangle, three vertices should be provided. |
[in] | index | The index which specifies the corner of the polygon, for which the normal will be calculated. always in range [0, polygonPoints.GetCount() - 1] |
Vector maxon::TangentSpaceNormalHelper::ComputeTangent | ( | const Block< const Vector > & | points, |
const Block< const Int32 > | polygonPoints, | ||
Int32 | index | ||
) |
Computes the tangent of the given polygon, at the corner specified by the given index. The tangent is computed as a vector which points from the point specified by the index, to a point which is defined as the sum of vectors, defined by the incoming and outgoing edges into this vertex. By definition, the tangent computed by this function will be perpendicular to the normal computed by ComputeNormal().
[in] | points | The points of the polygon object. |
[in] | polygonPoints | The vertex indices which form the current polygon. The list should not contain duplicate entries. In case of a triangle, three vertices should be provided. |
[in] | index | The index which specifies the corner of the polygon, for which the normal will be calculated. always in range [0, polygonPoints.GetCount() - 1] |
Vector maxon::TangentSpaceNormalHelper::ComputeBiTangent | ( | const Vector & | normal, |
const Vector & | tangent | ||
) |
The bitangent is a vector that is perpendicular both to the tangent, computed by ComputeTangent() and the normal, computed by ComputeNormal() Simply, it is a cross product of the normal and the tangent vector. The three vectors(normal, tangent, binormal) will form the basis of a matrix used to convert the custom vertex normals from object space to tangent (local to polygon) space.
[in] | normal | The computed normal for the corner of a polygon. Computed by ComputeNormal(). |
[in] | tangent | The computed tangent for the corner of a polygon. Computed by ComputeTangent(). |
Vector maxon::TangentSpaceNormalHelper::ConvertToTangentSpaceNormal | ( | const Block< const Vector > & | points, |
const Block< const Int32 > | polygonPoints, | ||
Int32 | index, | ||
const Vector & | objectSpaceNormal | ||
) |
Converts the given object space custom vertex normal, to a tangent space normal, for the specified corner of the given polygon. For the conversion, a matrix using the normal, tangent and binormal will be used.
[in] | points | The points of the polygon object. |
[in] | polygonPoints | The vertex indices which form the current polygon. The list should not contain duplicate entries. In case of a triangle, three vertices should be provided. |
[in] | index | The index which specifies the corner of the polygon, for which the normal will be calculated. always in range [0, polygonPoints.GetCount() - 1] |
[in] | objectSpaceNormal | The custom vertex normal (in object space) that should be converted to tangent space. |
Vector maxon::TangentSpaceNormalHelper::ConvertToObjectSpaceNormal | ( | const Block< const Vector > & | points, |
const Block< const Int32 > | polygonPoints, | ||
Int32 | index, | ||
const Vector & | tangentSpaceNormal | ||
) |
Converts the given tangent space custom vertex normal, to an object space normal, for the specified corner of the given polygon. For the conversion, a matrix using the normal, tangent and binormal will be used.
[in] | points | The points of the polygon object. |
[in] | polygonPoints | The vertex indices which form the current polygon. The list should not contain duplicate entries. In case of a triangle, three vertices should be provided. |
[in] | index | The index which specifies the corner of the polygon, for which the normal will be calculated. always in range [0, polygonPoints.GetCount() - 1] |
[in] | tangentSpaceNormal | The custom vertex normal (in tangent space) that should be converted to object space. |