/***************************************************************************
                          barrier.h  -  description
                             -------------------
    begin                : Mit Sep 25 13:11:41 CEST 2002
    copyright            : (C) 2002 by Harald Krippel
    email                : neuro.harald@surfeu.at
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef BARRIER_H
#define BARRIER_H


// plib
#include <plib/ssg.h>
#include <plib/js.h>
// ODE
#include <ode/ode.h>

#include "globdefines.h"

class Barrier
{
   public:
     Barrier(void);

     void   createOdeBody(dWorldID odworld, dSpaceID odspace);
     void   update(ssgRoot *scene, float dt);
     void   setTransform (ssgTransform *objtrans, const dReal pos[3], const dReal R[12],dVector3 dxyz);
     void   SetPosition ();
     void   GetPosition ( sgCoord  *bodypos );
     void   Rotation (float h, float p, float r);
     ~Barrier(void);

   sgCoord      pos;
   ssgTransform *objtrans[MAX_BARRIER_OBJ];
   ssgTransform *boxobjtrans;
      
    /* ode */
    dGeomID odbox[MAX_BARRIER_OBJ];
  
protected:

};

#endif
