## Enumerated Types

The Microsoft® Direct3D® Retained Mode enumerated types are:

- D3DRMCOLORSOURCE
- D3DRMCOMBINETYPE
- D3DRMFILLMODE
- D3DRMFOGMODE
- D3DRMFRAMECONSTRAINT
- D3DRMLIGHTMODE
- D3DRMLIGHTTYPE
- D3DRMMATERIALMODE
- D3DRMPALETTEFLAGS
- D3DRMPROJECTIONTYPE
- D3DRMRENDERQUALITY
- D3DRMSHADEMODE
- D3DRMSORTMODE
- D3DRMTEXTUREQUALITY
- D3DRMUSERVISUALREASON
- D3DRMWRAPTYPE
- D3DRMXOFFORMAT
- D3DRMZBUFFERMODE

###

D3DRMCOLORSOURCE

Describes the color source of a Direct3DRMMeshBuilder object. You can set the color source by using the IDirect3DRMMeshBuilder::SetColorSource method. To retrieve it, use the IDirect3DRMMeshBuilder::GetColorSource method.

    typedef enum _D3DRMCOLORSOURCE{
        D3DRMCOLOR_FROMFACE,
        D3DRMCOLOR_FROMVERTEX
    } D3DRMCOLORSOURCE;

##### Values

D3DRMCOLOR_FROMFACE
  Object's color source is a face.
D3DRMCOLOR_FROMVERTEX
  Object's color source is a vertex.

##### See Also

IDirect3DRMMeshBuilder::SetColorSource, IDirect3DRMMeshBuilder::GetColorSource

###

D3DRMCOMBINETYPE

Specifies how to combine two matrices.

    typedef enum _D3DRMCOMBINETYPE{
        D3DRMCOMBINE_REPLACE,
        D3DRMCOMBINE_BEFORE,
        D3DRMCOMBINE_AFTER
    } D3DRMCOMBINETYPE;

##### Values

D3DRMCOMBINE_REPLACE
  Supplied matrix replaces the frame's current matrix.
D3DRMCOMBINE_BEFORE
  Supplied matrix is multiplied with the frame's current matrix and precedes the current matrix in the calculation.
D3DRMCOMBINE_AFTER
  Supplied matrix is multiplied with the frame's current matrix and follows the current matrix in the calculation.

##### Remarks

The order of the supplied and current matrices when they are multiplied is important because matrix multiplication is not commutative.

##### See Also

IDirect3DRMFrame::AddRotation, IDirect3DRMFrame::AddScale, IDirect3DRMFrame::AddTransform, IDirect3DRMFrame::AddTranslation

###

D3DRMFILLMODE

Used to define the D3DRMRENDERQUALITY type.

    typedef enum _D3DRMFILLMODE {
        D3DRMFILL_POINTS    = 0 * D3DRMLIGHT_MAX,
        D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX,
        D3DRMFILL_SOLID     = 2 * D3DRMLIGHT_MAX,
        D3DRMFILL_MASK      = 7 * D3DRMLIGHT_MAX,
        D3DRMFILL_MAX       = 8 * D3DRMLIGHT_MAX
    } D3DRMFILLMODE;

##### Values

D3DRMFILL_POINTS
  Fills points only; minimum fill mode.
D3DRMFILL_WIREFRAME
  Fill wire frames.
D3DRMFILL_SOLID
  Fill solid objects.
D3DRMFILL_MASK
  Fill using a mask.
D3DRMFILL_MAX
  Maximum value for fill mode.

##### See Also

D3DRMLIGHTMODE, D3DRMSHADEMODE, D3DRMRENDERQUALITY

###

D3DRMFOGMODE

Contains values that specify how rapidly and in what ways the fog effect intensifies with increasing distance from the camera.

In monochromatic (ramp) lighting mode, fog works properly only when the fog color is black. (If there is no lighting, any fog color will work, since in this case any fog color is effectively black.)

    typedef enum _D3DRMFOGMODE{
        D3DRMFOG_LINEAR,
        D3DRMFOG_EXPONENTIAL,
        D3DRMFOG_EXPONENTIALSQUARED
    } D3DRMFOGMODE;

##### Values

D3DRMFOG_LINEAR
  Fog effect intensifies linearly between the start and end points, according to the following formula:

  This is the only fog mode currently supported.

D3DRMFOG_EXPONENTIAL
  Fog effect intensifies exponentially, according to the following formula:

D3DRMFOG_EXPONENTIALSQUARED
  Fog effect intensifies exponentially with the square of the distance, according to the following formula:

##### Remarks

Note that fog can be considered a measure of visibility—the lower the fog value produced by one of the fog equations, the less visible an object is.

You can specify the fog's density and start and end points by using the IDirect3DRMFrame::SetSceneFogParams method. In the formulas for the exponential fog modes, e is the base of the natural logarithms; its value is approximately 2.71828.

