Direct3D Retained Mode Animated Header --IDirect3DRMFrame2 Direct3D Retained Mode Animated Header --IDirect3DRMFrame2 * Microsoft Direct3D Retained Mode SDK
*Index  *Topic Contents
*Previous Topic: IDirect3DRMFrame
*Next Topic: IDirect3DRMInterpolator

IDirect3DRMFrame2


The IDirect3DRMFrame2 interface is an extension of the IDirect3DRMFrame interface. IDirect3DRMFrame2 has additional methods that enable using materials, bounding boxes, and axes with frames. IDirect3DRMFrame2 also has a IDirect3DRMFrame2::RayPick method to calculate the intersections of visuals in the frame with a ray of specified position and direction. In addition, IDirect3DRMFrame2 has one changed method IDirect3DRMFrame2::AddMoveCallback2.

For a conceptual overview, see IDirect3DRMFrame, IDirect3DRMFrame2, and IDirect3DRMFrameArray Interfaces.

The methods of the IDirect3DRMFrame2 interface can be organized into the following groups:

Axes GetAxes
GetInheritAxes
SetAxes
SetInheritAxes
Background GetSceneBackground
GetSceneBackgroundDepth
SetSceneBackground
SetSceneBackgroundDepth
SetSceneBackgroundImage
SetSceneBackgroundRGB
Bounding Box GetBox
GetBoxEnable
GetHierarchyBox
SetBox
SetBoxEnable
Color GetColor
SetColor
SetColorRGB
Fog GetSceneFogColor
GetSceneFogEnable
GetSceneFogMode
GetSceneFogParams
SetSceneFogColor
SetSceneFogEnable
SetSceneFogMode
SetSceneFogParams
Hierarchies AddChild
DeleteChild
GetChildren
GetParent
GetScene
Lighting AddLight
DeleteLight
GetLights
Loading Load
Material GetMaterial
SetMaterial
Material modes GetMaterialMode
SetMaterialMode
Positioning and movement AddMoveCallback2
AddRotation
AddScale
AddTranslation
DeleteMoveCallback
GetOrientation
GetPosition
GetRotation
GetVelocity
LookAt
Move
SetOrientation
SetPosition
SetQuaternion
SetRotation
SetVelocity
Ray Picking RayPick
Sorting GetSortMode
GetZbufferMode
SetSortMode
SetZbufferMode
Textures GetTexture
GetTextureTopology
SetTexture
SetTextureTopology
Transformations AddTransform
GetTransform
InverseTransform
Transform
Visual objects AddVisual
DeleteVisual
GetVisuals

The IDirect3DRMFrame2 interface, like all Component Object Model (COM) interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
AddRef
QueryInterface
Release

In addition, the IDirect3DRMFrame2 interface inherits the following methods from the IDirect3DRMObject interface:
AddDestroyCallback
Clone
DeleteDestroyCallback
GetAppData
GetClassName
GetName
SetAppData
SetName

The Direct3DRMFrame2 object is obtained by using the IDirect3DRM2::CreateFrame method.


IDirect3DRMFrame2::AddChild

IDirect3DRMFrame2

Adds a child frame to a frame hierarchy.

HRESULT AddChild(
  LPDIRECT3DRMFRAME lpD3DRMFrameChild
  );

Parameters
lpD3DRMFrameChild
Address of the Direct3DRMFrame object that will be added as a child.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

If the frame being added as a child already has a parent, this method removes it from its previous parent before adding it to the new parent.

To preserve an object's transformation, use the IDirect3DRMFrame2::GetTransform method to retrieve the object's transformation before using the AddChild method. Then reapply the transformation after the frame is added.

See Also

Hierarchies


IDirect3DRMFrame2::AddLight

IDirect3DRMFrame2

Adds a light to a frame.

HRESULT AddLight(
  LPDIRECT3DRMLIGHT lpD3DRMLight
  );

Parameters
lpD3DRMLight
Address of a variable that represents the Direct3DRMLight object to be added to the frame.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::AddMoveCallback2

IDirect3DRMFrame2

Adds a callback function for special movement processing. The callback is called when the frame is moved or updated.

HRESULT AddMoveCallback2(
  D3DRMFRAME2MOVECALLBACK d3drmFMC,
  VOID * lpArg,
  DWORD dwFlags
  );

Parameters
d3drmFMC
Application-defined D3DRMFRAME2MOVECALLBACK callback function.
lpArg
Application-defined data to be passed to the callback function.
dwFlags
One of the following values:
D3DRMCALLBACK_PREORDER — The default value. When IDirect3DRMFrame2::Move traverses the hierarchy, callbacks for a frame are used before any child frames are traversed.
D3DRMCALLBACK_POSTORDER — When IDirect3DRMFrame2::Move traverses the hierarchy, callbacks for a frame are used after the child frames are traversed.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

Multiple callbacks on an individual frame are used in the order that the callbacks were created.

See Also

IDirect3DRMFrame2::Move, IDirect3DRMFrame2::DeleteMoveCallback


IDirect3DRMFrame2::AddRotation

IDirect3DRMFrame2

Adds a rotation about (rvX, rvY, rvZ) by the number of radians specified in rvTheta.

HRESULT AddRotation(
  D3DRMCOMBINETYPE rctCombine,
  D3DVALUE rvX,
  D3DVALUE rvY,
  D3DVALUE rvZ,
  D3DVALUE rvTheta
  );

Parameters
rctCombine
A member of the D3DRMCOMBINETYPE enumerated type that specifies how to combine the new rotation with any current frame transformation.
rvX, rvY, and rvZ
Axis about which to rotate.
rvTheta
Angle of rotation, in radians.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

The specified rotation changes the matrix only for the frame identified by this IDirect3DRMFrame2 interface. This method changes the objects in the frame only once, unlike IDirect3DRMFrame2::SetRotation, which changes the matrix with every render tick.

