## IDirect3DRM Array Interfaces

The array interfaces make it possible for your application to group objects into arrays, making it simpler to apply operations to the entire group. The following array interfaces are available:

- IDirect3DRMArray
- IDirect3DRMDeviceArray
- IDirect3DRMFaceArray
- IDirect3DRMFrameArray
- IDirect3DRMLightArray
- IDirect3DRMObjectArray
- IDirect3DRMPickedArray
- IDirect3DRMPicked2Array
- IDirect3DRMViewportArray
- IDirect3DRMVisualArray

### IDirect3DRMArray

The IDirect3DRMArray interface organizes groups of objects. Applications typically use the particular array interface they need (for example, IDirect3DRMFaceArray), rather than using this interface directly.

The IDirect3DRMArray interface supports the GetSize method.

The IDirect3DRMArray interface, like all Component Object Model (COM) interfaces, inherits the IUnknown interface methods. This interface supports the following three methods:

AddRef
QueryInterface
Release

####

IDirect3DRMArray::GetSize

IDirect3DRMArray

Retrieves the size, in number of objects, of the Direct3DRMArray object.

DWORD GetSize( );

##### Return Values

Returns the size.

### IDirect3DRMDeviceArray

Applications use the methods of the IDirect3DRMDeviceArray interface to organize device objects. This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMDevice, IDirect3DRMDevice2, and IDirect3DRMDeviceArray Interfaces.

The IDirect3DRMDeviceArray interface supports the following methods:

GetElement
GetSize

The IDirect3DRMDeviceArray interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The Direct3DRMDeviceArray object is obtained by calling the IDirect3DRM::GetDevices method.

####

IDirect3DRMDeviceArray::GetElement

IDirect3DRMDeviceArray

Retrieves a specified element in a Direct3DRMDeviceArray object.

HRESULT GetElement(
DWORD index,
LPDIRECT3DRMDEVICE * lplpD3DRMDevice
);

##### Parameters

index
  Element in the array.
lplpD3DRMDevice
  Address that will be filled with a pointer to an IDirect3DRMDevice interface.

##### Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

####

IDirect3DRMDeviceArray::GetSize

IDirect3DRMDeviceArray

Retrieves the number of elements contained in a Direct3DRMDeviceArray object.

DWORD GetSize( );

##### Return Values

Returns the number of elements.

### IDirect3DRMFaceArray

Applications use the methods of the IDirect3DRMFaceArray interface to organize faces in a mesh. This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMFace and IDirect3DRMFaceArray Interfaces.

The IDirect3DRMFaceArray interface supports the following methods:

GetElement
GetSize

The IDirect3DRMFaceArray interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The Direct3DRMFaceArray object is obtained by calling the IDirect3DRMMeshBuilder::GetFaces method.

####

IDirect3DRMFaceArray::GetElement

IDirect3DRMFaceArray

Retrieves a specified element in a Direct3DRMFaceArray object.

HRESULT GetElement(
DWORD index,
LPDIRECT3DRMFACE * lplpD3DRMFace
);

##### Parameters

index
  Element in the array.
lplpD3DRMFace
  Address that will be filled with a pointer to an IDirect3DRMFace interface.

##### Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

####

IDirect3DRMFaceArray::GetSize

IDirect3DRMFaceArray

Retrieves the number of elements contained in a Direct3DRMFaceArray object.

DWORD GetSize( );

##### Return Values

Returns the number of elements.

### IDirect3DRMFrameArray

Applications use the methods of the IDirect3DRMFrameArray interface to organize frame objects. This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMFrame, IDirect3DRMFrame2, and IDirect3DRMFrameArray Interfaces.

The IDirect3DRMFrameArray interface supports the following methods:

GetElement
GetSize

The IDirect3DRMFrameArray interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The Direct3DRMFrameArray object is obtained by calling the IDirect3DRMPickedArray::GetPick, IDirect3DRMPicked2Array::GetPick, or IDirect3DRMFrame::GetChildren method.

####

IDirect3DRMFrameArray::GetElement

IDirect3DRMFrameArray

Retrieves a specified element in a Direct3DRMFrameArray object.

HRESULT GetElement(
DWORD index,
LPDIRECT3DRMFRAME * lplpD3DRMFrame
);

