Direct3DRMMeshInterpolator

Interpolators provide a way of storing actions and applying them to objects with automatic calculation of in-between values. With an interpolator you can blend colors, move objects smoothly between positions, morph meshes, and perform many other transformations.

A Direct3DRMMesh object can be attached to a Direct3DRMMeshInterpolator object. For more information on interpolators, see Interpolators in Further Reading.

The Direct3DRMMeshInterpolator interface contains the following methods.

Attaching objects AttachObject
DetachObject
GetAttachedObjects
Color SetGroupColor
SetGroupColorRGB
Interpolating GetIndex
Interpolate
SetIndex
Miscellaneous Translate
Vertex positions SetVertices

In addition, Direct3DRMMeshInterpolator inherits the following methods from the Direct3DRMObject interface.

Direct3DRMMeshInterpolator.AttachObject

Direct3DRMMeshInterpolator

Connects an object to the interpolator.

Syntax

object.AttachObject(mObject As Direct3DRMObject)

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.
mObject
Direct3DRMObject object to attach to the interpolator.

Error Values

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

Remarks

The attached object can be another interpolator or an object of type x where the interpolator is of type xInterpolator. For example, a Direct3DRMMesh object can be attached to a Direct3DRMMeshInterpolator object.

Direct3DRMMeshInterpolator.DetachObject

Direct3DRMMeshInterpolator

Detaches an object from the interpolator.

Syntax

object.DetachObject(mObject As Direct3DRMObject)

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.
mObject
Direct3DRMObject object to detach from the interpolator.

Error Values

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

Direct3DRMMeshInterpolator.GetAttachedObjects

Direct3DRMMeshInterpolator

Retrieves the objects currently attached to the interpolator.

Syntax

object.GetAttachedObjects( ) As Direct3DRMObjectArray

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.

Return Value

Returns a Direct3DRMObjectArray object.

Error Values

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

Direct3DRMMeshInterpolator.GetIndex

Direct3DRMMeshInterpolator

Retrieves the interpolator's current internal index (time).

Syntax

object.GetIndex( ) As Single

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.

Return Value

Returns a value that contains the interpolator's current internal index.

Error Values

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

Remarks

Every key stored in an interpolator has an index value. When a key is recorded (by using a method), the key is stamped with the current interpolator index value. The key's index value does not change after being stamped.

Direct3DRMMeshInterpolator.Interpolate

Direct3DRMMeshInterpolator

Generates a series of actions by interpolating between keys stored in the interpolator. The actions are then applied to the specified object. If no object is specified, the actions are applied to the currently attached objects.

Syntax

object.Interpolate(val As Single,
  mObject As Direct3DRMObject,
  options As CONST_D3DRMINTERPOLATIONFLAGS)

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.
val
Value that contains the interpolator's current internal index.
mObject
Direct3DRMObject object that will be assigned interpolated values for all properties stored in the interpolator. Can be NOTHING, in which case the property values of all attached objects will be set to interpolated values.
options
One of the values from the CONST_D3DRMINTERPOLATIONFLAGS enumerated type that controls the kind of interpolation done.

Error Values

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

Direct3DRMMeshInterpolator.SetGroupColor

Direct3DRMMeshInterpolator

Adds a group color key to a Direct3DRMMeshInterpolator object.

Syntax

object.SetGroupColor(id As Long,
  val As Long)

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.
id
Identifier of the group. This identifier must be produced by using the Direct3DRMMesh.AddGroup method.
val
Color of the group. Colors are represented by a Long, consisting of 4 bytes. The high byte is the alpha component and the subsequent bytes define red, green, and blue. Use CreateColorRGBA from the DirectX7 object to more easily construct a color or use SetGroupColorRGB if you only want full alpha.

Error Values

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

Direct3DRMMeshInterpolator.SetGroupColorRGB

Direct3DRMMeshInterpolator

Adds a group RGB key to a Direct3DRMMeshInterpolator object.

Syntax

object.SetGroupColorRGB(id As Long,
  r As Single,
  g As Single,
  b As Single)

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.
id
Identifier of the group. This identifier must be produced by using the Direct3DRMMesh.AddGroup method.
r, g, and b
Red, green, and blue components of the group color.

Error Values

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

Direct3DRMMeshInterpolator.SetIndex

Direct3DRMMeshInterpolator

Sets the interpolator's internal index (time) to the specified value. If other interpolators are attached to the interpolator, this method recursively synchronizes their indices to the same value.

Syntax

object.SetIndex(val As Single)

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.
val
Time to set for the interpolator's internal index.

Error Values

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

Remarks

Every key stored in an interpolator has an index value. When a key is recorded (by using a method), the key is stamped with the current interpolator index value. The key's index value does not change after being stamped.

Direct3DRMMeshInterpolator.SetVertices

Direct3DRMMeshInterpolator

Adds a vertex position key to a Direct3DRMMeshInterpolator object.

Syntax

object.SetVertices(id As Long,
  idx As Long,
  count As Long,
  vertexArray() As D3DRMVERTEX)

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.
id
Identifier of the group. This identifier must be produced by using the Direct3DRMMesh.AddGroup method.
idx
Index of the first vertex in the mesh group to be modified.
count
Number of consecutive vertices to set. The vertexArray parameter must contain at least the number of count elements.
vertexArray
An array of D3DRMVERTEX types specifying the vertex positions to be set.

Error Values

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

Direct3DRMMeshInterpolator.Translate

Direct3DRMMeshInterpolator

Adds the specified offsets to the vertex positions of a Direct3DRMMeshInterpolator object.

Syntax

object.Translate(tx As Single,
  ty As Single,
  tz As Single)

Parts

object
Object expression that resolves to a Direct3DRMMeshInterpolator object.
tx, ty, and tz
Offsets that are added to the x-, y-, and z-coordinates, respectively, of each vertex position.

Error Values

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


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