IDA2View Interface

The IDA2View interface is the COM interface that defines DAView objects. This interface can access all the methods in the IDAView interface and define additional methods. You can't access the methods in this interface from script; you must access them through the COM interface, typically using C++.

The IDA2View interface can access all the methods in the IDAView interface. The IDA3View interface can access all methods in IDAView and IDA2View, plus defines additional methods that enable you to pause and resume a view. You can't access the methods in this interface from script; you must access them through the COM interface, typically using C++.

This interface inherits from IDAView, which in turn inherits from IDispatch.

IDA2View Methods

GetDDD3DRM Retrieves the IDirectDraw and IDirect3DRM interfaces used by the view.
GetInvalidatedRects Gets the RECT regions of the view that have changed.
GetRMDevice Retrieves the IDirect3DRMDevice interface of the underlying Microsoft® Direct3D® Retained Mode device, and a version so you can tell if it has changed.
QueryHitPointEx This method is obsolete.
StartModelEx Starts the animation model with the specified image and sound at the specified base start time.

IDA2View::GetDDD3DRM

IDA2View

Retrieves the IDirectDraw and IDirect3DRM interfaces used by the view.

Syntax

HRESULT GetDDD3DRM(
    IUnknown **directDraw,
    IUnknown **d3drm
);

Parameters

directDraw
[out] Address of the pointer to the IDirectDraw interface used by the view.
d3drm
[out] Address of the pointer to the IDirect3DRM interface used by the view.

Return Value

Returns an HRESULT value that indicates the success of the method or the reason why it failed. This HRESULT depends on the implementation of the interface.

Remarks

For information about IDirectDraw and IDirect3DRM, see the DirectX Foundation SDK.

IDA2View::GetInvalidatedRects

IDA2View

Retrieves the rectangular regions (RECTs) that have changed in the view.

Syntax

HRESULT GetInvalidatedRects(
    DWORD flags,
    LONG s,
    RECT *pRects,
    LONG *pNumRects
);

Parameters

flags
[in] Not currently used.
s
[in] Size of the array that will contain the changed rectangles.
pRects
[size_is(s), in] Pointer to the array that will hold the changed rectangles. Note that if there are more changed rectangles than the size of the array, only s changed rectangles will be returned.
pNumRects
[out] Pointer to the actual number of changed rectangles.

Return Value

Returns an HRESULT value that indicates the success of the method or the reason why it failed. This HRESULT depends on the implementation of the interface.

Remarks

Typically, you call GetInvalidatedRects with pRects set to NULL and examine the value returned in pNumRects. This tells you how many rectangles actually changed. You then call GetInvalidatedRects again, using the value returned in pNumRects as the size s of the pRects array. This ensures that all the changed rectangles are retrieved.

IDA2View::GetRMDevice

IDA2View

Retrieves the IDirect3DRMDevice interface of the underlying Direct3D Retained Mode device and a version indicator so you can tell if it has changed.

Syntax

HRESULT GetRMDevice(
    IUnknown **d3drmDevice,
    DWORD *sequenceNumber
);

Parameters

d3drmDevice
[out] Address of the pointer to the IDirect3DRMDevice interface of the view's underlying Direct3D Retained Mode device.
sequenceNumber
[out] Pointer to the version stamp of the underlying device, so that you can check if the device has changed, for example, from hardware to software.

Return Value

Returns an HRESULT value that indicates the success of the method or the reason why it failed. This HRESULT depends on the implementation of the interface.

Remarks

For information about IDirect3DRMDevice, see the Direct3D Retained Mode documents in the DirectX Foundation SDK.

IDA2View::QueryHitPointEx

IDA2View

This method is obsolete.

Syntax

HRESULT QueryHitPointEx(
    LONG s,
    DWORD_PTR *cookies,
    double *points,
    LPCRECT prcBounds,
    POINT ptLoc,
    LONG*hits
);

Parameters

s
[in] Size of the array holding the images or geometries that were hit.
cookies
[size_is(s), out] Pointer to an array of cookies (identification tokens) identifying the images or geometries hit.
points
[size_is(s*5), out] Pointer to the x-, y-, and z-coordinates of the hit in the object's local coordinates, and the u and v texture coordinates of the hit on the object.
prcBounds
[in] Pointer to a RECT structure specifying the bounding rectangle of the view to be checked.
ptLoc
[in] Point in device x- and y-coordinates to test for a hit.
hits
[out] Pointer to the total number of images or geometries that were hit.

Return Value

Returns an HRESULT value that indicates the success of the method or the reason why it failed. This HRESULT depends on the implementation of the interface.

Remarks

If the number of hits found is greater than the size of the array, the array will be filled with as many hits as it can hold, and the rest will not be returned. No error will be reported. You should check the hits parameter and increase the size of the array, if necessary.

IDA2View::StartModelEx

IDA2View

Starts rendering the animation model with the specified image and sound at the specified base start time.

Syntax

HRESULT StartModelEx(
    IDAImage *pImage,
    IDASound *pSound,
    double startTime,
    DWORD  dwFlags
);

Parameters

pImage
[in] Pointer to the image to be rendered.
pSound
[in] Pointer to the sound to be rendered.
startTime
[in] Base time at which to start the clock for this model. Ticks will be relative to this time. Elapsed time is tick time minus startTime.
dwFlags
[in] Flag that specifies whether the model renders immediately, or whether it waits for all synchronous imports to be loaded. By default (dwFlags=0), if all synchronous imports are not loaded then rendering is blocked. Set dwFlags to DAAsyncFlag to render the model even though all synchronous imports are not loaded.

Return Value

Returns E_PENDING if DAAsyncFlag is set and the model is being rendered but all synchronous imports are not loaded. Otherwise, returns an HRESULT value that depends on the implementation of the interface.

Remarks

If you set dwFlags to DAAsyncFlag and all synchronous imports are not loaded, the method will return E_PENDING but start rendering the model. If you do not set this flag and all synchronous imports are not loaded, rendering will be blocked until they are loaded.

You can use the startTime parameter to synchronize with other models. For example, if another model starts at time 0 and something occurs in that model at time 1000 that you want to synchronize with, set startTime to 1000.


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