##### Parameters

index
  Element in the array.
lplpD3DRMFrame
  Address that will be filled with a pointer to an IDirect3DRMFrame interface.

##### Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

####

IDirect3DRMFrameArray::GetSize

IDirect3DRMFrameArray

Retrieves the number of elements contained in a Direct3DRMFrameArray object.

DWORD GetSize( );

##### Return Values

Returns the number of elements.

### IDirect3DRMLightArray

Applications use the methods of the IDirect3DRMLightArray interface to organize light objects. This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMLight and IDirect3DRMLightArray Interfaces.

The IDirect3DRMLightArray interface supports the following methods:

GetElement
GetSize

The IDirect3DRMLightArray interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The Direct3DRMLightArray object is obtained by calling the IDirect3DRMFrame::GetLights method.

####

IDirect3DRMLightArray::GetElement

IDirect3DRMLightArray

Retrieves a specified element in a Direct3DRMLightArray object.

HRESULT GetElement(
DWORD index,
LPDIRECT3DRMLIGHT * lplpD3DRMLight
);

##### Parameters

index
  Element in the array.
lplpD3DRMLight
  Address that will be filled with a pointer to an IDirect3DRMLight interface.

##### Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

####

IDirect3DRMLightArray::GetSize

IDirect3DRMLightArray

Retrieves the number of elements contained in a Direct3DRMLightArray object.

DWORD GetSize( );

##### Return Values

Returns the number of elements.

### IDirect3DRMObjectArray

Applications use the methods of the IDirect3DRMObjectArray interface to organize Direct3DRMObject objects. This section is a reference to the methods of this interface. For a conceptual overview, see Direct3DRMObject.

The IDirect3DRMObjectArray interface supports the following methods:

GetElement
GetSize

The IDirect3DRMObjectArray interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The Direct3DRMObjectArray object is obtained by calling the IDirect3DRMInterpolator::GetAttachedObjects method.

####

IDirect3DRMObjectArray::GetElement

IDirect3DRMObjectArray

Retrieves a specified element in a Direct3DRMObjectArray object.

HRESULT GetElement(
DWORD index,
LPDIRECT3DRMOBJECT * lplpD3DRMObject
);

##### Parameters

index
  Element in the array.
lplpD3DRMObject
  Address that will be filled with a pointer to an IDirect3DRMObject interface.

##### Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

####

IDirect3DRMObjectArray::GetSize

IDirect3DRMObjectArray

Retrieves the number of elements contained in a Direct3DRMObjectArray object.

DWORD GetSize( );

##### Return Values

Returns the number of elements.

### IDirect3DRMPickedArray

Applications use the methods of the IDirect3DRMPickedArray interface to organize pick objects. This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMPickedArray and IDirect3DRMPicked2Array Interfaces.

The IDirect3DRMPickedArray interface supports the following methods:

GetPick
GetSize

The IDirect3DRMPickedArray interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The Direct3DRMPickedArray object is obtained by calling the IDirect3DRMViewport::Pick method.

####

IDirect3DRMPickedArray::GetPick

IDirect3DRMPickedArray

Retrieves the Direct3DRMVisual and Direct3DRMFrame objects intersected by the specified pick.

HRESULT GetPick(
DWORD index,
LPDIRECT3DRMVISUAL * lplpVisual,
LPDIRECT3DRMFRAMEARRAY * lplpFrameArray,
LPD3DRMPICKDESC lpD3DRMPickDesc
);

##### Parameters

index
  Index into the pick array identifying the pick for which information will be retrieved.
lplpVisual
  Address that will contain a pointer to the Direct3DRMVisual object associated with the specified pick.
lplpFrameArray
  Address that will contain a pointer to the Direct3DRMFrameArray object associated with the specified pick.
lpD3DRMPickDesc
  Address of a D3DRMPICKDESC structure specifying the pick position and face and group identifiers of the objects being retrieved.

##### Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

##### See Also

IDirect3DRMViewport::Pick

####

IDirect3DRMPickedArray::GetSize

IDirect3DRMPickedArray

Retrieves the number of elements contained in a Direct3DRMPickedArray object.

DWORD GetSize( );

##### Return Values

Returns the number of elements.

### IDirect3DRMPicked2Array

