DG Kernel Documentation


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


Cross View C++ Sample

Overview

Details Of Application Design

To separate implementations the application uses classes HighImplementation, MidImplementation and LowImplementation which are inherited from common Implementation base class. The form / dialogue class keeps instances of each. Member m_implementation keeps reference to the currently active implementation which changes depending on selection of radio button in the Implementation group.

The form / dialogue class uses calls to overridable / virtual Activate(), UpdateCrossEntityView() and Setup() methods to delegate the relevant task to the currently active implementation class.

Implementation

The most critical work is done inside UpdateCrossEntityView() of the form/dialogue which is called on "Update Cross-Entity View" button clicks and also on start of the application or when implementation type is changed. The method delegates the call to UpdateCrossEntityView() of the currently active implementation class via virtual call.

In case of Low level implementation LowImplementation.AlignViewPlane() method uses IFrame.SetAxes to align z and x axes of the Eye Frame for two dimensional style of view

Cross entity plane is rendered using the first clipping plane of the pipe entity. The clipping plane is not enabled because it used only for rendering purpose. Preparation of the plane is done in SetupRenderingPlane() method of the form/dialogue

Notice also the way frame of the 2D View is rendered inside of OnClientDraw(). It uses IGraphicItem queried from IView in CreateFrameGraphicItem().