Mesh.ComputeTangent Method

Language:

Computes the tangent vectors for the texture coordinates given in a texture stage.

Overload List

public void ComputeTangent(int, int, int, int);
public void ComputeTangent(int, int, int, int, GraphicsStream);
public void ComputeTangent(int, int, int, int, int[]);

Remarks

If the mesh vertex declaration specifies tangent or binormal fields, ComputeTangent updates any user-supplied tangent or binormal data. Alternatively, set tangentIndex to D3DX.Default to prevent updates to the user-supplied tangent data, or binormIndex to D3DX.Default to prevent updates to the user-supplied binormal data.

The ComputeTangent method depends on the mesh vertex declaration containing either the tangent field (tangentIndex), the binormal field (binormIndex), or both. If both are set to D3DX.Default, the method fails.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.
OutOfMemoryException Leave Site Microsoft Direct3D could not allocate sufficient memory to complete the call.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center