Direct3DRMAnimationSet2

A Direct3DRMAnimationSet2 object enables you to group Direct3DRMAnimation2 objects. This enables all the animations in an animation set to share the same time parameter, simplifying the playback of complex articulated animation sequences. An application can add an animation to an animation set by using the Direct3DRMAnimationSet2.AddAnimation method, and can remove one by using the Direct3DRMAnimationSet2.DeleteAnimation method. Animation sets are driven by calling the Direct3DRMAnimationSet2.SetTime method.

The methods of the Direct3DRMAnimationSet2 interface can be organized into the following groups.

Adding, removing, retrieving, and loading AddAnimation
DeleteAnimation
GetAnimations
LoadFromFile
Time SetTime

The Direct3DRMAnimationSet2 interface inherits the following methods from the Direct3DRMObject interface.

AddDestroyCallback
CloneObject
DeleteDestroyCallback
GetAppData
GetClassName
GetName
SetAppData
SetName

The Direct3DRMAnimationSet2 object is obtained by calling the Direct3DRM3.CreateAnimationSet method.

Direct3DRMAnimationSet2.AddAnimation

Direct3DRMAnimationSet2

Adds an animation to the animation set.

Syntax

object.AddAnimation(aid As Direct3DRMAnimation2)

Parts

object
Object expression that resolves to a Direct3DRMAnimationSet2 object.
aid
Direct3DRMAnimation2 object to be added to the animation set.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRMAnimationSet2.DeleteAnimation

Direct3DRMAnimationSet2

Removes a previously added animation from the animation set.

Syntax

object.DeleteAnimation(aid As Direct3DRMAnimation2)

Parts

object
Object expression that resolves to a Direct3DRMAnimationSet2 object.
aid
Direct3DRMAnimation2 object to be removed from the animation set.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRMAnimationSet2.GetAnimations

Direct3DRMAnimationSet2

Retrieves an array containing the animations in the animation set.

Syntax

object.GetAnimations( ) As Direct3DRMAnimationArray

Parts

object
Object expression that resolves to a Direct3DRMAnimationSet2 object.

Return Value

Returns a Direct3DRMAnimationArray interface providing access to the animations in the animation set.

Error Values

For a list of possible errors, see Direct3D Retained Mode Error Values.

Direct3DRMAnimationSet2.LoadFromFile

Direct3DRMAnimationSet2

Loads an animation set.

Syntax

object.LoadFromFile(filename As String,
  id As String,
  options As CONST_D3DRMLOADFLAGS,
  loadTextureImplementation As Direct3DRMLoadTextureCallback3,
  userArgument As object,
  parentFrame As Direct3DRMFrame3)

Parts

object
Object expression that resolves to a Direct3DRMAnimationSet2 object.
filename
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 flags parameter.
id
Object name or position to be loaded. If id is "", you must set the options parameter to D3DRMLOAD_FIRST. Note that Microsoft Visual Basic® will accept an Integer in the id parameter, indicating the position of the item to be loaded, even though a String data type is specified. For example, placing 1 in the id parameter will load the object in the first position.
options
One or more values from the CONST_D3DRMLOADFLAGS enumerated type describing the load options.
loadTextureImplementation
Direct3DRMLoadTextureCallback3 interface used to load any textures used by the object that require special formatting. Textures must have a width and length divisible by 2. This parameter can be NOTHING.
userArgument
Application-defined data passed to the Direct3DRMLoadTextureCallback3 interface.
parentFrame
Parent Direct3DRMFrame object. This parameter affects only the loading of animation sets. When an animation that is loaded from an .x file references an unparented frame in the .x file, the frame's parent is set to this parent frame argument. However, if you use LoadFromFile to load any frames in the .x file, the parent frame argument will not be used as the parent frame for frames in the .x file with no parent. That is, the parent frame argument is used only when you load animation sets. The value of this argument can be NOTHING.

Error Values

For a list of possible error codes, see Direct3D Retained Mode Error Values.

Remarks

By default, this method loads the first animation set in the file specified by the filename parameter. By default, perspective correction is on.

Direct3DRMAnimationSet2.SetTime

Direct3DRMAnimationSet2

Sets the time for this animation set.

Syntax

object.SetTime(time As Single)

Parts

object
Object expression that resolves to a Direct3DRMAnimationSet2 object.
time
New time.

Error Values

For a list of possible error codes, see Direct3D Retained Mode Error Values.


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