Cross View Visual Basic 6 Sample
Overview
Details Of Application Design
The Samples\VB\CrossView folder of the installation directory contains three
separate project folders for High,
Mid and Low level implementations
Normals calculation is implemented only in the Low level.
The CrossViewForm uses calls to Activate(),
UpdateCrossEntityView() and Setup() methods to delegate the relevant task to
the specific implementation class.
Low implementation of the sample provides also a way to display and test mapping
of 2D coordinates of Crsossentity view (right hand window) and coordinates the
correspondent point in 3D space. Low level transforms coordinates of the
crosentity line to 2D coordinates in the local frane which defines the plane.
Implementation
The most critical work is done inside UpdateCrossEntityView()
of the form 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().
|