See Also

3-D Transformations, IDirect3DRMFrame2::SetRotation


IDirect3DRMFrame2::AddScale

IDirect3DRMFrame2

Scales a frame's local transformation by (rvX, rvY, rvZ).

HRESULT AddScale(
  D3DRMCOMBINETYPE rctCombine,
  D3DVALUE rvX,
  D3DVALUE rvY,
  D3DVALUE rvZ
  );

Parameters
rctCombine
Member of the D3DRMCOMBINETYPE enumerated type that specifies how to combine the new scale with any current frame transformation.
rvX, rvY, and rvZ
Scale factors in the x-, y-, and z-directions.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

The specified transformation only changes the matrix for the frame identified by the IDirect3DRMFrame2 interface.

See Also

3-D Transformations


IDirect3DRMFrame2::AddTransform

IDirect3DRMFrame2

Transforms the local coordinates of the frame by the affine transformation specified by rctCombine and rmMatrix.

HRESULT AddTransform(
  D3DRMCOMBINETYPE rctCombine,
  D3DRMMATRIX4D rmMatrix
  );

Parameters
rctCombine
Member of the D3DRMCOMBINETYPE enumerated type that specifies how to combine the new transformation with any current transformation.
rmMatrix
Member of the D3DRMMATRIX4D array that defines the transformation matrix to be combined.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

Although a 4×4 matrix is given, the last column must be the transpose of [0 0 0 1] for the transformation to be affine.

The specified transformation changes the matrix only for the frame identified by this IDirect3DRMFrame2 interface.

See Also

3-D Transformations


IDirect3DRMFrame2::AddTranslation

IDirect3DRMFrame2

Adds a translation by (rvX, rvY, rvZ) to a frame's local coordinate system.

HRESULT AddTranslation(
  D3DRMCOMBINETYPE rctCombine,
  D3DVALUE rvX,
  D3DVALUE rvY,
  D3DVALUE rvZ
  );

Parameters
rctCombine
Member of the D3DRMCOMBINETYPE enumerated type that specifies how to combine the new translation with any current translation.
rvX, rvY, and rvZ
Definitions of the position changes in the x-, y-, and z-directions.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

The specified translation changes the matrix only for the frame identified by this IDirect3DRMFrame2 interface.

See Also

3-D Transformations


IDirect3DRMFrame2::AddVisual

IDirect3DRMFrame2

Adds a visual object to a frame.

HRESULT AddVisual(
  LPDIRECT3DRMVISUAL lpD3DRMVisual
  );

Parameters
lpD3DRMVisual
Address of a variable that represents the Direct3DRMVisual object to be added to the frame.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

Visual objects include meshes and textures. When a visual object is added to a frame, it becomes visible if the frame is in view. The frame references the visual object.


IDirect3DRMFrame2::DeleteChild

IDirect3DRMFrame2

Removes a frame from the hierarchy. If the frame is not referenced, it is destroyed along with any child frames, lights, and meshes.

HRESULT DeleteChild(
  LPDIRECT3DRMFRAME lpChild
  );

Parameters
lpChild
Address of the Direct3DRMFrame object to be used as the child.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

Hierarchies


IDirect3DRMFrame2::DeleteLight

IDirect3DRMFrame2

Removes a light from a frame, destroying the light if it is no longer referenced. When a light is removed from a frame, the light no longer affects meshes in the scene its frame was in.

HRESULT DeleteLight(
  LPDIRECT3DRMLIGHT lpD3DRMLight
  );

Parameters
lpD3DRMLight
Address of a variable that represents the Direct3DRMLight object to be removed.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::DeleteMoveCallback

IDirect3DRMFrame2

Removes a frame-move callback function previously added with AddMoveCallback.

HRESULT DeleteMoveCallback(
  D3DRMFRAMEMOVECALLBACK d3drmFMC,
  VOID * lpArg
  );

Parameters
d3drmFMC
Application-defined D3DRMFRAMEMOVECALLBACK callback function.
lpArg
Application-defined data that was passed to the callback function.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::AddMoveCallback2, IDirect3DRMFrame2::Move


IDirect3DRMFrame2::DeleteVisual

IDirect3DRMFrame2

Removes a visual object from a frame, destroying it if it is no longer referenced.

HRESULT DeleteVisual(
  LPDIRECT3DRMVISUAL lpD3DRMVisual
  );

Parameters
lpD3DRMVisual
Address of a variable that represents the Direct3DRMVisual object to be removed.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::GetAxes

IDirect3DRMFrame2

Retrieves the vectors that are aligned with the direction (rvDx, rvDy, rvDz) and up (rvUx, rvUy, rvUz) vectors supplied to the IDirect3DRMFrame2::SetOrientation method.

HRESULT GetAxes(
  LPD3DVECTOR dir,
  LPD3DVECTOR up
  );

Parameters
dir
The z-axis for the frame. Default is (0,0,1).
up
The y-axis for the frame. Default is (0,1,0).
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method along with IDirect3DRMFrame2::SetAxes helps support both left-handed and right-handed coordinate systems. SetAxes allows you to specify that the negative z-axis represents the front of the object.

See Also

IDirect3DRMFrame2::SetAxes, IDirect3DRMFrame2::GetInheritAxes, IDirect3DRMFrame2::SetInheritAxes


IDirect3DRMFrame2::GetBox

IDirect3DRMFrame2

Retrieves the bounding box containing a DIRECT3DRMFRAME2 object. The bounding box gives the minimum and maximum model coordinates in each dimension.

HRESULT GetBox(
  D3DRMBOX * lpD3DRMBox
  );

Parameters
lpD3DRMBox
Address of a D3DRMBOX structure that will be filled with the bounding box coordinates.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. Returns D3DRMERR_BOXNOTSET unless a valid bounding box has already been set on the frame. For a list of other possible return codes, see Direct3D Retained Mode Return Values.

