C++ Constants

Microsoft® Direct3D® Retained Mode includes other type definitions for C++, not included in structures or enumerated types. These are:

D3DRMANIMATIONOPTIONS

Specifies values used by the IDirect3DRMAnimation2::GetOptions and IDirect3DRMAnimation2::SetOptions methods and the D3DRMANIMATIONKEY structure to define how animations are played.

Syntax

typedef DWORD D3DRMANIMATIONOPTIONS;
#define D3DRMANIMATION_CLOSED             0x02L
#define D3DRMANIMATION_LINEARPOSITION     0x04L
#define D3DRMANIMATION_OPEN               0x01L
#define D3DRMANIMATION_POSITION           0x00000020L
#define D3DRMANIMATION_SCALEANDROTATION   0x00000010L
#define D3DRMANIMATION_SPLINEPOSITION     0x08L

Parameters

D3DRMANIMATION_CLOSED
Animation plays continually, looping back to the beginning when it reaches the end. In a closed animation, if you want a smooth transition from the end to the beginning, the last key in the animation should be a repeat of the first. This repeated key is used to indicate the time difference between the last and first keys in the looping animation. However, if the last key is not a repeat of the first, it is no longer being ignored in the new interfaces (IDirect3DRMAnimation2, IDirect3DRMAnimationSet2). It takes effect, and then the animation jumps immediately back to the beginning.
D3DRMANIMATION_LINEARPOSITION
Animation's position is set linearly.
D3DRMANIMATION_OPEN
Animation plays once and stops.
D3DRMANIMATION_POSITION
Animation's position matrix should overwrite any transformation matrices that could be set by other methods.
D3DRMANIMATION_SCALEANDROTATION
Animation's scale and rotation matrix should overwrite any transformation matrices that could be set by other methods.
D3DRMANIMATION_SPLINEPOSITION
Animation's position is set using splines.

D3DRMCOLORMODEL

Describes the color model implemented by the device. For more information, see the D3DCOLORMODEL enumerated type.

Syntax

typedef D3DCOLORMODEL D3DRMCOLORMODEL;

See Also

D3DCOLORMODEL

D3DRMINTERPOLATIONOPTIONS

Defines options for the IDirect3DRMInterpolator::Interpolate method. These options modify how the object is loaded.

Syntax

typedef DWORD D3DRMINTERPOLATIONOPTIONS;
#define D3DRMINTERPOLATION_OPEN 0x01L
#define D3DRMINTERPOLATION_CLOSED 0x02L
#define D3DRMINTERPOLATION_NEAREST 0x0100L
#define D3DRMINTERPOLATION_LINEAR 0x04L
#define D3DRMINTERPOLATION_SPLINE 0x08L
#define D3DRMINTERPOLATION_VERTEXCOLOR 0x40L
#define D3DRMINTERPOLATION_SLERPNORMALS 0x80L

Parameters

D3DRMINTERPOLATION_OPEN
First and last keys of each key chain will fix the interpolated values outside of the index span.
D3DRMINTERPOLATION_CLOSED
The interpolation is cyclic. The keys effectively repeat infinitely with a period equal to the index span. For compatibility with animations, any key with an index equal to the end of the span is ignored.
D3DRMINTERPOLATION_NEAREST
Nearest key value is used for determining in-between values on each key chain (execution thread).
D3DRMINTERPOLATION_LINEAR
Linear interpolation between the two nearest keys is used for determining in-between values on each key chain.
D3DRMINTERPOLATION_SPLINE
B-spline blending function on the four nearest keys is used for determining in-between values on each key chain.
D3DRMINTERPOLATION_VERTEXCOLOR
Specifies that vertex colors should be interpolated. Only affects the interpolation of IDirect3DRMMesh::SetVertices.
D3DRMINTERPOLATION_SLERPNORMALS
Specifies that vertex normals should be spherically interpolated (not currently implemented). Only affects the interpolation of IDirect3DRMMesh::SetVertices.

D3DRMLOADOPTIONS

Defines options for the IDirect3DRM3::Load, IDirect3DRMAnimationSet2::Load, IDirect3DRMFrame3::Load, IDirect3DRMMeshBuilder3::Load, and IDirect3DRMProgressiveMesh::Load methods. These options modify how the object is loaded.

Syntax

typedef DWORD D3DRMLOADOPTIONS;
#define D3DRMLOAD_FROMFILE             0x00L
#define D3DRMLOAD_FROMRESOURCE         0x01L
#define D3DRMLOAD_FROMMEMORY           0x02L
#define D3DRMLOAD_FROMURL              0x08L
#define D3DRMLOAD_BYNAME               0x10L
#define D3DRMLOAD_BYPOSITION           0x20L
#define D3DRMLOAD_BYGUID               0x30L
#define D3DRMLOAD_FIRST                0x40L
#define D3DRMLOAD_INSTANCEBYREFERENCE  0x100L
#define D3DRMLOAD_INSTANCEBYCOPYING    0x200L
#define D3DRMLOAD_ASYNCHRONOUS         0x400L

Parameters

