Direct3DRMFrame3 Methods A to M

This section contains the reference material for the methods of the Direct3DRMFrame3 interface that begin with the letters A through M.

Direct3DRMFrame3.AddChild

Direct3DRMFrame3

Adds a child frame to a frame hierarchy.

Syntax

object.AddChild(child As Direct3DRMFrame3)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
child
Direct3DRMFrame3 object that will be added as a child.

Error Values

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

Remarks

If the frame being added as a child already has a parent, this method removes it from its previous parent before adding it to the new parent.

To preserve an object's transformation, use the Direct3DRMFrame3.GetTransform method to retrieve the object's transformation before using the AddChild method. Then reapply the transformation after the frame is added.

Direct3DRMFrame3.AddLight

Direct3DRMFrame3

Adds a light to a frame.

Syntax

object.AddLight(val As Direct3DRMLight)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
val
Variable that represents the Direct3DRMLight object to be added to the frame.

Error Values

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

Direct3DRMFrame3.AddMoveCallback

Direct3DRMFrame3

Adds a callback for special movement processing. The callback is called when the frame is moved or updated.

Syntax

object.AddMoveCallback(frameMoveImplementation As Direct3DRMFrameCallback3
  userArgument As object,
  flags As CONST_D3DRMCALLBACKORDERFLAGS)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
frameMoveImplementation
Direct3DRMFrameCallback3 interface implemented by the application.
userArgument
Application-defined data passed to the callback.
flags
One or more values from the CONST_D3DRMCALLBACKORDERFLAGS enumerated type.

Error Values

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

Remarks

This method replaces Direct3DRMFrame2.AddMoveCallback2. Multiple callbacks on an individual frame are used in the order that the callbacks were created.

See Also

Direct3DRMFrame3.DeleteMoveCallback

Direct3DRMFrame3.AddRotation

Direct3DRMFrame3

Adds a rotation about the given coordinates by the specified number of radians.

Syntax

object.AddRotation(combineType As CONST_D3DRMCOMBINETYPE,
  x As Single,
  y As Single,
  z As Single,
  theta As Single)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
combineType
Member of the CONST_D3DRMCOMBINETYPE enumerated type that specifies how to combine the new rotation with any current frame transformation.
x, y, and z
Axis about which to rotate.
theta
Angle of rotation, in radians.

Error Values

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

Remarks

The specified rotation changes the matrix only for the frame identified by this Direct3DRMFrame3 interface. This method changes the objects in the frame only once, unlike Direct3DRMFrame3.SetRotation, which changes the matrix with every render tick.

Direct3DRMFrame3.AddScale

Direct3DRMFrame3

Scales a frame's local transformation by the given coordinate scale factors.

Syntax

object.AddScale(combineType As CONST_D3DRMCOMBINETYPE,
  sx As Single,
  sy As Single,
  sz As Single)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
combineType
Member of the CONST_D3DRMCOMBINETYPE enumerated type that specifies how to combine the new scale with any current frame transformation.
sx, sy, and sz
Scale factors in the in the x-, y-, and z-axis directions.

Error Values

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

Remarks

The specified transformation changes the matrix only for the frame identified by the Direct3DRMFrame3 interface.

Direct3DRMFrame3.AddTransform

Direct3DRMFrame3

Transforms the local coordinates of the frame by the specified affine transformation.

Syntax

object.AddTransform(t As CONST_D3DRMCOMBINETYPE,
  val() As Single)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
t
Member of the CONST_D3DRMCOMBINETYPE enumerated type that specifies how to combine the new transformation with any current transformation.
val
Row-ordered array representing a 4×4 matrix.

Error Values

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

Remarks

Although a 4×4 matrix is given, the last column must be the transpose of [0 0 0 1] for the transformation to be affine. The specified transformation changes the matrix only for the frame identified by this Direct3DRMFrame3 interface.

Direct3DRMFrame3.AddTranslation

Direct3DRMFrame3

Adds a translation by the given position changes to a frame's local coordinate system.

Syntax

object.AddTranslation(t As CONST_D3DRMCOMBINETYPE,
  x As Single,
  y As Single,
  z As Single)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
