D3DXTANGENT enumeration

Defines settings used for mesh tangent frame computations.

Syntax


typedef enum D3DXTANGENT { 
  D3DXTANGENT_WRAP_U                   = 0x01,
  D3DXTANGENT_WRAP_V                   = 0x02,
  D3DXTANGENT_WRAP_UV                  = 0x03,
  D3DXTANGENT_DONT_NORMALIZE_PARTIALS  = 0x04,
  D3DXTANGENT_DONT_ORTHOGONALIZE       = 0x08,
  D3DXTANGENT_ORTHOGONALIZE_FROM_V     = 0x010,
  D3DXTANGENT_ORTHOGONALIZE_FROM_U     = 0x020,
  D3DXTANGENT_WEIGHT_BY_AREA           = 0x040,
  D3DXTANGENT_WEIGHT_EQUAL             = 0x080,
  D3DXTANGENT_WIND_CW                  = 0x0100,
  D3DXTANGENT_CALCULATE_NORMALS        = 0x0200,
  D3DXTANGENT_GENERATE_IN_PLACE        = 0x0400
} D3DXTANGENT, *LPD3DXTANGENT;

Constants

D3DXTANGENT_WRAP_U

Texture coordinate values in the u direction are between 0 and 1. In this case a texture coordinate set will be chosen that minimizes the perimeter of the triangle. See Texture Wrapping (Direct3D 9).

D3DXTANGENT_WRAP_V

Texture coordinate values in the v direction are between 0 and 1. In this case a texture coordinate set will be chosen that minimizes the perimeter of the triangle. See Texture Wrapping (Direct3D 9).

D3DXTANGENT_WRAP_UV

Texture coordinate values in both u and v directions are between 0 and 1. In this case a texture coordinate set will be chosen that minimizes the perimeter of the triangle. See Texture Wrapping (Direct3D 9).

D3DXTANGENT_DONT_NORMALIZE_PARTIALS

Do not normalize partial derivatives with respect to texture coordinates. If not normalized, the scale of the partial derivatives is proportional to the scale of the 3D model divided by the scale of the triangle in (u, v) space. This scale value provides a measure of how much the texture is stretched in a given direction. The resulting vector length is a weighted sum of the lengths of the partial derivatives.

D3DXTANGENT_DONT_ORTHOGONALIZE

Do not transform texture coordinates to orthogonal Cartesian coordinates. Mutually exclusive with D3DXTANGENT_ORTHOGONALIZE_FROM_U and D3DXTANGENT_ORTHOGONALIZE_FROM_V.

D3DXTANGENT_ORTHOGONALIZE_FROM_V

Compute the partial derivative with respect to texture coordinate v independently for each vertex, and then compute the partial derivative with respect to u as the cross product of the partial derivative with respect to v and the normal vector. Mutually exclusive with D3DXTANGENT_DONT_ORTHOGONALIZE and D3DXTANGENT_ORTHOGONALIZE_FROM_U.

D3DXTANGENT_ORTHOGONALIZE_FROM_U

Compute the partial derivative with respect to texture coordinate u independently for each vertex, and then compute the partial derivative with respect to v as the cross product of the normal vector and the partial derivative with respect to u. Mutually exclusive with D3DXTANGENT_DONT_ORTHOGONALIZE and D3DXTANGENT_ORTHOGONALIZE_FROM_V.

D3DXTANGENT_WEIGHT_BY_AREA

Weight the direction of the computed per-vertex normal or partial derivative vector according to the areas of triangles attached to that vertex. Mutually exclusive with D3DXTANGENT_WEIGHT_EQUAL.

D3DXTANGENT_WEIGHT_EQUAL

Compute a unit-length normal vector for each triangle of the input mesh. Mutually exclusive with D3DXTANGENT_WEIGHT_BY_AREA.

D3DXTANGENT_WIND_CW

Vertices are ordered in a clockwise direction around each triangle. The computed normal vector direction is therefore inverted 180 degrees from the direction computed using counterclockwise vertex ordering.

D3DXTANGENT_CALCULATE_NORMALS

Compute the per-vertex normal vector for each triangle of the input mesh, and ignore any normal vectors already in the input mesh.

D3DXTANGENT_GENERATE_IN_PLACE

The results are stored in the original input mesh, and the output mesh is not used.

Requirements

Header

D3dx9mesh.h

See also

D3DXComputeTangentFrameEx

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.