1.0 Overview 

2.0 Using the Reference Application


1.0 Overview

The Reference Application:

The Reference Application enables the user to read in HOOPS Stream Files and invoke the supplied HOOPS/MVO Operators to "operate" the application. The operations provided are: 

The application is intended as a demonstration of the integration of HOOPS with QT, a showcase of all the functionality available in the HOOPS/MVO class library, and most importantly,  as a reference architecture that developers may extend. As such, the set of Operator objects implemented were chosen to demonstrate the ways in which many operations common to 3D modeling applications can be implemented. Application developers may take the QtHoops Reference Application and easily customize and extend its functionality by creating new HOOPS/MVO derived Operator classes. 

For more information about the architecture of the QtHoops Reference Application, refer to the section on Building Applications. 
 


2.0 Using the QtHoops Reference Application

The QtHoops Reference Application has been designed to work and act like any standard Windows application.  It uses a single-document interface (SDI) supporting the standard application services (New, Open, Save As, ). HOOPS Stream Files (HSF) and Metafiles (HMFs) may be read, created, modified, and viewed. 

The viewer has the concept of an active render mode and an active model operator.  The render modes can be toggled by using the "right click" menu while the model operators can be selected to invoke a camera manipulation, a selection operator, an entity translate operator, or an entity creation/deletion operator.  The operators can be made active by clicking on the appropriate icon or pull down menu. The following icons are on the toolbar: 

From left to right they are for: 

Standard Toolbar:

Standard Views Toolbar:

Markup-Text Toolbar:

Tools Toolbar:

There are also a number of HOOPS settings that can be toggled by clicking on the right mouse button.  They are:

These features are explained in more detail below:   

2.1 Opening/Reading in Files

The HOOPS Reference Application reads in .hsf and .hmf  files.  For your convenience a set of demonstration files are contained on this media.  They are separated into industry-specific folders located in the datasets/hsf and datasets/hmf_master directories of the datasets package (available from the Tech Soft 3D Developer Zone).

2.2 Saving Files

The Reference Application allows you to save models as 

2.3 Printing

Use the print button to generate a postscript file which you can either send to your printer directly or save to your hard disk.

2.3 Camera Manipulation

Each window has a separate HOOPS camera that may be manipulated to change the current view of the model. The camera operations implemented are: 

These are modal Operators on the View and are chosen by toggling the appropriate menu button or using the pull down menus on the frame. Once a camera manipulation operator has been selected, the camera may be interactively manipulated with the mouse. All operators respond to the following sequence: left mouse button down, left mouse button down & moved (motion), left mouse button up. 

2.5 Geometry Creation

Operators are provided for the creation of new geometry. These are modal operators on the View and are chosen by toggling the appropriate menu button or using the pull down menus on the frame. Once a geometry creation operator has been selected, geometry may be interactively created with the mouse. All operators respond to the following sequence: left mouse button down, left mouse button down & moved (motion), left mouse button up. The following geometric entities may be created: 

The Sphere and Cutting Plane entities are defined by one full cycle of left mouse button (LMB) down, LMB down & motion, LMB up. To move the Cutting Plane orthogonal to the view plane, hold the shift key down while in the LMB down and motion state.  The Cylinder and Cone entities require two full cycles, the first defines the circle for their base and the next sequence defines the height vector.

2.6 Geometry Selection

Geometry Selection Operators are modal operators associated with the view. There are two selection operators provided: selection by circular aperture (a circle around the mouse position), and selection by Rectangular aperture (defined interactively with the mouse).

The QtHoops application makes use of the "right click" user interface to provide a mechanism for controlling the visibility and selectability of the entities in the scene. Positioning the mouse in the view window and pressing the right mouse button invokes a floating menu bar. The behavior of the selection operators can be configured via this interface. The interface may be used to determine which HOOPS object is selectable, whether it be the nearest piece of geometry or the nearest piece of geometry's owning segment.  By default, the color of the selected geometry is changed to white (or "highlighted"). 
 

2.7 Moving Geometry

Two operators are provided for moving objects around the scene:

You can either move an object around in the view plane or rotate an object about its centroid.  If the shift key is held down while geometry is translated, the selected geometry will be moved in the plane orthogonal to the viewport.  Both operators operate on objects in the selection list and work only when the selected objects are segments (you control the selection level with the right click menu).  The translate operator is designed to work independent of the size of the selection set.  However, the rotate operator is designed to work specifically when there is only one object in the active view's selection set.

