Microsoft DirectX 9.0 SDK Update (October 2004)

Mesh.ComputeTangent Method

Language:

Note: This documentation is preliminary and is subject to change.

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.


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

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