Source flags
D3DRMLOAD_FROMFILE
Load from a file. This is the default setting.
D3DRMLOAD_FROMRESOURCE
Load from a resource. If this flag is specified, the lpvObjSource parameter of the calling Load method must point to a D3DRMLOADRESOURCE structure.
D3DRMLOAD_FROMMEMORY
Load from memory. If this flag is specified, the lpvObjSource parameter of the calling Load method must point to a D3DRMLOADMEMORY structure.
D3DRMLOAD_FROMURL
Load from an URL.
Identifier flags
D3DRMLOAD_BYNAME
Load any object by using a specified name.
D3DRMLOAD_BYPOSITION
Load a stand-alone object based on a given zero-based position (that is, the nth object in the file). Stand-alone objects can contain other objects, but are not contained by any other objects.
D3DRMLOAD_BYGUID
Load any object by using a specified globally unique identifier (GUID).
D3DRMLOAD_FIRST
The default setting. Load the first stand-alone object of the given type (for example, a mesh if the application uses IDirect3DRMMeshBuilder3::Load). Stand-alone objects can contain other objects, but are not contained by any other objects.
Instance flags
D3DRMLOAD_INSTANCEBYREFERENCE
Check whether an object already exists with the same name as specified and, if so, use an instance of that object instead of creating a new one.
D3DRMLOAD_INSTANCEBYCOPYING
Check whether an object already exists with the same name as specified and, if so, copy that object.
Source flags
D3DRMLOAD_ASYNCHRONOUS
The Load call will return immediately. It is up to the application to use events to find out how the load is progressing. By default, loading is done synchronously, and the Load call will not return until all data has been loaded or an error occurs.

Remarks

Each of the Load methods uses an lpvObjSource parameter to specify the source of the object and an lpvObjID parameter to identify the object. The system interprets the contents of the lpvObjSource parameter based on the choice of source flags, and it interprets the contents of the lpvObjID parameter based on the choice of identifier flags.

The instance flags do not change the interpretation of any of the parameters. By using the D3DRMLOAD_INSTANCEBYREFERENCE flag, it is possible for an application to load the same file twice without creating any new objects. If an object does not have a name, setting the D3DRMLOAD_INSTANCEBYREFERENCE flag has the same effect as setting the D3DRMLOAD_INSTANCEBYCOPYING flag—the loader creates each unnamed object as a new one, even if some of the objects are identical.

D3DRMMAPPING

Specifies values used by the IDirect3DRMMesh::GetGroupMapping and IDirect3DRMMesh::SetGroupMapping methods to define how textures are mapped to a group.

Syntax

typedef DWORD D3DRMMAPPING, D3DRMMAPPINGFLAG;
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPU = 1;
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPV = 2;
static const D3DRMMAPPINGFLAG D3DRMMAP_PERSPCORRECT = 4;

Parameters

D3DRMMAPPINGFLAG
Type equivalent to D3DRMMAPPING.
D3DRMMAP_WRAPU
Texture wraps in the u-direction.
D3DRMMAP_WRAPV
Texture wraps in the v-direction.
D3DRMMAP_PERSPCORRECT
Texture wrapping is perspective-corrected.

Remarks

The D3DRMMAP_WRAPU and D3DRMMAP_WRAPV flags determine how the rasterizer interprets texture coordinates. The rasterizer always interpolates the shortest distance between texture coordinates; that is, a line. The path taken by this line, and the valid values for the u- and v-coordinates, varies with the use of the wrapping flags. If either or both flags are set, the line can wrap around the texture edge in the u- or v- direction, as if the texture had a cylindrical or toroidal topology. For more information, see Wraps.

See Also

Wraps, IDirect3DRMMesh::GetGroupMapping, IDirect3DRMMesh::SetGroupMapping

D3DRMMATRIX4D

Expresses a transformation as an array. The organization of the matrix entries is D3DRMMATRIX4D[row][column].

Syntax

typedef D3DVALUE D3DRMMATRIX4D[4][4];

See Also

IDirect3DRMFrame3::AddTransform, IDirect3DRMFrame3::GetTransform

D3DRMSAVEOPTIONS

Defines options for the IDirect3DRMMeshBuilder3::Save method.

Syntax

typedef DWORD D3DRMSAVEOPTIONS;
#define D3DRMXOFSAVE_NORMALS 1
#define D3DRMXOFSAVE_TEXTURECOORDINATES 2
#define D3DRMXOFSAVE_MATERIALS 4
#define D3DRMXOFSAVE_TEXTURENAMES 8
#define D3DRMXOFSAVE_ALL 15
#define D3DRMXOFSAVE_TEMPLATES 16 
#define D3DRMSAVE_TEXTURETOPOLOGY 32

Parameters

D3DRMXOFSAVE_NORMALS
Save normal vectors in addition to the basic geometry.
D3DRMXOFSAVE_TEXTURECOORDINATES
Save texture coordinates in addition to the basic geometry.
D3DRMXOFSAVE_MATERIALS
Save materials in addition to the basic geometry.
D3DRMXOFSAVE_TEXTURENAMES
Save texture names in addition to the basic geometry.
D3DRMXOFSAVE_ALL
Save normal vectors, texture coordinates, materials, and texture names in addition to the basic geometry.
D3DRMXOFSAVE_TEMPLATES
Save templates with the file. By default, templates are not saved.
D3DRMSAVE_TEXTURETOPOLOGY
Save the mesh's face wrap values (set by IDirect3DRMMeshBuilder3::SetTextureTopology or IDirect3DRMFace2::SetTextureTopology). This flag is not included when you pass D3DRMXOFSAVE_ALL to the Save method. You should pass D3DRMSAVE_TEXTURETOPOLOGY|D3DRMXOFSAVE_ALL if you want to save everything. You only need to pass this flag when you have called IDirect3DRMMeshBuilder3::SetTextureTopology or IDirect3DRMFace2::SetTextureTopology and want to preserve the values you set.

Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.