2.8 Model Annotation

The model annotation operator allows you to associate text strings with geometry in the scene.  To  annotate geometry simply click on the piece of geometry you want to annotate, then click where you want the text string to appear and begin entering the text string.  The text string can be terminated by either hitting carriage return, loading a new operator or clicking on a new object for annotation.  Choice of the text font and its transformation characteristics are controlled by the right click menu.
 

2.9 Querying the Model

The query operator is a modal operator associated with the view, and is selected via the pulldown menus or by toggling the appropriate menu button. Once selected, the mouse may be used to interactively query the HOOPS model. The first time the left mouse button is pressed while in the view (and over a HOOPS model) a dialog window is created and displays the following information: 

Moving the mouse around the scene with the mouse depressed will cause the information to be updated in realtime. 
 

2.10 Setting Visibility of Geometry in the Scene

The application makes use of the "right click" user interface to provide a mechanism for controlling the visibility and selectability of the entities in the scene. Positioning the mouse in the view window and pressing the right mouse button invokes a floating menu bar. Via this menu you can toggle on/off the visibility settings for edges, lines, faces, lights, grids, text, cutting planes, capping lines and hidden lines (if appropriate).
 

2.11 Changing the Render Mode

You can also control the render mode for the scene via the "right click" mouse button.  There are 6 different rendering modes provided for viewing models. 

On startup, the default rendering mode is Smooth Shading. Please note that the True Analytic Hidden Line algorithm is computationally intensive and for large models may take several seconds.  Visibility of the hidden lines is controlled by the Visibility right click menu. 

In order for Color Interpolation to have any visual effect some of the geometry in the scene must have analysis information mapped to its vertices.  Some example metafiles which contain such information, such as urn.hmf, are shipped with the HOOPS distribution.  Some additional logic, written for the QtHoops application, maps sample data to the vertices of all the shells in the scene.  This logic is invoked via the View/Compute Sample Data menu.
 

2.12 Changing the Viewing Projection

By default the scene is rendered with a perspective viewing projection, you can change this to an orthographic viewing projection via the View menu.
 

2.13 Deleting Objects from the View

You can delete all the objects in the active view's selection list via the Selection menu.
 

2.14 Level Of Detail

The Hoops Reference Application contains an operator which enables end-users to turn on the new Level Of Detail (LOD) module in HOOPS.  When LOD is turned on, HOOPS iteratively searches through each shell/mesh in the scene and generates several different simplified models for each shell/mesh.  Depending on the complexity and size of the shells in the scene this may take several seconds.  Once the Levels Of Detail are generated, HOOPS will then use its dynamic loading logic to make decisions based on the LOD options set in the scene.  These options are controlled by the "LOD options" portion of the HOOPS Rendering Options.  They allow the developer to control which level of detail is sent to the rendering pipeline, depending on the screen space size of the shell.

A slider bar is also available that allows the user to control the rendering of simplified LOD-generated shells.  The bar will appear when LOD is activated under the View/Level of Detail Options menu.  Moving the bar will increase or decrease the "threshold" of the LOD rendering process.  This number directly maps to the maximum number of triangles per sq. cm for each shell.  Consequently, a low number will cause the most coarse level of detail to be loaded into the view.  To visualize the differences it is often best to turn off light interpolation in the scene (i.e. turn the render mode to Flat Shading)  

2.15 Performance Testing

An animate button is available under the View menu.  This enables you to test the capability of HOOPS to render user-supplied metafiles.  When executed, the frame rate and the number of triangles drawn per second are returned to the user.  

2.16 Display Lists

From the View menu the display list driver option can be activated.  This option only has an effect when using the OpenGL driver and typically only causes a performance increase when the system has dedicated OpenGL hardware.  A known limitation of display lists is that it does not support two-sided lighting.  Consequently there are two extra buttons in the View menu which allow you to specify the handedness of the geometry in the scene.

2.17 Segment Browser

The segment browser is activated by selecting the Segment Browser item from the Tools menu. It will split the main window into two frames, with the HOOPS view frame in the right window pane, and the segment browser occupying the left window pane. This tool allows the user to explore the segments and attributes of the HOOPS scene graph they are viewing.