##### See Also

IDirect3DRMFrame::SetSceneFogMode, IDirect3DRMFrame::SetSceneFogParams

###

D3DRMFRAMECONSTRAINT

Describes the axes of rotation to constrain when viewing a Direct3DRMFrame object. The IDirect3DRMFrame::LookAt method uses this enumerated type.

    typedef enum _D3DRMFRAMECONSTRAINT {
        D3DRMCONSTRAIN_Z,
        D3DRMCONSTRAIN_Y,
        D3DRMCONSTRAIN_X
    } D3DRMFRAMECONSTRAINT;

##### Values

D3DRMCONSTRAIN_Z
  Use only x- and y- rotations.
D3DRMCONSTRAIN_Y
  Use only x- and z- rotations.
D3DRMCONSTRAIN_X
  Use only y- and z- rotations.

##### See Also

IDirect3DRMFrame::LookAt

###

D3DRMLIGHTMODE

Used to define the D3DRMRENDERQUALITY type.

    typedef enum _D3DRMLIGHTMODE {
        D3DRMLIGHT_OFF      = 0 * D3DRMSHADE_MAX,
        D3DRMLIGHT_ON       = 1 * D3DRMSHADE_MAX,
        D3DRMLIGHT_MASK     = 7 * D3DRMSHADE_MAX,
        D3DRMLIGHT_MAX      = 8 * D3DRMSHADE_MAX
    } D3DRMLIGHTMODE;

##### Values

D3DRMLIGHT_OFF
  Lighting is off.
D3DRMLIGHT_ON
  Lighting is on.
D3DRMLIGHT_MASK
  Lighting uses a mask.
D3DRMLIGHT_MAX
  Maximum lighting mode.

##### See Also

D3DRMFILLMODE, D3DRMSHADEMODE, D3DRMRENDERQUALITY

###

D3DRMLIGHTTYPE

Defines the light type in uses to the IDirect3DRM::CreateLight method.

    typedef enum _D3DRMLIGHTTYPE{
        D3DRMLIGHT_AMBIENT,
        D3DRMLIGHT_POINT,
        D3DRMLIGHT_SPOT,
        D3DRMLIGHT_DIRECTIONAL,
        D3DRMLIGHT_PARALLELPOINT
    } D3DRMLIGHTTYPE;

##### Values

D3DRMLIGHT_AMBIENT
  Light is an ambient source.
D3DRMLIGHT_POINT
  Light is a point source.
D3DRMLIGHT_SPOT
  Light is a spotlight source.
D3DRMLIGHT_DIRECTIONAL
  Light is a directional source.
D3DRMLIGHT_PARALLELPOINT
  Light is a parallel point source.

###

D3DRMMATERIALMODE

Describes the source of material information for visuals rendered with a frame.

    typedef enum _D3DRMMATERIALMODE{
        D3DRMMATERIAL_FROMMESH,
        D3DRMMATERIAL_FROMPARENT,
        D3DRMMATERIAL_FROMFRAME
    } D3DRMMATERIALMODE;

##### Values

D3DRMMATERIAL_FROMMESH
  Material information is retrieved from the visual object (the mesh) itself. This is the default setting.
D3DRMMATERIAL_FROMPARENT
  Material information, along with color or texture information, is inherited from the parent frame.
D3DRMMATERIAL_FROMFRAME
  Material information is retrieved from the frame, overriding any previous material information that the visual object may have possessed.

##### See Also

IDirect3DRMFrame::GetMaterialMode, IDirect3DRMFrame::SetMaterialMode

###

D3DRMPALETTEFLAGS

Used to define how a color can be used in the D3DRMPALETTEENTRY structure.

    typedef enum _D3DRMPALETTEFLAGS {
        D3DRMPALETTE_FREE,
        D3DRMPALETTE_READONLY,
        D3DRMPALETTE_RESERVED
    } D3DRMPALETTEFLAGS;

##### Values

D3DRMPALETTE_FREE
  Renderer can use this entry freely.
D3DRMPALETTE_READONLY
  Fixed but can be used by renderer.
D3DRMPALETTE_RESERVED
  Cannot be used by renderer.

##### See Also

D3DRMPALETTEENTRY

###

D3DRMPROJECTIONTYPE

Defines the type of projection used in a Direct3DRMViewport object. The IDirect3DRMViewport::GetProjection and IDirect3DRMViewport::SetProjection methods use this enumerated type. The right-hand types enable right-handed projection.

The axes of the camera (see IDirect3DRMFrame2::SetAxes) are used in both left-handed and right-handed projection to determine what direction the camera is facing.

    typedef enum _D3DRMPROJECTIONTYPE{
        D3DRMPROJECT_PERSPECTIVE,
        D3DRMPROJECT_ORTHOGRAPHIC,
        D3DRMPROJECT_RIGHTHANDPERSPECTIVE,
        D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC
    } D3DRMPROJECTIONTYPE;

