FunnelVision

Programmer Documentation

 

Masado Ishii

Last change 07/28/2017

Table of Contents

Introduction

Source Files Summary

Classes and Identifiers Summary (by File)

asynchronous.h

scenemapper.h

meshobject.h

mesh.h

utility.h

 

Introduction

This document summarizes code dependencies, the contents of the source files, and the purposes thereof.

Source Files Summary

Header files (.h) are in funnel-vision/include; implementation files (.cxx) are in
funnel-vision/src.

File(s)

Objects Defined

Description

main.cxx

  • main 

Instantiates and hooks up components of the VTK pipeline, including the custom vtk441MapperMishii. Configures event loop and keyboard input capture. Affects the GL configuration, such as the presence of the stencil buffer.

Depends on asynchronous.h, scenemapper.h, and VTK api.

asynchronous.h &
asynchronous.cxx

  • vtkTimerCallback 

  • KeypressCallbackFunction 

Details of the keyboard capture and timer callbacks that can hook into the VTK pipeline.

Depends on scenemapper.h and VTK api.

scenemapper.h &
scenemapper.cxx

  • vtk441Mapper 

  • vtk441MapperMishii 

Initialization of the GL environment; definitions of scene and animations.

Depends on mesh.h, meshobject.h, and vtkOpenGLPolyDataMapper.h

meshobject.h &
meshobject.cxx

  • MeshObject 

  • PortalObject 

  • MeshObjList 

Base types for drawable objects having spatial transform.

Depends on mesh.h, utility.h, and <list>
(C++ standard library)

mesh.h &
mesh.cxx

  • Mesh 

  • PolygonMesh 

  • DisplayListMesh 

Implementations of drawables.

Depends on <GL/gl.h>

utility.h &
utility.cxx

  • glm_mishii_matrix_transforms 

  • mishii_PrintMatrix 

Miscellaneous conveniences, such as debug helper routines and namespace translations.

Depends on glm headers (OpenGL Math)

 

Classes and Identifiers Summary (by File)

asynchronous.h

vtkTimerCallback (class): A derivative of vtkCommand which stores pointers to a mapper, a renderwindow, and a camera, to be used when the Execute() method is called. This particular incarnation invokes the AdvanceAnimation() method of the mapper (vtk441Mapper) and forces a render from the renderwindow.

KeypressCallbackFunction (procedure): Assuming the first argument `caller' (vtkObject) is a vtkRenderWindowInteractor, retrieves the key just pressed. Currently nothing is done with this key press except print it to the screen.

scenemapper.h

vtk441Mapper (class): A derivative of vtkOpenGLPolyDataMapper and a superclass for vtk441MapperMishii, this class contains methods to initialize the GL material and lighting states. Also specifies the AdvanceAnimation interface. [Note: This class has extraneous members and should be consolidated with vtk441MapperMishii into a single mapper.]

vtk441MapperMishii (class): A derivative of vtk441Mapper in order to inherit the GL material and lighting initializers. Initializes a scene. RenderPiece() invokes the GL state initializers from vtk441Mapper, and draws the scene. Overrides vtk441Mapper::AdvanceAnimation().

meshobject.h

MeshObject (class): Carries a model matrix and a pointer to a mesh. Defines how to apply the model matrix when drawing the mesh. The static method DrawList() draws each of the MeshObjects in the provided list.

PortalObject (class): A derivative of MeshObject. Needs a pointer to the conjugal portal and a pointer to the containing scene (MeshObjList). Overrides MeshObject::Draw() so that the portal "surface" is replaced by an appropriately-transformed view of the scene.

MeshObjList (class): An abbreviation for std::list<MeshObject *>.

mesh.h

Mesh (class): An abstract class which represents the drawable interface, Draw().

PolygonMesh (class): [Not yet implemented] Reads and stores polygon data. Implements Mesh::Draw(), translating polygon data into OpenGL calls.

DisplayListMesh (class): A wrapper for a reference (GLuint) to an OpenGL display list. Implements Mesh::Draw(), simply calling the display list.

utility.h

glm_mishii_matrix_transforms (namespace): A handful of glm identifiers are imported into this conspicuous namespace. It enables the statement `using glm_mishii_matrix_transforms', which brings this small selection of identifiers into the desired scope.

mishii_PrintMatrix (procedure): A routine to print floating-point matrices neatly.