t
Member of the CONST_D3DRMCOMBINETYPE enumerated type that specifies how to combine the new translation with any current translation.
x, y, and z
Definitions of the position changes in the x-, y-, and z-axis directions.

Error Values

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

Remarks

The specified translation changes the matrix only for the frame identified by this Direct3DRMFrame3 interface.

Direct3DRMFrame3.AddVisual

Direct3DRMFrame3

Adds a visual object to a frame.

Syntax

object.AddVisual(v As Direct3DRMVisual)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
v
Variable that represents the Direct3DRMVisual object to be added to the frame.

Error Values

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

Remarks

Visual objects include meshes, progressive meshes, textures, shadows, user visuals, and 3-D Microsoft® DirectX® Transform objects. When a visual object is added to a frame, it becomes visible if the frame is in view. The frame references the visual object.

Direct3DRMFrame3.DeleteChild

Direct3DRMFrame3

Removes a frame from the hierarchy. If the frame is not referenced, it is destroyed along with any child frames, lights, and meshes.

Syntax

object.DeleteChild(c As Direct3DRMFrame3)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
c
Direct3DRMFrame3 object to be removed from the hierarchy.

Error Values

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

Direct3DRMFrame3.DeleteLight

Direct3DRMFrame3

Removes a light from a frame, destroying the light if it is no longer referenced. When a light is removed from a frame, the light no longer affects meshes in the scene its frame was in.

Syntax

object.DeleteLight(l As Direct3DRMLight)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
l
Variable that represents the Direct3DRMLight object to be removed.

Error Values

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

Direct3DRMFrame3.DeleteMoveCallback

Direct3DRMFrame3

Removes a frame-move callback previously added with AddMoveCallback.

Syntax

object.DeleteMoveCallback(frameMoveImplementation As Direct3DRMFrameCallback3,
  userArgument As object)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
frameMoveImplementation
Direct3DRMFrameCallback3 interface implemented by the application.
userArgument
Application-defined data that was passed to the callback.

Error Values

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

See Also

Direct3DRMFrame3.Move

Direct3DRMFrame3.DeleteVisual

Direct3DRMFrame3

Removes a visual object from a frame, destroying it if it is no longer referenced.

Syntax

object.DeleteVisual(v As Direct3DRMVisual)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
v
Variable that represents the Direct3DRMVisual object to be removed.

Error Values

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

Remarks

Visual objects include meshes, progressive meshes, textures, shadows, user visuals, and 3-D DirectX Transform objects. When a visual object is added to a frame, it becomes visible if the frame is in view. The frame references the visual object.

Direct3DRMFrame3.GetAxes

Direct3DRMFrame3

Retrieves the vectors that are aligned with the direction (dx, dy, dz) and up (ux, uy, uz) vectors supplied to the Direct3DRMFrame3.SetOrientation method.

Syntax

object.GetAxes(dir As D3DVECTOR,
  up As D3DVECTOR)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
dir
The z-axis for the frame. Default is (0, 0, 1).
up
The y-axis for the frame. Default is (0, 1, 0).

Error Values

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

Remarks

This method, along with Direct3DRMFrame3.SetAxes, helps support both left-handed and right-handed coordinate systems. SetAxes enables you to specify that the negative z-axis represents the front of the object.

See Also

Direct3DRMFrame3.GetInheritAxes, Direct3DRMFrame3.SetInheritAxes, D3DVECTOR

Direct3DRMFrame3.GetBox

Direct3DRMFrame3

Retrieves the bounding box containing a Direct3DRMFrame3 object. The bounding box gives the minimum and maximum model coordinates in each dimension.

Syntax

object.GetBox(box As D3DRMBOX)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
box
D3DRMBOX type that will be filled with the bounding box coordinates.

Error Values

Returns D3DRMERR_BOXNOTSET unless a valid bounding box has already been set on the frame. For a list of other possible return codes, see Direct3D Retained Mode Error Values.

Remarks