Remarks

This method supports a bounding box on a frame for hierarchical culling. A valid bounding box must be set on the frame with IDirect3DRMFrame2::SetBox. For a bounding box to be enabled, the IDirect3DRMFrame2::SetBoxEnable method must be used to set the enable flag to TRUE. By default, the box-enable flag is FALSE. There is no default bounding box.

See Also

IDirect3DRMFrame2::SetBox, IDirect3DRMFrame2::SetBoxEnable, IDirect3DRMFrame2::GetBoxEnable


IDirect3DRMFrame2::GetBoxEnable

IDirect3DRMFrame2

Retrieves the flag that determines whether a bounding box is enabled for this Direct3DRMFrame2 object.

BOOL GetBoxEnable( );

Return Values

Returns TRUE if a bounding box is enabled, or FALSE if it is not enabled.

Remarks

For a bounding box to be enabled, the IDirect3DRMFrame2::SetBoxEnable flag must be used to set the enable flag to TRUE. By default, the box enable flag is FALSE.

See Also

IDirect3DRMFrame2::SetBoxEnable IDirect3DRMFrame2::GetBox, IDirect3DRMFrame2::SetBox


IDirect3DRMFrame2::GetChildren

IDirect3DRMFrame2

Retrieves a list of child frames in the form of a Direct3DRMFrameArray object.

HRESULT GetChildren(
  LPDIRECT3DRMFRAMEARRAY* lplpChildren
  );

Parameters
lplpChildren
Address of a pointer to be initialized with a valid Direct3DRMFrameArray pointer if the call succeeds.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

DIRECT3DRMFRAMEARRAY, Hierarchies


IDirect3DRMFrame2::GetColor

IDirect3DRMFrame2

Retrieves the color of the frame.

D3DCOLOR GetColor( );

Return Values

Returns the color of the Direct3DRMFrame2 object.

See Also

IDirect3DRMFrame2::SetColor


IDirect3DRMFrame2::GetHierarchyBox

IDirect3DRMFrame2

Calculates a bounding box to contain all the geometry in the hierarchy rooted in this Direct3DRMFrame2 object.

HRESULT GetHierarchyBox(
  D3DRMBOX * lpD3DRMBox
  );

Parameters
lpD3DRMBox
Address of a D3DRMBOX structure that will be filled with the bounding box coordinates.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::GetBox, IDirect3DRMFrame2::SetBox, IDirect3DRMFrame2::SetBoxEnable, IDirect3DRMFrame2::GetBoxEnable


IDirect3DRMFrame2::GetInheritAxes

IDirect3DRMFrame2

Retrieves the flag that indicates whether the axes for the frame are inherited from the parent frame.

BOOL GetInheritAxes( );

Return Values

Returns TRUE if the frame inherits axes (the default) and FALSE if the frame does not inherit axes.

Remarks

By default, the axes are inherited from the parent. If a frame is set to inherit from a parent and there is no parent, the frame acts as if it inherits from a parent with the default axes (direction=(0,0,1) and up=(0,1,0)).

This method and the IDirect3DRMFrame2::SetInheritAxes method allow a single policy for axes to be set at the root of the hierarchy.

See Also

IDirect3DRMFrame2::SetInheritAxes, IDirect3DRMFrame2::GetAxes, IDirect3DRMFrame2::SetAxes


IDirect3DRMFrame2::GetLights

IDirect3DRMFrame2

Retrieves a list of lights in the frame in the form of a Direct3DRMLightArray object.

HRESULT GetLights(
  LPDIRECT3DRMLIGHTARRAY* lplpLights
  );

Parameters
lplpLights
Address of a pointer to be initialized with a valid Direct3DRMLightArray pointer if the call succeeds.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMLightArray


IDirect3DRMFrame2::GetMaterial

IDirect3DRMFrame2

Retrieves the material of the Direct3DRMFrame2 object.

HRESULT GetMaterial(
  LPDIRECT3DRMMATERIAL *lplpMaterial
  );

Parameters
lplpMaterial
Address of a variable that will be filled with a pointer to the Direct3DRMMaterial object that is applied to the frame.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::SetMaterial


IDirect3DRMFrame2::GetMaterialMode

IDirect3DRMFrame2

Retrieves the material mode of the frame.

D3DRMMATERIALMODE GetMaterialMode( );

Return Values

Returns a member of the D3DRMMATERIALMODE enumerated type that specifies the current material mode.

See Also

IDirect3DRMFrame2::SetMaterialMode


IDirect3DRMFrame2::GetOrientation

IDirect3DRMFrame2

Retrieves the orientation of a frame relative to the given reference frame.

HRESULT GetOrientation(
  LPDIRECT3DRMFRAME lpRef,
  LPD3DVECTOR lprvDir,
  LPD3DVECTOR lprvUp
  );

Parameters
lpRef
Address of a variable that represents the Direct3DRMFrame object to be used as the reference.
lprvDir and lprvUp
Addresses of D3DVECTOR structures that will be filled with the normalized directions of the frame's z-axis and y-axis, respectively.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::SetOrientation


IDirect3DRMFrame2::GetParent

IDirect3DRMFrame2

Retrieves the parent frame of the current frame.

HRESULT GetParent(
  LPDIRECT3DRMRAME * lplpParent
  );

Parameters
lplpParent
Address of a pointer that will be filled with the pointer to the Direct3DRMFrame object representing the frame's parent. If the current frame is the root, this pointer will be NULL when the method returns.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::GetPosition

IDirect3DRMFrame2

Retrieves the position of a frame relative to the given reference frame, that is, it retrieves the distance of the frame from the reference. The distance is stored in the lprvPos parameter as a vector rather than as a linear measure.

HRESULT GetPosition(
  LPDIRECT3DRMFRAME lpRef,
  LPD3DVECTOR lprvPos
  );