Applications use the methods of the IDirect3DRMPicked2Array interface to organize pick objects and to return more information about the pick objects. The D3DRMPICKDESC2 structure returned by IDirect3DRMPicked2Array::GetPick contains the face and group identifiers, pick position, horizontal and vertical texture coordinates for the vertex, vertex normal, and color of the intersected objects. A pointer to this interface pointer is returned in the IDirect3DRMFrame2::RayPick method during ray picks.

This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMPickedArray and IDirect3DRMPicked2Array Interfaces.

The IDirect3DRMPicked2Array interface supports the following methods:

GetPick
GetSize

The IDirect3DRMPicked2Array interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The Direct3DRMPicked2Array object is obtained by calling the IDirect3DRMFrame2::RayPick method.

####

IDirect3DRMPicked2Array::GetPick

IDirect3DRMPicked2Array

Retrieves the Direct3DRMVisual and Direct3DRMFrame objects intersected by the specified pick.

HRESULT GetPick(
DWORD index,
LPDIRECT3DRMVISUAL * lplpVisual,
LPDIRECT3DRMFRAMEARRAY * lplpFrameArray,
LPD3DRMPICKDESC2 lpD3DRMPickDesc2
);

##### Parameters

index
  Index into the pick array identifying the pick for which information will be retrieved.
lplpVisual
  Address that will contain a pointer to the Direct3DRMVisual object associated with the specified pick.
lplpFrameArray
  Address that will contain a pointer to the Direct3DRMFrameArray object associated with the specified pick.
lpD3DRMPickDesc
  Address of a D3DRMPICKDESC2 structure specifying the face and group identifiers, pick position, horizontal and vertical texture coordinates for the vertex, vertex normal, and color of the intersected objects.

##### Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Return Values.

##### See Also

IDirect3DRMFrame2::RayPick

####

IDirect3DRMPicked2Array::GetSize

IDirect3DRMPicked2Array

Retrieves the number of elements contained in a Direct3DRMPicked2Array object.

DWORD GetSize( );

##### Return Values

Returns the number of elements.

### IDirect3DRMViewportArray

Applications use the methods of the IDirect3DRMViewportArray interface to organize viewport objects. This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMViewport and IDirect3DRMViewportArray Interface.

The IDirect3DRMViewportArray interface supports the following methods:

GetElement
GetSize

The IDirect3DRMViewportArray interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The Direct3DRMViewportArray object is obtained by calling the IDirect3DRM::CreateFrame method.

####

IDirect3DRMViewportArray::GetElement

IDirect3DRMViewportArray

Retrieves a specified element in a Direct3DRMViewportArray object.

HRESULT GetElement(
DWORD index,
LPDIRECT3DRMVIEWPORT * lplpD3DRMViewport
);

##### Parameters

index
  Element in the array.
lplpD3DRMViewport
  Address that will be filled with a pointer to an IDirect3DRMViewport interface.

##### Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

####

IDirect3DRMViewportArray::GetSize

IDirect3DRMViewportArray

Retrieves the number of elements contained in a Direct3DRMViewportArray object.

DWORD GetSize( );

##### Return Values

Returns the number of elements.

### IDirect3DRMVisualArray

Applications use the methods of the IDirect3DRMVisualArray interface to organize groups of visual objects. This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMVisual and IDirect3DRMVisualArray Interfaces.

The IDirect3DRMVisualArray interface supports the following methods:

GetElement
GetSize

The IDirect3DRMVisualArray interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The Direct3DRMVisualArray object is obtained by calling the IDirect3DRMFrame::GetVisuals method.

####

IDirect3DRMVisualArray::GetElement

IDirect3DRMVisualArray

Retrieves a specified element in a Direct3DRMVisualArray object.

HRESULT GetElement(
DWORD index,
LPDIRECT3DRMVISUAL * lplpD3DRMVisual
);

##### Parameters

index
  Element in the array.
lplpD3DRMVisual
  Address that will be filled with a pointer to an IDirect3DRMVisual interface.

##### Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

####

IDirect3DRMVisualArray::GetSize

IDirect3DRMVisualArray

Retrieves the number of elements contained in a Direct3DRMVisualArray object.

DWORD GetSize( );

##### Return Values

Returns the number of elements.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.