This method supports a bounding box on a frame for hierarchical culling. A valid bounding box must be set on the frame with the Direct3DRMFrame3.SetBox method. For a bounding box to be enabled, the Direct3DRMFrame3.SetBoxEnable method must be used to set the enable flag to D_TRUE. By default, the box-enable flag is D_FALSE. There is no default bounding box.

See Also

Direct3DRMFrame3.GetBoxEnable

Direct3DRMFrame3.GetBoxEnable

Direct3DRMFrame3

Retrieves the flag that determines whether a bounding box is enabled for this Direct3DRMFrame3 object.

Syntax

object.GetBoxEnable( ) As CONST_DBOOLFLAGS

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns –1 if a bounding box is enabled, or zero if it is not enabled.

Error Values

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

Remarks

For a bounding box to be enabled, the Direct3DRMFrame3.SetBoxEnable method must be used to set the enable flag to D_TRUE. By default, the box-enable flag is D_FALSE.

See Also

Direct3DRMFrame3.GetBox, Direct3DRMFrame3.SetBox

Direct3DRMFrame3.GetChildren

Direct3DRMFrame3

Retrieves a list of child frames in the form of a Direct3DRMFrameArray object.

Syntax

object.GetChildren( ) As Direct3DRMFrameArray

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a Direct3DRMFrameArray object.

Error Values

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

Direct3DRMFrame3.GetColor

Direct3DRMFrame3

Retrieves the color of the frame.

Syntax

object.GetColor( ) As Long

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns the color of the Direct3DRMFrame3 object.

Error Values

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

See Also

Direct3DRMFrame3.SetColor

Direct3DRMFrame3.GetHierarchyBox

Direct3DRMFrame3

Calculates a bounding box to contain all the geometry in the hierarchy rooted in this Direct3DRMFrame3 object.

Syntax

object.GetHierarchyBox(box As D3DRMBOX)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
box
D3DRMBOX type that will be filled with the bounding box coordinates.

Error Values

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

See Also

Direct3DRMFrame3.GetBox, Direct3DRMFrame3.SetBox, Direct3DRMFrame3.SetBoxEnable, Direct3DRMFrame3.GetBoxEnable

Direct3DRMFrame3.GetInheritAxes

Direct3DRMFrame3

Retrieves the flag that indicates whether the axes for the frame are inherited from the parent frame.

Syntax

object.GetInheritAxes( ) As CONST_DBOOLFLAGS

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns –1 if the frame inherits axes (the default) or zero if the frame does not inherit axes.

Error Values

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

Remarks

By default, the axes are inherited from the parent. If a frame is set to inherit from a parent and there is no parent, the frame acts as if it inherits from a parent with the default axes: direction = (0, 0, 1) and up = (0, 1, 0).

This method and the Direct3DRMFrame3.SetInheritAxes method enable a single policy for axes to be set at the root of the hierarchy.

See Also

Direct3DRMFrame3.GetAxes, Direct3DRMFrame3.SetAxes

Direct3DRMFrame3.GetLights

Direct3DRMFrame3

Retrieves a list of lights in the frame in the form of a Direct3DRMLightArray object.

Syntax

object.GetLights( ) As Direct3DRMLightArray

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a Direct3DRMLightArray object.

Error Values

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

Direct3DRMFrame3.GetMaterial

Direct3DRMFrame3

Retrieves the material of the Direct3DRMFrame3 object.

Syntax

object.GetMaterial(ret As Direct3DRMMaterial2)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
ret
Direct3DRMMaterial2 object that is applied to the frame.

Error Values

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

See Also

Direct3DRMFrame3.SetMaterial

Direct3DRMFrame3.GetMaterialMode

Direct3DRMFrame3

Retrieves the material mode of the frame.

Syntax

object.GetMaterialMode( ) As CONST_D3DRMMATERIALMODE

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a member of the CONST_D3DRMMATERIALMODE enumerated type that specifies the current material mode.

Error Values

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

See Also

Direct3DRMFrame3.SetMaterialMode

Direct3DRMFrame3.GetMaterialOverride

Direct3DRMFrame3

Retrieves the current per-attribute override settings for material attributes.