Parameters
lpRef
Address of a variable that represents the Direct3DRMFrame object to be used as the reference.
lprvPos
Address of a D3DVECTOR structure that will be filled with the frame's position.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::SetPosition


IDirect3DRMFrame2::GetRotation

IDirect3DRMFrame2

Retrieves the rotation of the frame relative to the given reference frame.

HRESULT GetRotation(
  LPDIRECT3DRMFRAME lpRef,
  LPD3DVECTOR lprvAxis,
  LPD3DVALUE lprvTheta
  );

Parameters
lpRef
Address of a variable that represents the Direct3DRMFrame object to be used as the reference.
lprvAxis
Address of a D3DVECTOR structure that will be filled with the frame's axis of rotation.
lprvTheta
Address of a variable that will be the frame's rotation, in radians.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::SetRotation, Transformations


IDirect3DRMFrame2::GetScene

IDirect3DRMFrame2

Retrieves the root frame of the hierarchy containing the given frame.

HRESULT GetScene(
  LPDIRECT3DRMFRAME lplpRoot
  );

Parameters
lplpRoot
Address of the pointer that will be filled with the pointer to the Direct3DRMFrame object representing the scene's root frame.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::GetSceneBackground

IDirect3DRMFrame2

Retrieves the background color of a scene.

D3DCOLOR GetSceneBackground( );

Return Values

Returns the color.


IDirect3DRMFrame2::GetSceneBackgroundDepth

IDirect3DRMFrame2

Retrieves the current background-depth buffer for the scene.

HRESULT GetSceneBackgroundDepth(
  LPDIRECTDRAWSURFACE * lplpDDSurface
  );

Parameters
lplpDDSurface
Address of a pointer that will be initialized with the address of a DirectDraw surface representing the current background-depth buffer.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::SetSceneBackgroundDepth


IDirect3DRMFrame2::GetSceneFogColor

IDirect3DRMFrame2

Retrieves the fog color of a scene.

D3DCOLOR GetSceneFogColor( );

Return Values

Returns the fog color.


IDirect3DRMFrame2::GetSceneFogEnable

IDirect3DRMFrame2

Retrieves whether fog is currently enabled for this scene.

BOOL GetSceneFogEnable( );

Return Values

Returns TRUE if fog is enabled, and FALSE otherwise.


IDirect3DRMFrame2::GetSceneFogMode

IDirect3DRMFrame2

Retrieves the current fog mode for this scene.

D3DRMFOGMODE GetSceneFogMode( );

Return Values

Returns a member of the D3DRMFOGMODE enumerated type that specifies the current fog mode.


IDirect3DRMFrame2::GetSceneFogParams

IDirect3DRMFrame2

Retrieves the current fog parameters for this scene.

HRESULT GetSceneFogParams(
  D3DVALUE * lprvStart,
  D3DVALUE * lprvEnd,
  D3DVALUE * lprvDensity
  );

Parameters
lprvStart, lprvEnd, and lprvDensity
Addresses of variables that will be the fog start, end, and density values.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::GetSortMode

IDirect3DRMFrame2

Retrieves the sorting mode used to process child frames.

D3DRMSORTMODE GetSortMode( );

Return Values

Returns the member of the D3DRMSORTMODE enumerated type that specifies the sorting mode.

See Also

IDirect3DRMFrame2::SetSortMode


IDirect3DRMFrame2::GetTexture

IDirect3DRMFrame2

Retrieves the texture of the given frame.

HRESULT GetTexture(
  LPDIRECT3DRMTEXTURE* lplpTexture
  );

Parameters
lplpTexture
Address of the pointer that will be filled with the address of the Direct3DRMTexture object representing the frame's texture.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::SetTexture


IDirect3DRMFrame2::GetTextureTopology

IDirect3DRMFrame2

Retrieves the topological properties of a texture when mapped onto objects in the given frame.

HRESULT GetTextureTopology(
  BOOL * lpbWrap_u,
  BOOL * lpbWrap_v
  );

Parameters
lpbWrap_u and lpbWrap_v
Addresses of variables that are set to TRUE if the texture is mapped in the u- and v-directions, respectively.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::SetTextureTopology


IDirect3DRMFrame2::GetTransform

IDirect3DRMFrame2

Retrieves the local transformation of the frame as a 4×4 affine matrix.

HRESULT GetTransform(
  D3DRMMATRIX4D rmMatrix
  );

Parameters
rmMatrix
A D3DRMMATRIX4D array that will be filled with the frame's transformation. Because this is an array, this value is actually an address.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

3-D Transformations


IDirect3DRMFrame2::GetVelocity

IDirect3DRMFrame2

Retrieves the velocity of the frame relative to the given reference frame. Velocity is specified as units per tick. See IDirect3DRM::Tick for more information.

HRESULT GetVelocity(
  LPDIRECT3DRMFRAME lpRef,
  LPD3DVECTOR lprvVel,
  BOOL fRotVel
  );

Parameters
lpRef
Address of a variable that represents the Direct3DRMFrame object to be used as the reference.
lprvVel
Address of a D3DVECTOR structure that will be filled with the frame's velocity.
fRotVel
Flag specifying whether the rotational velocity of the object is taken into account when retrieving the linear velocity. If this parameter is TRUE, the object's rotational velocity is included in the calculation.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::SetVelocity


IDirect3DRMFrame2::GetVisuals

IDirect3DRMFrame2

Retrieves a list of visuals in the frame.

HRESULT GetVisuals(
  LPDIRECT3DRMVISUALARRAY* lplpVisuals
  );

Parameters
lplpVisuals
Address of a pointer to be initialized with a valid Direct3DRMVisualArray pointer if the call succeeds.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::GetZbufferMode

IDirect3DRMFrame2

Retrieves the z-buffer mode; that is, whether z-buffering is enabled or disabled.

