Package com.ms.com.directX Previous
Previous
Microsoft Packages
Microsoft Packages
Index
Index
Next
Next

Class d3drmAnimation

Applications use the methods of the d3drmAnimation class to animate the position, orientation, and scaling of visuals, lights, and viewports.

public class d3drmAnimation implements Id3drmAnimation
{
  public void InternalSetObject(IUnknown lpdd);
  public IUnknown InternalGetObject();
  public void AddDestroyCallback(Id3drmCallback fn, IUnknown Arg);
  public void DeleteDestroyCallback(Id3drmCallback fn, IUnknown args);
  public d3drmAnimation Clone();
  public void SetAppData(int data);
  public int GetAppData();
  public void SetName(String name);
  public String GetName();
  public String GetClassName();
  public void SetOptions(int flags);
  public void AddRotateKey(float time, d3drmQuaternion q);
  public void AddPositionKey(float time, float x, float y, float z);
  public void AddScaleKey(float time, float x, float y, float z);
  public void DeleteKey(float time);
  public void SetFrame(d3drmFrame frame);
  public void SetTime(float time);
  public int GetOptions();
}

The methods can be organized into the following groups:
Keys AddPositionKey
AddRotateKey
AddScaleKey
DeleteKey
Miscellaneous SetFrame
SetTime
Options GetOptions
SetOptions

In addition, the d3drmAnimation class inherits the following methods from the d3drmObject class:
AddDestroyCallback
Clone
DeleteDestroyCallback
GetAppData
GetClassName
GetName
SetAppData
SetName

AddPositionKey

public void AddPositionKey(float time, float x, float y, float z);

Adds a position key to the animation.

Return Value:

No return value.

ParameterDescription
time Time in the animation to store the position key. The time units are arbitrary and zero-based; a key whose time value is 49 occurs exactly in the middle of an animation whose last key has an time value of 99.
x, y, and z Position.

Remarks:

The transformation applied by this method is a translation.

See Also: DeleteKey


AddRotateKey

public void AddRotateKey(float time, d3drmQuaternion q);

Adds a rotate key to the animation.

Return Value:

No return value.

ParameterDescription
time Time in the animation to store the rotate key. The time units are arbitrary and zero-based; a key whose time value is 49 occurs exactly in the middle of an animation whose last key has an time value of 99.
q Quaternion representing the rotation.

Remarks:

This method applies a rotation transformation.

See Also: DeleteKey


AddScaleKey

public void AddScaleKey(float time, float x, float y, float z);

Adds a scale key to the animation.

Return Value:

No return value.

ParameterDescription
time Time in the animation to store the scale key. The time units are arbitrary and zero-based; a key whose time value is 49 occurs exactly in the middle of an animation whose last key has an time value of 99.
x, y, and z Scale factor.

Remarks:

This method applies a scaling transformation.

See Also: DeleteKey


DeleteKey

public void DeleteKey(float time);

Removes a key from an animation.

Return Value:

No return value.

ParameterDescription
time Time identifying the key that will be removed from the animation.


GetOptions

public int GetOptions();

Retrieves animation options.

Return Value:

Returns the value of animation option type describing the animation options.

See Also: SetOptions


SetFrame

public void SetFrame(d3drmFrame frame);

Sets the frame for the animation.

Return Value:

No return value.

ParameterDescription
frame The d3drmFrame object to set for the animation.


SetOptions

public void SetOptions(int flags);

Sets the animation options.

Return Value:

No return value.

ParameterDescription
flags Value of animation option type describing the animation options.

See Also: GetOptions


SetTime

public void SetTime(float time);

Sets the current time for this animation.

Return Value:

No return value.

ParameterDescription
time New current time for the animation. The time units are arbitrary and zero-based; a key whose time value is 49 occurs exactly in the middle of an animation whose last key has an time value of 99.



Top© 1996 Microsoft Corporation. All rights reserved.