##### Values

D3DRMPROJECT_PERSPECTIVE
  Projection is perspective and left-handed.
D3DRMPROJECT_ORTHOGRAPHIC
  Projection is orthographic and left-handed.
D3DRMPROJECT_RIGHTHANDPERSPECTIVE
  Projection is perspective and right-handed.
D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC
  Projection is orthographic and right-handed.

##### See Also

IDirect3DRMViewport::GetProjection, IDirect3DRMViewport::SetProjection

###

D3DRMRENDERQUALITY

Combines descriptions of the shading mode, lighting mode, and filling mode for a Direct3DRMMesh object.

    typedef enum _D3DRMSHADEMODE {
        D3DRMSHADE_FLAT        = 0,
        D3DRMSHADE_GOURAUD     = 1,
        D3DRMSHADE_PHONG       = 2,
        D3DRMSHADE_MASK        = 7,
        D3DRMSHADE_MAX         = 8
    } D3DRMSHADEMODE;
    typedef enum _D3DRMLIGHTMODE {
        D3DRMLIGHT_OFF          = 0 * D3DRMSHADE_MAX,
        D3DRMLIGHT_ON           = 1 * D3DRMSHADE_MAX,
        D3DRMLIGHT_MASK         = 7 * D3DRMSHADE_MAX,
        D3DRMLIGHT_MAX          = 8 * D3DRMSHADE_MAX
    } D3DRMLIGHTMODE;
    typedef enum _D3DRMFILLMODE {
        D3DRMFILL_POINTS        = 0 * D3DRMLIGHT_MAX,
        D3DRMFILL_WIREFRAME     = 1 * D3DRMLIGHT_MAX,
        D3DRMFILL_SOLID         = 2 * D3DRMLIGHT_MAX,
        D3DRMFILL_MASK          = 7 * D3DRMLIGHT_MAX,
        D3DRMFILL_MAX           = 8 * D3DRMLIGHT_MAX
    } D3DRMFILLMODE;

    typedef DWORD D3DRMRENDERQUALITY;

    #define D3DRMRENDER_WIREFRAME   (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME)
    #define D3DRMRENDER_UNLITFLAT   (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID)
    #define D3DRMRENDER_FLAT        (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
    #define D3DRMRENDER_GOURAUD     (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
    #define D3DRMRENDER_PHONG       (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID)

##### Values

D3DRMSHADEMODE, D3DRMLIGHTMODE, and D3DRMFILLMODE
  These enumerated types describe the shade, light, and fill modes for Direct3DRMMesh objects.

D3DRMRENDER_WIREFRAME
  Display only the edges.
D3DRMRENDER_UNLITFLAT
  Flat shaded without lighting.
D3DRMRENDER_FLAT
  Flat shaded.
D3DRMRENDER_GOURAUD
  Gouraud shaded.
D3DRMRENDER_PHONG
  Phong shaded. Phong shading is not currently supported.

##### See Also

IDirect3DRMMesh::GetGroupQuality, IDirect3DRMMesh::SetGroupQuality,IDirect3DRMDevice2::SetRenderMode

###

D3DRMSHADEMODE

Used to define the D3DRMRENDERQUALITY type.

    typedef enum _D3DRMSHADEMODE {
        D3DRMSHADE_FLAT     = 0,
        D3DRMSHADE_GOURAUD  = 1,
        D3DRMSHADE_PHONG    = 2,
        D3DRMSHADE_MASK     = 7,
        D3DRMSHADE_MAX      = 8
    } D3DRMSHADEMODE;

##### See Also

D3DRMFILLMODE, D3DRMLIGHTMODE, D3DRMRENDERQUALITY

###

D3DRMSORTMODE

Describes how child frames are sorted in a scene.

    typedef enum _D3DRMSORTMODE {
        D3DRMSORT_FROMPARENT,
        D3DRMSORT_NONE,
        D3DRMSORT_FRONTTOBACK,
        D3DRMSORT_BACKTOFRONT
    } D3DRMSORTMODE;

##### Values

D3DRMSORT_FROMPARENT
  Child frames inherit the sorting order of their parents. This is the default setting.
D3DRMSORT_NONE
  Child frames are not sorted.
D3DRMSORT_FRONTTOBACK
  Child frames are sorted front-to-back.
D3DRMSORT_BACKTOFRONT
  Child frames are sorted back-to-front.

##### See Also

IDirect3DRMFrame::GetSortMode, IDirect3DRMFrame::SetSortMode

###

D3DRMTEXTUREQUALITY