D3DRMZBUFFERMODE GetZbufferMode( );

Return Values

Returns one of the members of the D3DRMZBUFFERMODE enumerated type.

See Also

IDirect3DRMFrame2::SetZbufferMode


IDirect3DRMFrame2::InverseTransform

IDirect3DRMFrame2

Transforms the vector in the lprvSrc parameter in world coordinates to model coordinates, and returns the result in the lprvDst parameter.

HRESULT InverseTransform(
  D3DVECTOR *lprvDst,
  D3DVECTOR *lprvSrc
  );

Parameters
lprvDst
Address of a D3DVECTOR structure that will be filled with the result of the transformation.
lprvSrc
Address of a D3DVECTOR structure that is the source of the transformation.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::Transform, 3-D Transformations


IDirect3DRMFrame2::Load

IDirect3DRMFrame2

Loads a Direct3DRMFrame2 object.

HRESULT Load(
  LPVOID lpvObjSource,
  LPVOID lpvObjID,
  D3DRMLOADOPTIONS d3drmLOFlags,
  D3DRMLOADTEXTURECALLBACK d3drmLoadTextureProc,
  LPVOID lpArgLTP
  );

Parameters
lpvObjSource
Source for the object to be loaded. This source can be a file, resource, memory block, or stream, depending on the source flags specified in the d3drmLOFlags parameter.
lpvObjID
Object name or position to be loaded. The use of this parameter depends on the identifier flags specified in the d3drmLOFlags parameter. If the D3DRMLOAD_BYPOSITION flag is specified, this parameter is a pointer to a DWORD value that gives the object's order in the file. This parameter can be NULL.
d3drmLOFlags
Value of the D3DRMLOADOPTIONS type describing the load options.
d3drmLoadTextureProc
A D3DRMLOADTEXTURECALLBACK callback function used to load any textures used by the object that require special formatting. This parameter can be NULL.
lpArgLTP
Address of application-defined data passed to the D3DRMLOADTEXTURECALLBACK callback function.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

By default, this method loads the first frame hierarchy in the file specified by the lpvObjSource parameter. The frame that uses this method is used as the parent of the new frame hierarchy.


IDirect3DRMFrame2::LookAt

IDirect3DRMFrame2

Faces the frame toward the target frame, relative to the given reference frame, locking the rotation by the given constraints.

HRESULT LookAt(
  LPDIRECT3DRMFRAME lpTarget,
  LPDIRECT3DRMFRAME lpRef,
  D3DRMFRAMECONSTRAINT rfcConstraint
  );

Parameters
lpTarget and lpRef
Addresses of variables that represent the Direct3DRMFrame objects to be used as the target and reference, respectively.
rfcConstraint
Member of the D3DRMFRAMECONSTRAINT enumerated type that specifies the axis of rotation to constrain.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::Move

IDirect3DRMFrame2

Applies the linear and rotational velocities for all frames in the given hierarchy.

HRESULT Move(
  D3DVALUE delta
  );

Parameters
delta
Amount to change the linear and rotational velocity. The change in each component is equal to the velocity of that component multiplied by delta. Although either or both of these velocities can be set relative to any frame, the system automatically converts them to velocities relative to the parent frame for the purpose of applying time deltas.

Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::RayPick

IDirect3DRMFrame2

Searches the hierarchy starting at this Direct3DRMFrame2 object and calculates the intersections between any visuals and the ray specified by the dvPosition and dvDirection parameters in the coordinate space specified by the lpRefFrame parameter.

HRESULT RayPick(
  LPDIRECT3DRMFRAME lpRefFrame,
  LPD3DRMRAY ray,
  DWORD dwFlags,
  LPD3DRMPICKED2ARRAY* lplpPicked2Array
  );

Parameters
lpRefFrame
Address of the Direct3DRMFrame object that contains the ray.
ray
Pointer to a D3DRMRAY structure that contains two D3DVECTOR structures. The first D3DVECTOR structure is the vector direction of the ray. The second D3DVECTOR structure is the position of the origin of the ray.
dwFlags
Can be one of the following values:
D3DRMRAYPICK_ONLYBOUNDINGBOXES – Only intersections with bounding boxes of the visuals in the hierarchy are returned. Does not check for exact face intersections.
D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES – Only the closest visual that intersects the ray is returned. Ignores visuals farther away than the closest one found so far in a search.
D3DRMRAYPICK_INTERPOLATEUV – Interpolate texture coordinates.
D3DRMRAYPICK_INTERPOLATECOLOR – Interpolate color.
D3DRMRAYPICK_INTERPOLATENORMAL – Interpolate normal.
lplpPicked2Array
The address of a pointer to be initialized with a valid pointer to the IDirect3DRMPicked2Array interface. You then use the IDirect3DRMPicked2Array::GetPick method to retrieve a visual object, an IDirect3DRMFrameArray interface, and a D3DRMPICKDESC2 structure. The array of frames is the path through the hierarchy leading to the visual object that intersected the ray. The D3DRMPICKDESC2 structure contains the face and group identifiers, pick position, horizontal and vertical texture coordinates for the vertex, vertex normal, and color of the intersected objects.

If you specify D3DRMRAYPICK_ONLYBOUNDINGBOXES, the texture, normal, and color data in the D3DRMPICKDESC2 structure will be invalid.

Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

There are two kinds of flags: optimization flags and interpolation flags. Optimization flags allow you to limit the search and therefore make it faster. Interpolation flags specify what to interpolate if a primitive is hit. The three interpolation choices are color, normal, and texture coordinates.

The ray is specified in the reference frame coordinate space (pointed to by lpRefFrame). If the reference frame is NULL, the ray is specified in world coordinates.


IDirect3DRMFrame2::Save

IDirect3DRMFrame2

Saves a Direct3DRMFrame2 object to the specified file.

