IViewPointArray Interface
- GetCount
- GetAt
- RemoveAt
- Add
- Default
- GetDefault
IViewPointArray gives access to collection of
Persistent Viewpoints.
IViewPointArray can be queried from the IView
interface.
Query path: DG Kernel > GetView
> IView > IViewPointArray
See also PointOfView Sample, Interface List
HRESULT GetCount(int * count)
Parameters
count- [out, retval] Reference to an integer
variable which will be set to number of valid members in the array
Returns
- S_OK in case of
success.
HRESULT GetAt(int index, IViewPoint** vp)
Parameters
index - [in] index of the viewpoint to retrieve.
vp - [out, retval] pointer to a variable,
which will be assigned an appropriate interface pointer, implemented by index-th
viewpoint in the array.
Return Values
- S_OK in case of success.
DISP_E_BADINDEX - if the index is out of the range
DISP_E_PARAMNOTOPTIONAL - if vp is null
- Remarks:
-
- Returns IViewPoint implemented by the index
-th viewpoint of the model.
HRESULT RemoveAt(int index)
Parameters
index - [in] index of the viewpoint to be removed..
Returns
S_OK in case of success.
DISP_E_BADINDEX - if the index is out of the range
Remarks:
Will remove the viewpoint at index position.
HRESULT Add(char* name)
Parameters
name - [in]
0-terminated ASCII string with name of the viewpoint to be added. If NULL name
of the viewpoint will be empty string.
Remarks:
The method will add a new viewpoint with name name at
the end of the array. The viewpoint will have its properties set to keep the
current configuration of view as if IViewPoint.Store()
has been immediately called.
HRESULT Default(int index)
Parameters
index - [in] index of the viewpoint
to be made the default one. See Remarks.
Remarks:
The viewpoint array keeps index of the default viewpoint, which if -1 by
default (no default viewpoint is defined). When this index is in range of the
array the correspondent viewpoint will be activated (Set Current) automatically
on the model load during the application startup or changing the
ModelPath
property. This method sets index-th viewpoint as the
default one. If is index negative the model will not
activate any viewpoints.
HRESULT GetDefault(int* index)
Parameters
index - [out, retval] index of the
current default viewpoint. See remarks. for the previous method
Remarks:
See remarks. for the previous method. The method returns index of the current
default viewpoint or -1 if no default is defined.
|