Syntax

object.GetMaterialOverride(override As D3DRMMATERIALOVERRIDE) 

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
override
D3DRMMATERIALOVERRIDE type that holds the override information.

Error Values

If the method fails, it can return DDERR_INVALIDOBJECT or DDERR_INVALIDPARAMS.

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

See Also

Direct3DRMFrame3.SetMaterialOverride

Direct3DRMFrame3.GetMaterialOverrideTexture

Direct3DRMFrame3

Retrieves the override texture.

Syntax

object.GetMaterialOverrideTexture( ) As Direct3DRMTexture3

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a Direct3DRMTexture3 object if there is an override texture; otherwise, returns NOTHING.

Error Values

If the method fails, it can return DDERR_INVALIDOBJECT or DDERR_INVALIDPARAMS.

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

See Also

Direct3DRMFrame3.SetMaterialOverrideTexture

Direct3DRMFrame3.GetOrientation

Direct3DRMFrame3

Retrieves the orientation of a frame relative to the given reference frame.

Syntax

object.GetOrientation(ref As Direct3DRMFrame3,
  dir As D3DVECTOR,
  up As D3DVECTOR)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
ref
Variable that represents the Direct3DRMFrame3 object to be used as the reference.
dir and up
D3DVECTOR types that will hold the normalized directions of the frame's z-axis and y-axis, respectively.

Error Values

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

See Also

Direct3DRMFrame3.SetOrientation

Direct3DRMFrame3.GetParent

Direct3DRMFrame3

Retrieves the parent frame of the current frame.

Syntax

object.GetParent( ) As Direct3DRMFrame3

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a Direct3DRMFrame3 object.

Error Values

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

Direct3DRMFrame3.GetPosition

Direct3DRMFrame3

Retrieves the position of a frame relative to the given reference frame; that is, it retrieves the distance of the frame from the reference. The distance is stored in the position parameter as a vector rather than as a linear measure.

Syntax

object.GetPosition(ref As Direct3DRMFrame3,
  position As D3DVECTOR)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
ref
Variable that holds the Direct3DRMFrame object to be used as the reference.
position
D3DVECTOR type that will hold the frame's position.

Error Values

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

See Also

Direct3DRMFrame3.SetPosition

Direct3DRMFrame3.GetRotation

Direct3DRMFrame3

Retrieves the rotation of the frame relative to the given reference frame.

Syntax

object.GetRotation(ref As Direct3DRMFrame3,
  axis As D3DVECTOR,
  theta As Single)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
ref
Variable that represents the Direct3DRMFrame3 object to be used as the reference.
axis
D3DVECTOR type that will hold the frame's axis of rotation.
theta
Variable that will be the frame's rotation, in radians.

Error Values

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

See Also

Direct3DRMFrame3.SetRotation

Direct3DRMFrame3.GetScene

Direct3DRMFrame3

Retrieves the root frame of the hierarchy containing the given frame.

Syntax

object.GetScene( ) As Direct3DRMFrame3

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a Direct3DRMFrame3 object.

Error Values

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

Direct3DRMFrame3.GetSceneBackground

Direct3DRMFrame3

Retrieves the background color of a scene.

Syntax

object.GetSceneBackground( ) As Long

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns the color.

Error Values

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

Direct3DRMFrame3.GetSceneBackgroundDepth

Direct3DRMFrame3

Retrieves the current background-depth buffer for the scene.

Syntax

object.GetSceneBackgroundDepth( ) As DirectDrawSurface4

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a DirectDrawSurface4 object.

Error Values

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

See Also

Direct3DRMFrame3.SetSceneBackgroundDepth

Direct3DRMFrame3.GetSceneFogColor

Direct3DRMFrame3

Retrieves the fog color of a scene.

Syntax

object.GetSceneFogColor( ) As Long

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns the fog color.

Error Values

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

Direct3DRMFrame3.GetSceneFogEnable

Direct3DRMFrame3

Retrieves whether fog is enabled for this scene.

Syntax

object.GetSceneFogEnable( ) As CONST_DBOOLFLAGS

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns –1 if fog is enabled, or zero otherwise.