HRESULT Save(
  LPCSTR lpFilename,
  D3DRMXOFFORMAT d3dFormat,
  D3DRMSAVEOPTIONS d3dSaveFlags
  );

Parameters
lpFilename
Address specifying the name of the created file. This file must have a .x file name extension.
d3dFormat
D3DRMXOF_TEXT value from the D3DRMXOFFORMAT enumerated type.
d3dSaveFlags
Value of the D3DRMSAVEOPTIONS type describing the save options.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::SetAxes

IDirect3DRMFrame2

Sets the vectors that define a coordinate space by which the IDirect3DRMFrame2::SetOrientation vectors are transformed.

HRESULT SetAxes(
  D3DVALUE dx,
  D3DVALUE dy,
  D3DVALUE dz,
  D3DVALUE ux,
  D3DVALUE uy,
  D3DVALUE uz
  );

Parameters
dx, dy, dz
The z-axis for the frame. Default is (0,0,1).
ux, uy, uz
The y-axis for the frame. Default is (0,1,0).
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method helps support both left-handed and right-handed coordinate systems. This method also allows you to specify that the negative z-axis represents the front of the object.

The IDirect3DRMFrame2::SetOrientation direction (rvDx, rvDy, rvDz) and up (rvUx, rvUy, rvUz) vectors are transformed according to the value of the SetAxes vectors.

The axes are inherited by child frames as specified in IDirect3DRMFrame2::SetInheritAxes.

See Also

IDirect3DRMFrame2::GetAxes, IDirect3DRMFrame2::GetInheritAxes, IDirect3DRMFrame2::SetInheritAxes


IDirect3DRMFrame2::SetBox

IDirect3DRMFrame2

Sets the box to be used in bounding-box testing. In order for the bounding box to be valid, its minimum x must be less than or equal to its maximum x, minimum y must be less than or equal to its maximum y, and minimum z must be less than or equal to its maximum z.

HRESULT SetBox(
  D3DRMBOX * lpD3DRMBox
  );

Parameters
lpD3DRMBox
Address of a D3DRMBOX structure that contains the bounding-box coordinates.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method supports a bounding box on a frame for hierarchical culling. For a bounding box to be enabled, the IDirect3DRMFrame2::SetBoxEnable method must be used to set the enable flag to TRUE. By default, the box-enable flag is FALSE.

See Also

IDirect3DRMFrame2::GetBox, IDirect3DRMFrame2::SetBoxEnable, IDirect3DRMFrame2::GetBoxEnable


IDirect3DRMFrame2::SetBoxEnable

IDirect3DRMFrame2

Enables or disables bounding-box testing for this Direct3DRMFrame2 object. Bounding-box testing cannot be enabled unless a valid bounding box has already been set on the frame.

HRESULT SetBoxEnable(
  BOOL bEnableFlag
  );

Parameters
bEnableFlag
Flag specifying whether bounding boxes are enabled or not. TRUE to enable a bounding box. FALSE if a bounding box is not enabled. Default is FALSE.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

For a bounding box to be enabled, this method must be used to set the enable flag to TRUE. By default, the box-enable flag is FALSE.

Bounding-box testing is performed as follows: At render time, the bounding box is transformed into model space and checked for intersection with the viewing frustum. If the entire box is outside of the viewing frustum, none of the visuals in the frame, or in any child frame, are rendered. Otherwise, rendering continues as normal.

Enabling bounding-box testing with a box of {0,0,0,0} completely prevents a frame from being rendered.

See Also

IDirect3DRMFrame2::GetBoxEnable, IDirect3DRMFrame2::GetBox, IDirect3DRMFrame2::SetBox


IDirect3DRMFrame2::SetColor

IDirect3DRMFrame2

Sets the color of the frame. This color is used for meshes in the frame when the D3DRMMATERIALMODE enumerated type is D3DRMMATERIAL_FROMFRAME.

HRESULT SetColor(
  D3DCOLOR rcColor
  );

Parameters
rcColor
New color for the frame.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method is also used to add a color key to a DIRECT3DRMFRAMEINTERPOLATOR object.

See Also

IDirect3DRMFrame2::GetColor, IDirect3DRMFrame2::SetMaterialMode


IDirect3DRMFrame2::SetColorRGB

IDirect3DRMFrame2

Sets the color of the frame. This color is used for meshes in the frame when the D3DRMMATERIALMODE enumerated type is D3DRMMATERIAL_FROMFRAME.

HRESULT SetColorRGB(
  D3DVALUE rvRed,
  D3DVALUE rvGreen,
  D3DVALUE rvBlue
  );

Parameters
rvRed, rvGreen, and rvBlue
New color for the frame. Each component of the color should be in the range 0 to 1.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method is also used to add an RGB color key to a DIRECT3DRMFRAMEINTERPOLATOR object.

See Also

IDirect3DRMFrame2::SetMaterialMode


IDirect3DRMFrame2::SetInheritAxes

IDirect3DRMFrame2

Specifies whether the axes for the frame are inherited from the parent frame.

HRESULT SetInheritAxes(
  BOOL inherit_from_parent
  );

Parameters
inherit_from_parent
Flag indicating whether the frame should inherit axes from its parent. If TRUE, the frame inherits axes (the default). If FALSE, the frame does not inherit axes.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

By default, the axes are inherited from the parent. If a frame is set to inherit from the parent, and there is no parent, the frame acts as if it inherits from a parent with the default axes (direction=(0,0,1) and up=(0,1,0)). This method allows a single policy for axes to be set at the root of the hierarchy.

See Also

IDirect3DRMFrame2::GetInheritAxes, IDirect3DRMFrame2::GetAxes, IDirect3DRMFrame2::SetAxes


IDirect3DRMFrame2::SetMaterial

IDirect3DRMFrame2

Sets the material of the Direct3DRMFrame2 object.

