Applications use the methods of the IDirect3DRMAnimation interface to animate the position, orientation, and scaling of visuals, lights, and viewports. This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMAnimation and IDirect3DRMAnimationSet Interfaces.
The methods of the IDirect3DRMAnimation interface can be organized into the following groups:
| Keys | AddPositionKey |
| AddRotateKey | |
| AddScaleKey | |
| DeleteKey | |
| Miscellaneous | SetFrame |
| SetTime | |
| Options | GetOptions |
| SetOptions |
The IDirect3DRMAnimation 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 IDirect3DRMAnimation interface inherits the following methods from the IDirect3DRMObject interface:
| AddDestroyCallback |
| Clone |
| DeleteDestroyCallback |
| GetAppData |
| GetClassName |
| GetName |
| SetAppData |
| SetName |
The Direct3DRMAnimation object is obtained by calling the IDirect3DRM::CreateAnimation method.
Adds a position key to the animation.
HRESULT AddPositionKey(
D3DVALUE rvTime,
D3DVALUE rvX,
D3DVALUE rvY,
D3DVALUE rvZ
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
The transformation applied by this method is a translation. For information about the matrix mathematics involved in transformations, see 3-D Transformations.
IDirect3DRMAnimation::DeleteKey
Adds a rotate key to the animation.
HRESULT AddRotateKey(
D3DVALUE rvTime,
D3DRMQUATERNION *rqQuat
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
This method applies a rotation transformation. For information about the matrix mathematics involved in transformations, see 3-D Transformations.
IDirect3DRMAnimation::DeleteKey
Adds a scale key to the animation.
HRESULT AddScaleKey(
D3DVALUE rvTime,
D3DVALUE rvX,
D3DVALUE rvY,
D3DVALUE rvZ
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
This method applies a scaling transformation. For information about the matrix mathematics involved in transformations, see 3-D Transformations.
IDirect3DRMAnimation::DeleteKey
Removes a key from an animation.
HRESULT DeleteKey(
D3DVALUE rvTime
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Retrieves animation options.
D3DRMANIMATIONOPTIONS GetOptions( );
Returns the value of the D3DRMANIMATIONOPTIONS type describing the animation options.
IDirect3DRMAnimation::SetOptions
Sets the frame for the animation.
HRESULT SetFrame(
LPDIRECT3DRMFRAME lpD3DRMFrame
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Sets the animation options.
HRESULT SetOptions(
D3DRMANIMATIONOPTIONS d3drmanimFlags
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
IDirect3DRMAnimation::GetOptions
Sets the current time for this animation.
HRESULT SetTime(
D3DVALUE rvTime
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.