DGKC Control Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > API Reference > View > IView_DG Go to ActiveX docs 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, IFrame_DG, IViewPoint_DG, IViewPointArray_DG, IVirtualView_DG, ISmartLabelManager_DG, IDynamicScreenItemManager_DG, IGlobalAPI_DG, IObjectGenerator_DG

Properties

Name Type Description
GlobalAxes bool Visibility of the global axes
BackColor Color Background color
RenderType RenderType_DG The current surface (solid) or wireframe rendering type
ViewType ViewType_DG 3D or 2D
ViewMode ViewMode_DG View (standard 3D navigation) or Modify (moving objects relatively to the rest of the scene) mode
AutoViewMode ViewMode_DG The mode, which will be set automatically in the end of an interative continuous modification like movement of an object with the mouse in Modify mode
ProjectionType ProjectionType_DG Orthographic or Perspective
ViewingVolume BoxDg The displayed part of 3D space

Methods:

Update
Reset
ShowHideAll
GoTo
LookAt
GetModel
IsVisibleGlobalAxes
ShowGlobalAxes
GetBackColor
SetBackColor
GetBoolAttribute
SetBoolAttribute
Translate
Rotate
Zoom
ZoomEx
GetEyeFrame
ScreenTo3D
ScreenTo3DEx
ProjectToScreen
ScreenToEyeFrame
GetPixelSize
GetWindowSize
GetContext
GetScene
GetLighting
GetExtendedProperties
LookAtEntity
LookAtEntities

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(PointDg point, VectDg 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)


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


PointDg 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.


PointDg 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.


PairIntDg ProjectToScreen(PointDg 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


PairIntDg GetWindowSize()

Returns size of the window of the control


IContext_DG GetContext()


IScene_DG GetScene()


ILighting_DG GetLighting()


IDictionary_DG GetExtendedProperties()


void LookAtEntity(IEntity_DG entity, VectDg directionUp)


void LookAtEntities(IEntityArray_DG entities, VectDg directionUp)