HRESULT SetMaterial(
  LPDIRECT3DRMMATERIAL *lplpMaterial
  );

Parameters
lplpMaterial
Address of the Direct3DRMMaterial object that will be applied to the frame.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::GetMaterial


IDirect3DRMFrame2::SetMaterialMode

IDirect3DRMFrame2

Sets the material mode for a frame. The material mode determines the source of material information for visuals rendered with the frame.

HRESULT SetMaterialMode(
  D3DRMMATERIALMODE rmmMode
  );

Parameters
rmmMode
One of the members of the D3DRMMATERIALMODE enumerated type.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::GetMaterialMode


IDirect3DRMFrame2::SetOrientation

IDirect3DRMFrame2

Aligns a frame so that its z-direction points along the direction vector [rvDx, rvDy, rvDz] and its y-direction aligns with the vector [rvUx, rvUy, rvUz].

HRESULT SetOrientation(
  LPDIRECT3DRMFRAME lpRef,
  D3DVALUE rvDx,
  D3DVALUE rvDy,
  D3DVALUE rvDz,
  D3DVALUE rvUx,
  D3DVALUE rvUy,
  D3DVALUE rvUz
  );

Parameters
lpRef
Address of a variable that represents the Direct3DRMFrame object to be used as the reference.
rvDx, rvDy, and rvDz
New z-axis for the frame.
rvUx, rvUy, and rvUz
New y-axis for the frame.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

The default orientation of a frame has a direction vector of [0, 0, 1] and an up vector of [0, 1, 0].

If [rvUx, rvUy, rvUz] is parallel to [rvDx, rvDy, rvDz], the D3DRMERR_BADVALUE error value is returned; otherwise, the [rvUx, rvUy, rvUz] vector passed is projected onto the plane that is perpendicular to [rvDx, rvDy, rvDz].

This method is also used to add an orientation key to a Direct3DRMFrameInterpolator object.

See Also

IDirect3DRMFrame2::GetOrientation


IDirect3DRMFrame2::SetPosition

IDirect3DRMFrame2

Sets the position of a frame relative to the frame of reference. It places the frame a distance of [rvX, rvY, rvZ] from the reference. When a child frame is created within a parent, it is placed at [0, 0, 0] in the parent frame.

HRESULT SetPosition(
  LPDIRECT3DRMFRAME lpRef,
  D3DVALUE rvX,
  D3DVALUE rvY,
  D3DVALUE rvZ
  );

Parameters
lpRef
Address of a variable that represents the Direct3DRMFrame object to be used as the reference.
rvX, rvY, and rvZ
New position for the frame.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method is also used to add a position key to a Direct3DRMFrameInterpolator object.

See Also

IDirect3DRMFrame2::GetPosition


IDirect3DRMFrame2::SetQuaternion

IDirect3DRMFrame2

Sets a frame's orientation relative to a reference frame using a unit quaternion.

HRESULT SetQuaternion(
  LPDIRECT3DRMFRAME2 lpRef,
  D3DRMQUATERNION *quat
  )

Parameters
lpRef
Address of a variable that represents the Direct3DRMFrame2 object to be used as the reference.
quat
A D3DRMQUATERNION structure that holds the unit quaternion.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

A quaternion is a four-valued vector that can be used to represent any rotation and that has properties that are useful when interpolating between orientations. A quaternion is a unit quaternion if s**2 + x**2 + y**2 + z**2 = 1.

The function D3DRMQuaternionFromRotation can be used to generate unit quaternions from arbitrary rotation values.

The SetQuaternion method is supported by FrameInterpolators. See IDirect3DRMInterpolator Interface for more information about interpolators.


IDirect3DRMFrame2::SetRotation

IDirect3DRMFrame2

Sets a frame rotating by the given angle around the given vector at each call to the IDirect3DRM::Tick or IDirect3DRMFrame2::Move method. The direction vector [rvX, rvY, rvZ] is defined in the reference frame.

HRESULT SetRotation(
  LPDIRECT3DRMFRAME lpRef,
  D3DVALUE rvX,
  D3DVALUE rvY,
  D3DVALUE rvZ,
  D3DVALUE rvTheta
  );

Parameters
lpRef
Address of a variable that represents the Direct3DRMFrame object to be used as the reference.
rvX, rvY, and rvZ
Vector about which rotation occurs.
rvTheta
Rotation angle, in radians.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

The specified rotation changes the matrix with every render tick, unlike the IDirect3DRMFrame2::AddRotation method, which changes the objects in the frame only once.

See Also

IDirect3DRMFrame2::AddRotation, IDirect3DRMFrame2::GetRotation


IDirect3DRMFrame2::SetSceneBackground

IDirect3DRMFrame2

Sets the background color of a scene.

HRESULT SetSceneBackground(
  D3DCOLOR rcColor
  );

Parameters
rcColor
New color for the background.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method is also used to add a background color key to a Direct3DRMFrameInterpolator object.


IDirect3DRMFrame2::SetSceneBackgroundDepth

IDirect3DRMFrame2

Specifies a background-depth buffer for a scene.

HRESULT SetSceneBackgroundDepth(
  LPDIRECTDRAWSURFACE lpImage
  );

Parameters
lpImage
Address of a DirectDraw surface that will store the new background depth for the scene.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

The image must have a depth of 16 bits per pixel. If the image and viewport sizes are different, the image is scaled first. For best performance when animating the background-depth buffer, the image should be the same size as the viewport. This enables the depth buffer to be updated directly from the image memory without incurring extra overhead.

See Also

IDirect3DRMFrame2::GetSceneBackgroundDepth


IDirect3DRMFrame2::SetSceneBackgroundImage

IDirect3DRMFrame2

Specifies a background image for a scene.

HRESULT SetSceneBackgroundImage(
  LPDIRECT3DRMTEXTURE lpTexture
  );

Parameters
lpTexture
Address of a Direct3DRMTexture object that will contain the new background scene.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