Error Values

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

Direct3DRMFrame3.GetSceneFogMethod

Direct3DRMFrame3

Retrieves the current fogging method.

Syntax

object.GetSceneFogMethod( ) As CONST_D3DRMFOGMETHOD

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns one of the values from the CONST_D3DRMFOGMETHOD enumerated type.

Error Values

If an error occurs, this method returns one of the following values.

Direct3DRMFrame3.GetSceneFogMode

Direct3DRMFrame3

Retrieves the current fog mode for this scene.

Syntax

object.GetSceneFogMode( ) As CONST_D3DRMFOGMODE

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a member of the CONST_D3DRMFOGMODE enumerated type that specifies the current fog mode.

Error Values

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

Direct3DRMFrame3.GetSceneFogParams

Direct3DRMFrame3

Retrieves the current fog parameters for this scene.

Syntax

object.GetSceneFogParams(start As Single,
  end As Single,
  density As Single)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
start, end, and density
Variables that will be the fog start, end, and density values.

Error Values

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

Direct3DRMFrame3.GetSortMode

Direct3DRMFrame3

Retrieves the sorting mode used to process child frames.

Syntax

object.GetSortMode( ) As CONST_D3DRMSORTMODE

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns the member of the CONST_D3DRMSORTMODE enumerated type that specifies the sorting mode.

Error Values

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

See Also

Direct3DRMFrame3.SetSortMode

Direct3DRMFrame3.GetTexture

Direct3DRMFrame3

Retrieves the texture of the given frame.

Syntax

object.GetTexture( ) As Direct3DRMTexture3

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a Direct3DRMTexture3 object.

Error Values

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

See Also

Direct3DRMFrame3.SetTexture

Direct3DRMFrame3.GetTransform

Direct3DRMFrame3

Retrieves the current-world transformation of the frame as a 4 × 4 affine matrix.

Syntax

object.GetTransform(referenceFrame As Direct3DRMFrame3
  val() As Single)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
referenceFrame
Direct3DRMFrame3 object used as the reference frame.
val
Row-ordered array representing a 4 × 4 matrix.

Error Values

If an error occurs, this method can return DDERR_INVALIDOBJECT or DDERR_INVALIDPARAMS.

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

Direct3DRMFrame3.GetTraversalOptions

Direct3DRMFrame3

Retrieves the traversal status of the current frame.

Syntax

object.GetTraversalOptions( ) As CONST_D3DRMTRAVERALFLAGS

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns one of the values from the CONST_D3DRMTRAVERALFLAGS enumerated type.

Error Values

If an error occurs, this method returns one of the following values.

Direct3DRMFrame3.GetVelocity

Direct3DRMFrame3

Retrieves the velocity of the frame relative to the given reference frame. Velocity is specified as units per tick. See IDirect3DRM3.Tick for more information.

Syntax

object.GetVelocity(ref As Direct3DRMFrame3,
  vel As D3DVECTOR,
  includeRotationalVelocity As CONST_DBOOLFLAGS)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
ref
Variable that represents the Direct3DRMFrame3 object to be used as the reference.
vel
D3DVECTOR type that will be filled with the frame's velocity.
includeRotationalVelocity
D_FALSE or D_TRUE; if set to D_TRUE the object's rotational velocity is included in the calculation.

Error Values

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

See Also

Direct3DRMFrame3.SetVelocity

Direct3DRMFrame3.GetVisual

Direct3DRMFrame3

Retrieves a single visual in the frame.

Syntax

object.GetVisual(index As Long) As Direct3DRMVisual

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
index
Variable indicating the index of the single Direct3DRMVisual object to be retrieved. Possible values range from 0 to N­1 for an array of size N.

Return Value

Returns a Direct3DRMVisual object.

Error Values

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

Direct3DRMFrame3.GetVisualCount

Direct3DRMFrame3

Retrieves the number of visuals in the frame.

Syntax

object.GetVisualCount( ) As Long

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns the number of visuals, Direct3DRMVisual objects, contained by the frame.

Error Values

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

