D3DX

D3DX

In computing, D3DX (Direct3D Extension) is a high level API library which is written to supplement Microsoft's Direct3D graphics API. The D3DX library was introduced in Direct3D 7, and subsequently was improved in Direct3D 9. It provides classes for common calculations on vectors, matrices and colors, calculating look-at and projection matrices, spline interpolations, and several more complicated tasks, such as compiling or assembling shaders used for 3D graphic programming, compressed skeletal animation storage and matrix stacks. There are several functions that provide complex operations over 3D meshes like tangent-space computation, mesh simplification, precomputed radiance transfer, optimizing for vertex cache friendliness and strip reordering, and generators for 3D text meshes. 2D features include classes for drawing screen-space lines, text and sprite based particle systems. Spatial functions include various intersection routines, conversion from/to barycentric coordinates and bounding box/sphere generators.

The D3DX library contains pre-written routines for doing things common to most 2D/3D applications, such as games. Since the Direct3D API is relatively low-level, using the D3DX library is usually much simpler.

Contents

Interfaces

The D3DX library follows the COM object oriented programming model. Functionality is accessed using C++-like interfaces.

ID3DXEffect

The ID3DXEffect interface is used for compiling and binding FX shaders (.fx). It supports automatic mapping of named shader parameters to hardware constant registers, parameter pools, mapping textures to available samplers, specifying 'techniques' and modifying render states.

ID3DXFont

The ID3DXFont interface can be used to draw 2D text. See also D3DXCreateText that creates 3D meshes of text.

ID3DXLine

The ID3DXLine interface can be used for drawing anti-aliased screen-space lines with pattern.

ID3DXMesh

The ID3DXMesh interface is used for storage of meshes and mesh optimization for vertex cache friendliness and strip reordering. Some functions in D3DX operate on this interface. An example is D3DXComputeTangentFrame for creating a tangent-space frame for effects like normal and parallax mapping. A descendant of this class is ID3DXPMesh that can do geometry simplification.

ID3DXPRTEngine

It is used for Precomputed Radiance Transfer - a technique similar to spherical harmonics lighting that is used for precomputed global illumination and soft ambient lighting.

ID3DXSprite

The ID3DXSprite interface is a C++ class used for drawing a 2D image to the screen known as a sprite in computer graphics. In DirectX 7 this was typically done using the DirectDraw API, which is deprecated.

The programmer typically needs only to call the ID3DXSprite object's Begin() method to set up the render state and world transform for 2D drawing, call the Draw() method to add textures to the list to be drawn and finally call the End() method to draw the images to the screen and restore the original graphics state.

A common criticism of the D3DXSprite was that it was slow but this issue has been addressed as of Direct3D 9.

Functions

D3DXComputeTangentFrame

Computes the tangent-space frame of a mesh that is used for effects like normal/bump mapping, parallax mapping and anisotropic lighting models. It handles vertices at tangent-space discontinuities by making duplicates, thus solving the hairy ball problem. It doesn't handle reversed UV winding of faces so models with mirrored texture mapping may run into lighting troubles because of this.

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Microsoft Direct3D — Direct3D is part of Microsoft s DirectX application programming interface (API). Direct3D is available for Microsoft Windows operating systems (Windows 95 and above), and for other platforms through the open source software Wine. It is the base… …   Wikipedia

  • Direct3D — is part of Microsoft s DirectX API. Direct3D is only available for Microsoft s various Windows operating systems (Windows 95 and above) and is the base for the graphics API on the Xbox and Xbox 360 console systems. Direct3D is used to render… …   Wikipedia

  • Half precision — In computing, half precision is a computer numbering format that occupies only half of one storage location (word) in computer memory at some address. A half precision number may be defined to be a binary or decimal integer, fixed point, or… …   Wikipedia

  • Direct3D — est une bibliothèque logicielle de la série Microsoft DirectX. Direct3D est utilisé uniquement dans les multiples systèmes d exploitations Windows de Microsoft (Windows 95 et au delà), ainsi que dans la Xbox, mais dans une version assez… …   Wikipédia en Français

  • Direct 3D — Direct3D Direct3D est un composant de l API Microsoft DirectX. Direct3D est utilisé uniquement dans les multiples systèmes d exploitations Windows de Microsoft (Windows 95 et au delà), ainsi que dans la Xbox, mais dans une version assez… …   Wikipédia en Français

  • Windows 2000 — Part of the Microsoft Windows family Screenshot of Windows 2000 Professional …   Wikipedia

  • Utah teapot — A modern render utilizing the Utah teapot model by Martin Newell. The Utah teapot or Newell teapot is a 3D computer model which has become a standard reference object (and something of an in joke) in the computer graphics community. It is a… …   Wikipedia

  • Hitbox — Vereinfachte 2 dimensionale Darstellung einer einfachen und einer komplexeren Hitbox mit Trefferzonen Eine Hitbox (auch Hit Box; engl. für „Trefferkasten“) beschreibt einen vordefinierten, virtuellen, für den Anwender üblicherweise nicht… …   Deutsch Wikipedia

  • Trefferzone — Vereinfachte 2 dimensionale Darstellung einer einfachen und einer komplexeren Hitbox mit Trefferzonen Eine Hitbox (auch Hit Box; engl. für „Trefferkasten“) beschreibt einen vordefinierten, virtuellen, für den Anwender üblicherweise nicht… …   Deutsch Wikipedia

  • DirectX — Saltar a navegación, búsqueda DirectX Desarrollador Microsoft www.microsoft.com/windows/directx Información general …   Wikipedia Español

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”