
                   INSTRUCTIONS FOR FLUID


1. INSTALLATION IN A NUTSHELL (for Linux)

- If you want to use Fluid with VRJuggler then you need to specify
  VJ_BASE_DIR before compiling the wrapper code.

- If you want to use the mouse or keyboard drivers you need to install
  Qt before compiling the plugins and set environment variable QTDIR.

- If you want to use the 5DT data gloves, you need to install the 5DT
  development files (fglove.h and libfglove.so) before compiling the
  plugin.

In your shell run the following commands:

cd src
source setenvironment.linux.sh
./init.sh
./configure
make links
make -k

echo $FLUID_ROOT
echo $FLUID_PLATFORM


2. COMPILING AGAINST FLUID

You need to include the headers as usual: #include <FLuid/Config.hpp>
and add the include path to the copilation command: 

g++ -I$(FLUIT_ROOT)/include/ my_file.cpp -c -o my_file.o

And also in the link phase:

g++ -L$(FLUIT_ROOT)/lib/$(FLUID_PLATFORM) -lFluid my_file.o -o my_app


3. USING IT IN YOU APPS

Your application is expected to have following parts:

  1. Configuration
     - Fluid::Config::Init("config-file");
     - Fluid::InpurDevices::Init("config-file");
     - Get devices with Fluid::InutDevices::getInputDevice("tracker1");
     - Build processor collections

  2. Start operation
     - Fluid::InputDevices::start();

  3. Operate
     - Fluid::InputDevices::update();
     - Update also the processing layers if you use them.

  4. Stop Operation
     - Fluid::InputDevices::stop();
     - Also stop your processor colelction if you use them

  5. Free all resources
     - Fluid::InputDevices::cleanup();
     - Fluid::Config::cleanup();


4. Running apps that depend on Fluid

You must have the environment variables FLUIT_ROOT and FLUID_PLATFORM
set for Fluid to work properly (Fluid uses these variables to find the
input driver plugins).

Start your app and enjoy.