Describes how a device interpolates between pixels in a texture and pixels in a viewport. This enumerated type is used by the IDirect3DRMDevice::SetTextureQuality and IDirect3DRMDevice::GetTextureQuality methods.

    typedef enum _D3DRMTEXTUREQUALITY{
        D3DRMTEXTURE_NEAREST,
        D3DRMTEXTURE_LINEAR,
        D3DRMTEXTURE_MIPNEAREST,
        D3DRMTEXTURE_MIPLINEAR,
        D3DRMTEXTURE_LINEARMIPNEAREST,
        D3DRMTEXTURE_LINEARMIPLINEAR
    } D3DRMTEXTUREQUALITY;

##### Values

D3DRMTEXTURE_NEAREST
  Choose the nearest pixel in the texture. Does not support mipmapping.
D3DRMTEXTURE_LINEAR
  Linearly interpolate the four nearest pixels. Does not support mipmapping.
D3DRMTEXTURE_MIPNEAREST
  Similar to D3DRMTEXTURE_NEAREST, but uses the appropriate mipmap instead of the texture. Pixel sampling and mipmapping are both nearest.
D3DRMTEXTURE_MIPLINEAR
  Similar to D3DRMTEXTURE_LINEAR, but uses the appropriate mipmap instead of the texture. Pixel sampling is linear; mipmapping is nearest.
D3DRMTEXTURE_LINEARMIPNEAREST
  Similar to D3DRMTEXTURE_MIPNEAREST, but interpolates between the two nearest mipmaps. Pixel sampling is nearest; mipmapping is linear.
D3DRMTEXTURE_LINEARMIPLINEAR
  Similar to D3DRMTEXTURE_MIPLINEAR, but interpolates between the two nearest mipmaps. Both pixel sampling and mipmapping are linear.

###

D3DRMUSERVISUALREASON

Defines the reason the system has used the D3DRMUSERVISUALCALLBACK callback function.

    typedef enum _D3DRMUSERVISUALREASON {
        D3DRMUSERVISUAL_CANSEE,
        D3DRMUSERVISUAL_RENDER
    } D3DRMUSERVISUALREASON;

##### Values

D3DRMUSERVISUAL_CANSEE
  Callback function should return TRUE if the user-visual object is visible in the viewport.
D3DRMUSERVISUAL_RENDER
  Callback function should render the user-visual object.

##### See Also

D3DRMUSERVISUALCALLBACK

###

D3DRMWRAPTYPE

Defines the type of Direct3DRMWrap object created by the IDirect3DRM::CreateWrap method. You can also use this enumerated type to initialize a Direct3DRMWrap object in a call to the IDirect3DRMWrap::Init method.

    typedef enum _D3DRMWRAPTYPE{
        D3DRMWRAP_FLAT,
        D3DRMWRAP_CYLINDER,
        D3DRMWRAP_SPHERE,
        D3DRMWRAP_CHROME
    } D3DRMWRAPTYPE;

##### Values

D3DRMWRAP_FLAT
  Wrap is flat.
D3DRMWRAP_CYLINDER
  Wrap is cylindrical.
D3DRMWRAP_SPHERE
  Wrap is spherical.
D3DRMWRAP_CHROME
  Wrap allocates texture coordinates so that the texture appears to be reflected onto the objects.

##### See Also

IDirect3DRM::CreateWrap, IDirect3DRMWrap::Init, IDirect3DRMWrap Interface

###

D3DRMXOFFORMAT

Defines the file type used by the IDirect3DRMMeshBuilder::Save method.

    typedef enum _D3DRMXOFFORMAT{
        D3DRMXOF_BINARY,
        D3DRMXOF_COMPRESSED,
        D3DRMXOF_TEXT
    } D3DRMXOFFORMAT;

##### Values

D3DRMXOF_BINARY
  File is in binary format. This is the default setting.
D3DRMXOF_COMPRESSED
  Not currently supported.
D3DRMXOF_TEXT
  File is in text format.

##### Remarks

The D3DRMXOF_BINARY and D3DRMXOF_TEXT settings are mutually exclusive.

##### See Also

IDirect3DRMMeshBuilder::Save

###

D3DRMZBUFFERMODE

Describes whether z-buffering is enabled.

    typedef enum _D3DRMZBUFFERMODE {
        D3DRMZBUFFER_FROMPARENT,
        D3DRMZBUFFER_ENABLE,
        D3DRMZBUFFER_DISABLE
    } D3DRMZBUFFERMODE;

##### Values

D3DRMZBUFFER_FROMPARENT
  The frame inherits the z-buffer setting from its parent frame. This is the default setting.
D3DRMZBUFFER_ENABLE
  Z-buffering is enabled.
D3DRMZBUFFER_DISABLE
  Z-buffering is disabled.

##### See Also

IDirect3DRMFrame::GetZbufferMode, IDirect3DRMFrame::SetZbufferMode

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.