Direct3DRMFrame3.GetVisuals

Direct3DRMFrame3

Retrieves a list of visuals, Direct3DRMVisual objects, in the frame.

Syntax

object.GetVisuals( ) As Direct3DRMVisualArray

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns a Direct3DRMVisualArray object.

Error Values

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

Direct3DRMFrame3.GetZbufferMode

Direct3DRMFrame3

Retrieves the z-buffer mode; that is, whether z-buffering is enabled or disabled.

Syntax

object.GetZbufferMode( ) As CONST_D3DRMZBUFFERMODE

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.

Return Value

Returns one of the members of the CONST_D3DRMZBUFFERMODE enumerated type.

Error Values

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

See Also

Direct3DRMFrame3.SetZbufferMode

Direct3DRMFrame3.InverseTransform

Direct3DRMFrame3

Transforms a given vector in world coordinates to model coordinates, and returns the result.

Syntax

object.InverseTransform(d As D3DVECTOR,
  s As D3DVECTOR)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
d
D3DVECTOR type that will be filled with the result of the transformation.
s
D3DVECTOR type that is the source of the transformation.

Error Values

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

See Also

Direct3DRMFrame3.Transform

Direct3DRMFrame3.InverseTransformVectors

Direct3DRMFrame3

Transforms an array of vectors from world coordinates to model coordinates.

Syntax

object.GetVelocity(reference As Direct3DRMFrame3,
  num As Long,
  DstVectors() As D3DVECTOR,
  SrcVectors() As D3DVECTOR)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
reference
Frame that is to be used as the root of the scene for the purposes of this call. If this argument is NOTHING, the current root frame (as would be returned by the Direct3DRMFrame3.GetScene method) will be used.
num
Number of vectors whose coordinates are to be transformed.
DstVectors()
Destination of the transformation.
SrcVectors()
Array of vectors to transform.

Error Values

If an error occurs, this method returns DDERR_INVALIDOBJECT or DDERR_INVALIDPARAMS.

See Also

D3DVECTOR

Direct3DRMFrame3.LoadFromFile

Direct3DRMFrame3

Loads a Direct3DRMFrame3 object.

Syntax

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

Parts

object
Object expression that resolves to a Direct3DRMFrame3 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 two. This parameter can be NOTHING.
userArgument
Application-defined data passed to the callback.

Error Values

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

Remarks

By default, this method loads the first frame hierarchy in the file specified by the filename parameter. The frame that uses this method is used as the parent of the new frame hierarchy. By default, perspective correction is on.

The instance flags do not change the interpretation of any of the members. By using the D3DRMLOAD_INSTANCEBYREFERENCE flag, an application can load the same file twice without creating any new objects. If an object does not have a name, setting the D3DRMLOAD_INSTANCEBYREFERENCE flag has the same effect as setting the D3DRMLOAD_INSTANCEBYCOPYING flag—the loader creates each unnamed object as a new one, even if some of the objects are identical.

Direct3DRMFrame3.LookAt

Direct3DRMFrame3

Faces the frame toward the target frame, relative to the given reference frame, locking the rotation by the given constraints.

Syntax

object.LookAt(tgt As Direct3DRMFrame3,
  reference As Direct3DRMFrame3,
  contraint As CONST_D3DRMFRAMECONSTRAINT)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
tgt and reference
Variables that represent the Direct3DRMFrame3 objects to be used as the target and reference, respectively.
contraint
Member of the CONST_D3DRMFRAMECONSTRAINT enumerated type that specifies the axis of rotation to constrain.

Error Values

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

Direct3DRMFrame3.Move

Direct3DRMFrame3

Applies the linear and rotational velocities for all frames in the given hierarchy.

Syntax

object.Move(delta As Single)

Parts

object
Object expression that resolves to a Direct3DRMFrame3 object.
delta
Amount to change the linear and rotational velocity. The change in each component is equal to the velocity of that component multiplied by delta. Although either or both of these velocities can be set relative to any frame, the system automatically converts them to velocities relative to the parent frame for the purpose of applying time changes.

Error Values

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


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