D3D_OVERLOADS

C++ programmers who define D3D_OVERLOADS can use the extensions documented here to simplify their code in Direct3D Immediate Mode applications. D3D_OVERLOADS was introduced with DirectX® 5. This section is a reference to the D3D_OVERLOADS extensions.

These extensions must be defined with C++ linkage. If D3D_OVERLOADS is defined and the inclusion of D3dtypes.h or D3d.h is surrounded by extern "C", link errors will result. For example, the following syntax would generate link errors because of C linkage of D3D_OVERLOADS functionality:

#define D3D_OVERLOADS
extern "C" {
#include <d3d.h>
};
 

The D3D_OVERLOADS extensions can be organized into the following groups:

Constructors D3DLVERTEX
D3DTLVERTEX
D3DVECTOR
D3DVERTEX
Operators Access Grant Operators
Addition Operator
Assignment Operators
Bitwise Equality Operator
D3DMATRIX
Division Operator
Multiplication Operator
Subtraction Operator
Unary Operators
Vector Dominance Operators
Helper functions CrossProduct
DotProduct
Magnitude
Max
Maximize
Min
Minimize
Normalize
SquareMagnitude