/ArborisViewer

A 3d scene viewer for the arboris simulator, and other uses

Primary LanguageC++

ArborisViewer

ArborisViewer is 3d viewer based on OpenSceneGraph (OSG). It reads trajectories from HDF5 files and animates the scene accordingly.

Development status

The project is currently ABANDONED in favor of dænim. If you came here looking for the viewer to use with arboris, it is dænim.

Install & Test

On Ubuntu Karmic

Prerequisites:

sudo aptitude install cmake
sudo aptitude install libopenscenegraph-dev \
libboost-program-options-dev zlib1g-dev

Build:

cd ArborisViewer
mkdir build
cd build
cmake ..
make
Test::
bin/test_avreader bin/arborisviewer ../data/simplearm.h5 /

Content

cmake:Helper files for cmake
data:Example data, useful for tests
hdf5:The vanilla HDF5 library, downloaded from their website
src:The source code of the libray, the main executable and the tests
szip:The vanilla szip library

Inner workings

This software does 3 things:

  1. get the trajectories data
  2. setup a 3d scene
  3. animate the scene

Getting trajectories data

We define two pure virtual reader classes: RandomReader and LastReader. The former can acces the position at any point in time, the later can only access the latest position.

The two classes H5RandomReader and H5LastReader get their data from HDF5 files and implement these interfaces.

Setting up a 3d scene

It's the SceneFactory class responsability to set up the scene. Its init_scene method returns a SceneTransforms object which has mappings between scene object names and the corresponding OSG transforms

Animating the scene

The main executable (arborisviewer) intializes a scene, a reader then updates the scene with the data it gets from the reader.

We use...