If the image is a different size or color depth than the viewport, the image will first be scaled or converted to the correct depth. For best performance when animating the background, the image should be the same size and color depth. This enables the background to be rendered directly from the image memory without incurring any extra overhead.


IDirect3DRMFrame2::SetSceneBackgroundRGB

IDirect3DRMFrame2

Sets the background color of a scene.

HRESULT SetSceneBackgroundRGB(
  D3DVALUE rvRed,
  D3DVALUE rvGreen,
  D3DVALUE rvBlue
  );

Parameters
rvRed, rvGreen, and rvBlue
New color for the background.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method is also used to add a background RGB color key to a Direct3DRMFrameInterpolator object.


IDirect3DRMFrame2::SetSceneFogColor

IDirect3DRMFrame2

Sets the fog color of a scene.

HRESULT SetSceneFogColor(
  D3DCOLOR rcColor
  );

Parameters
rcColor
New color for the fog.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method is also used to add a fog color key to a Direct3DRMRFrameInterpolator object.


IDirect3DRMFrame2::SetSceneFogEnable

IDirect3DRMFrame2

Sets the fog-enable state.

HRESULT SetSceneFogEnable(
  BOOL bEnable
  );

Parameters
bEnable
New fog-enable state.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMFrame2::SetSceneFogMode

IDirect3DRMFrame2

Sets the fog mode.

HRESULT SetSceneFogMode(
  D3DRMFOGMODE rfMode
  );

Parameters
rfMode
One of the members of the D3DRMFOGMODE enumerated type, specifying the new fog mode.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::SetSceneFogParams


IDirect3DRMFrame2::SetSceneFogParams

IDirect3DRMFrame2

Sets the current fog parameters for this scene.

HRESULT SetSceneFogParams(
  D3DVALUE rvStart,
  D3DVALUE rvEnd,
  D3DVALUE rvDensity
  );

Parameters
rvStart and rvEnd
Fog start and end points for linear fog mode. These settings determine the distance from the camera at which fog effects first become visible, and the distance at which fog reaches its maximum density.
rvDensity
Fog density for the exponential fog modes. This value should be in the range 0 through 1.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

This method is also used to add a fog parameters key to a Direct3DRMRFrameInterpolator object.

See Also

D3DRMFOGMODE, IDirect3DRMFrame2::SetSceneFogMode


IDirect3DRMFrame2::SetSortMode

IDirect3DRMFrame2

Sets the sorting mode used to process child frames. You can use this method to change the properties of hidden-surface-removal algorithms.

HRESULT SetSortMode(
  D3DRMSORTMODE d3drmSM
  );

Parameters
d3drmSM
One of the members of the D3DRMSORTMODE enumerated type, specifying the sorting mode. The default value is D3DRMSORT_FROMPARENT.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::GetSortMode


IDirect3DRMFrame2::SetTexture

IDirect3DRMFrame2

Sets the texture of the frame.

HRESULT SetTexture(
  LPDIRECT3DRMTEXTURE lpD3DRMTexture
  );

Parameters
lpD3DRMTexture
Address of a variable that represents the Direct3DRMTexture object to be used.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

Remarks

The texture is used for meshes in the frame when the D3DRMMATERIALMODE enumerated type is D3DRMMATERIAL_FROMFRAME. To disable the frame's texture, use a NULL texture.

See Also

IDirect3DRMFrame2::GetTexture, IDirect3DRMFrame2::SetMaterialMode


IDirect3DRMFrame2::SetTextureTopology

IDirect3DRMFrame2

Defines the topological properties of the texture coordinates across objects in the frame.

HRESULT SetTextureTopology(
  BOOL bWrap_u,
  BOOL bWrap_v
  );

Parameters
bWrap_u and bWrap_v
Variables that are set to TRUE to map the texture in the u- and v-directions, respectively.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::GetTextureTopology


IDirect3DRMFrame2::SetVelocity

IDirect3DRMFrame2

Sets the velocity of the given frame relative to the reference frame. The frame will be moved by the vector [rvX, rvY, rvZ] with respect to the reference frame at each successive call to the IDirect3DRM::Tick or IDirect3DRMFrame2::Move method.

HRESULT SetVelocity(
  LPDIRECT3DRMFRAME lpRef,
  D3DVALUE rvX,
  D3DVALUE rvY,
  D3DVALUE rvZ,
  BOOL fRotVel
  );

Parameters
lpRef
Address of a variable that represents the Direct3DRMFrame object to be used as the reference.
rvX, rvY, and rvZ
New velocity for the frame.
fRotVel
Flag specifying whether the rotational velocity of the object is taken into account when setting the linear velocity. If TRUE, the object's rotational velocity is included in the calculation.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::GetVelocity


IDirect3DRMFrame2::SetZbufferMode

IDirect3DRMFrame2

Sets the z-buffer mode; that is, whether z-buffering is enabled or disabled.

HRESULT SetZbufferMode(
  D3DRMZBUFFERMODE d3drmZBM
  );

Parameters
d3drmZBM
One of the members of the D3DRMZBUFFERMODE enumerated type, specifying the z-buffer mode. The default value is D3DRMZBUFFER_FROMPARENT.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::GetZbufferMode


IDirect3DRMFrame2::Transform

IDirect3DRMFrame2

Transforms the vector in the lpd3dVSrc parameter in model coordinates to world coordinates, returning the result in the lpd3dVDst parameter.

HRESULT Transform(
  D3DVECTOR *lpd3dVDst,
  D3DVECTOR *lpd3dVSrc
  );

Parameters
lpd3dVDst
Address of a D3DVECTOR structure that will be filled with the result of the transformation operation.
lpd3dVSrc
Address of a D3DVECTOR structure that is the source of the transformation operation.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMFrame2::InverseTransform, 3-D Transformations

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

*Top of Page