banner
home projects publications facilities people internal resources
logo
 
Haptic Video Editor :: gtkClient
 

Table of Contents:
- Summary
- About Components

Summary

GtkClient is a gui haptic controller to Kino-mod.

gtkclientsketch.png

A rough modular sketch of the program

The program is a mix of C and C++, but for the most part functionality associated with a given window is in one header and implementation (.c or .cc) file. The only exceptions are the glade generated files (callbacks.c, interface.c interface.h).

The commands object is the part that maintains the connection to the CORBA server in kino-mod.

About Components

The model implementation in gtkClient is based around the idea of simple components. Components are simple pieces of a model, a spring (SpringComponent) for example, that can be connected to create a more complex model of data flow and physical interaction. Using the Component object class allows for simplification of the GUI that sets the parameters of each component while the program is running.

The Component base class and most components are defined in components.h and implemented in components.cc . The PropertiesViewer class creates a window to edit Component parameters from.

For example we could build a model like this:

springdetetmodel.png

In this model the knob position is the only input. It is sent to a ShuttleComponent, which uses the position to set the speed of playback, a SpringComponent and a DetentsComponent. With the right parameter values in spring, detents and mixer we get a knob that pushes towards zero speed, but has near flat spots at integer multiples of full speed.

The resulting output force looks like this:

forcegraph.png

Force

The actual force output is limited to +-1.

The current default model looks like this:

currentmodel.png

Current Default Model

The real changes in the current model are the addition of the AnnotationComponent and the ClipsComponent. The TimeComponent and others are used to make the buzzes associated with passing over a clip bound or a annotation mark. A TimeComponent connected to a DetentsComponent will give us a sinusoidal output based on time.

A model can be saved to a text file and loaded again later.

The file format for a model is:

<number of Component s>
<Component name>
<Component ID>
<number of Parameters>
<Parameter name> <value>
<number of children (nodes linked to)>
<child ID> <child input name> <output name>

There can be 0-n Component s with 0-n parameters and 0-n children.

An example file containing just an input and output device is:

2
DeviceInput
1
1
null 0
1
2 force position
DeviceOutput
2
1
force 0
0

A graphical representation of this model is:

simplemodel.png

Simple Model

 

 


Last Updated On:
September 25, 2003 4:08 PM