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 Direct3DRMTexture3 object can be attached to a Direct3DRMTextureInterpolator object. For more information on interpolators, see Interpolators in Further Reading.
The Direct3DRMTextureInterpolator interface contains the following methods.
Attaching objects AttachObject DetachObject GetAttachedObjects Color SetDecalOrigin SetDecalSize SetDecalTransparentColor Interpolating GetIndex Interpolate SetIndex
In addition, Direct3DRMTextureInterpolator inherits the following methods from the Direct3DRMObject interface.
Connects an object to the interpolator.
Syntax
object.AttachObject(mObject As Direct3DRMObject)
Parts
- object
- Object expression that resolves to a Direct3DRMTextureInterpolator 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 Direct3DRMTexture3 object can be attached to a Direct3DRMTextureInterpolator object.
Detaches an object from the interpolator.
Syntax
object.DetachObject(mObject As Direct3DRMObject)
Parts
- object
- Object expression that resolves to a Direct3DRMTextureInterpolator object.
- mObject
- Direct3DRMObject object to detach from the interpolator.
Error Values
For a list of possible errors, see Direct3D Retained Mode Error Values.
Retrieves the objects currently attached to the interpolator.
Syntax
object.GetAttachedObjects( ) As Direct3DRMObjectArray
Parts
- object
- Object expression that resolves to a Direct3DRMTextureInterpolator object.
Return Value
Returns a Direct3DRMObjectArray object.
Error Values
For a list of possible errors, see Direct3D Retained Mode Error Values.
Retrieves the interpolator's current internal index (time).
Syntax
object.GetIndex( ) As Single
Parts
- object
- Object expression that resolves to a Direct3DRMTextureInterpolator 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.
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 Direct3DRMTextureInterpolator 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.
Adds a decal origin key to a Direct3DRMTextureInterpolator object.
Syntax
object.SetDecalOrigin(x As Long, y As Long)
Parts
- object
- Object expression that resolves to a Direct3DRMTextureInterpolator object.
- x and y
- New origin, in decal coordinates, for the decal. The default origin is [0, 0].
Error Values
For a list of possible errors, see Direct3D Retained Mode Error Values.
Adds a decal size key to a Direct3DRMTextureInterpolator object.
Syntax
object.SetDecalSize(width As Single, height As Single)
Parts
- object
- Object expression that resolves to a Direct3DRMTextureInterpolator object.
- width and height
- New width and height, in model coordinates, of the decal. The default size is [1, 1].
Error Values
For a list of possible errors, see Direct3D Retained Mode Error Values.
Adds a decal transparent color key to a Direct3DRMTextureInterpolator object.
Syntax
object.SetDecalTransparentColor(tcolor As Long)
Parts
- object
- Object expression that resolves to a Direct3DRMTextureInterpolator object.
- tcolor
- New transparent color. The default is black. To specify an object's color, including the alpha component, call the CreateColorRGBA method from the DirectX7 interface on the object.
Error Values
For a list of possible errors, see Direct3D Retained Mode Error Values.
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 Direct3DRMTextureInterpolator 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.
Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.