Index Topic Contents | |||
Previous Topic: IDirect3DRM2 Next Topic: IDirect3DRMAnimationSet |
IDirect3DRMAnimation
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.
IDirect3DRMAnimation
IDirect3DRMAnimation::AddPositionKey
Adds a position key to the animation.
HRESULT AddPositionKey(
D3DVALUE rvTime,
D3DVALUE rvX,
D3DVALUE rvY,
D3DVALUE rvZ
);Parameters
- rvTime
- Time in the animation to store the position key. The time units are arbitrary and zero-based; a key whose rvTime value is 49 occurs exactly in the middle of an animation whose last key has an rvTime value of 99.
- rvX, rvY, and rvZ
- Position.
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 transformation applied by this method is a translation. For information about the matrix mathematics involved in transformations, see 3-D Transformations.
See Also
IDirect3DRMAnimation::DeleteKey
IDirect3DRMAnimation
IDirect3DRMAnimation::AddRotateKey
Adds a rotate key to the animation.
HRESULT AddRotateKey(
D3DVALUE rvTime,
D3DRMQUATERNION *rqQuat
);Parameters
- rvTime
- Time in the animation to store the rotate key. The time units are arbitrary and zero-based; a key whose rvTime value is 49 occurs exactly in the middle of an animation whose last key has an rvTime value of 99.
- rqQuat
- Quaternion representing the rotation.
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 applies a rotation transformation. For information about the matrix mathematics involved in transformations, see 3-D Transformations.
See Also
IDirect3DRMAnimation::DeleteKey
IDirect3DRMAnimation
IDirect3DRMAnimation::AddScaleKey
Adds a scale key to the animation.
HRESULT AddScaleKey(
D3DVALUE rvTime,
D3DVALUE rvX,
D3DVALUE rvY,
D3DVALUE rvZ
);Parameters
- rvTime
- Time in the animation to store the scale key. The time units are arbitrary and zero-based; a key whose rvTime value is 49 occurs exactly in the middle of an animation whose last key has an rvTime value of 99.
- rvX, rvY, and rvZ
- Scale factor.
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 applies a scaling transformation. For information about the matrix mathematics involved in transformations, see 3-D Transformations.
See Also
IDirect3DRMAnimation::DeleteKey
IDirect3DRMAnimation
IDirect3DRMAnimation::DeleteKeyRemoves a key from an animation.
HRESULT DeleteKey(
D3DVALUE rvTime
);Parameters
- rvTime
- Time identifying the key that will be removed from the animation.
Return Values
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
IDirect3DRMAnimation
IDirect3DRMAnimation::GetOptionsRetrieves animation options.
D3DRMANIMATIONOPTIONS GetOptions( );
Return Values
Returns the value of the D3DRMANIMATIONOPTIONS type describing the animation options.
See Also
IDirect3DRMAnimation::SetOptions
IDirect3DRMAnimation
IDirect3DRMAnimation::SetFrame
Sets the frame for the animation.
HRESULT SetFrame(
LPDIRECT3DRMFRAME lpD3DRMFrame
);Parameters
- lpD3DRMFrame
- Address of a variable representing the frame to set for the animation.
Return Values
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
IDirect3DRMAnimation
IDirect3DRMAnimation::SetOptionsSets the animation options.
HRESULT SetOptions(
D3DRMANIMATIONOPTIONS d3drmanimFlags
);Parameters
- d3drmanimFlags
- Value of the D3DRMANIMATIONOPTIONS type describing the animation options.
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
IDirect3DRMAnimation::GetOptions
IDirect3DRMAnimation
IDirect3DRMAnimation::SetTime
Sets the current time for this animation.
HRESULT SetTime(
D3DVALUE rvTime
);Parameters
- rvTime
- New current time for the animation. The time units are arbitrary and zero-based; a key whose rvTime value is 49 occurs exactly in the middle of an animation whose last key has an rvTime value of 99.
Return Values
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.