DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Expand API ReferenceAPI Reference
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > Models > Entities > Model Items > View Points Search Documentation


Viewpoints

 
Models keep an array of viewpoints (Viewpoint Array). A viewpoint keeps information about the current configuration of view, which is the result of the previous viewing manipulations Zoom/Pan/Rotate. This information can be saved with the model and used to restore the configuration programmatically via IViewPoint.SetCurrent method.

One of viewpoints can be set as the Default Viewpoint. Default viewpoint is restored automatically on the model load, including application start-up.

Viewpoints stored in the Viewpoint Array are called Persistent Viewpoints. View of  a DG Kernel Component also maintains a single viewpoint called Transient Viewpoint. It is not saved with the model and exists only to facilitate programmatic modification for the configuration of view.

Viewpoints are Scene Items, hence they have Name and Visibility properties, which can be managed via IItem interface. Viewpoints are always top-level items, so they do not have parents. Like Entities viewpoints have Local Frame property. Its visibility can be managed via ISection2 interface.

Collection of Persistent viewpoints is managed by IViewPointArray interface, which can be queried via path: DG Kernel > GetView > IView > IViewPointArray.

IArray2 queried via path: DG Kernel > GetView > IPropertyArray > IPropertyArray.GetProperty("ViewPoints") > IArray2 allows some additional operations like search for a viewpoint by its name, changing order of viewpoints in the array and insertion of an existing viewpoint.

Individual viewpoint is managed by IViewPoint, which can be obtained with ViewPointArray.GetAt or IArray2.GetAt.

IViewPoint for the transient viewpoint can be queried directly from IView without any add or create operations.

To add a new persistent viewpoint use IViewPointArray.Add or relevant methods of IArray2 with val parameter set to NULL. The new viewpoint will store the current configuration of view automatically.

To add a new viewpoint in 3D Debugger use Views > "Store Viewpoint" menu command. Name and other properties of the added viewpoint can be modified in the Model Explorer.

See also Point Of View Sample