DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Expand ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Expand General GeometryGeneral Geometry
Expand ModelModel
Collapse ViewView
Expand General ComputingGeneral Computing
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > API Reference > View > IView_DG Search Documentation


IView_DG Interface

IView_DG can be obtained from the DG Kernel Control using query DGKernelControl.GetView() >  IView_DG

Interfaces, which can be queried from IView_DG: IPick_DG, IView, IView2, IViewModal, IPropertyArray, ILook, ILookEx, IFrame, IViewPoint, IViewPointArray, IVirtualView, ISelection_KC, ISmartLabelManager_KC, IDynamicScreenItemManager_KC, IKCContext, IKCContext2, IPrint_KC, IMenu_KC, IGlobalAPI_KC, IModel, IDIObjGenerator

Methods:

Update
Reset
ShowHideAll
GoTo
LookAt
GetModel
IsVisibleGlobalAxes
ShowGlobalAxes
GetBackColor
SetBackColor
GetRenderType
SetRenderType
GetViewType
SetViewType
GetViewMode
SetViewMode
GetProjectionType
SetProjectionType
GetBoolAttribute
SetBoolAttribute
Translate
Rotate
Zoom
ZoomEx
GetEyeFrame
GetViewingVolume
SetViewingVolume
ScreenTo3D
ScreenTo3DEx
ProjectToScreen
ScreenToEyeFrame
GetPixelSize
GetWindowSize

void Update()

Checks for any modifications and updates internal structures, if necessary. Redraws the window.


void Reset(bool redraw, bool includeOrientation)

If includeOrientation is true, resets zoom and point of view to the default initial configuration normally used on start of the application.
If includeOrientation is false, refits the scene only, while keeping direction of view.


void ShowHideAll(bool show)

Shows or hides all entities in the scene.


void GoTo(IEntity_DG entity)

Zooms in on the entity to fit it into the windows with default margins, while keeping direction of view.


void LookAt(Point_DG point, Vect_DG directionUp)

Changes direction of view


void GetModel(IModel_DG model)


bool IsVisibleGlobalAxes()


void ShowGlobalAxes(bool show)


void GetBackColor(out float red, out float green, out float blue, float alpha)


void SetBackColor(float red, float green, float blue, float alpha)


RenderType_DG GetRenderType()

Retrieves the current surface or wireframe rendering mode


void SetRenderType(RenderType_DG type)

Sets surface or wireframe rendering mode


ViewType_DG GetViewType()

Retrieves the current 3D or 2D view type


void SetViewType(ViewType_DG type)

Sets 3D or 2D view type. 2D view type is not supported in the current version, but not disabled.


ViewMode_DG GetViewMode()

Retrieves the current View or Modify mode


void SetViewMode(ViewMode_DG mode)

Sets the current View or Modify mode


ProjectionType_DG GetProjectionType()

Retrieves the current Orthographic or Perspective projection type


void SetProjectionType(ProjectionType_DG type)

Sets the current Orthographic or Perspective projection type


bool GetBoolAttribute(ViewBoolAttribute_DG attribute)

Returns value of various Boolean properties


void SetBoolAttribute(ViewBoolAttribute_DG attribute, bool val)

Modifies various Boolean properties


void Translate(double vx, double vy, double vz)

Programmatic pan


void Rotate(double angle, double vx, double vy, double vz)

Rotates view around an axis defined relatiove to the current Eye Frame. angle is expected in radians.


void Zoom(double scale)


void ZoomEx(double scale, double centerx, double centery, double centerz)


IFrame_DG GetEyeFrame()

Access to the Eye Frame. Coordinates of its origin and axes are relative to global frame


void GetViewingVolume(out Box_DG box)

The current view volume in Eye Frame axes.


void SetViewingVolume(Box_DG box)

Modifies dimensions of the current view volume. If x and y dimensions of box have different aspect ratio then the window, its dimentions will be adjusted using an internal algorithm


Point_DG ScreenTo3D(int xWnd, int yWnd)

Returns the 3D point in Viewing Plane, which corresponds to the specified window point. yWnd is the distance in pixels from the top of the component's window.


Point_DG ScreenTo3DEx(int xWnd, int yWnd, double dist)

Returns point at dist away from the point ScreenTo3D(xWnd, yWnd) in Z direction of the eye frame. Negative values of dist produce points on the opposite from the viewer side of the Viewing Plane.


PairInt_DG ProjectToScreen(Point_DG point3D)

Returns window cordinates, where point3D appears on the screen. The second component in the returned pair is the distance in pixels from the top of the component's window.


void ScreenToEyeFrame(int xWnd, int yWnd, out double x, out double y)

Returns the point in Viewing Plane, which corresponds to the specified window point. yWnd is the distance in pixels from the top of the component's window.


double GetPixelSize()

Returns geometric size correspondent to a screen pixel. The returned value depends on the current zoom


PairInt_DG GetWindowSize()

Returns size of the window of the control