source: flair-src/trunk/lib/FlairSimulator/src/unexported/Model_impl.h

Last change on this file was 361, checked in by Sanahuja Guillaume, 20 months ago

add ball for Julio

File size: 2.7 KB
RevLine 
[10]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[10]4// %flair:license}
[8]5// created: 2013/03/25
6// filename: Model_impl.h
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: classe definissant un modele a simuler
14//
15/*********************************************************************/
16
17#ifndef MODEL_IMPL_H
18#define MODEL_IMPL_H
19
20#include <Thread.h>
21#include <vrpn_Tracker.h>
22#include "Model.h"
23#include "Quaternion.h"
24
[15]25namespace flair {
26namespace core {
[214]27class Matrix;
[15]28class Mutex;
29class ConditionVariable;
[8]30}
[15]31namespace gui {
32class TabWidget;
33class CheckBox;
34class DoubleSpinBox;
35class SpinBox;
36class Vector3DSpinBox;
37}
38namespace simulator {
39class Simulator;
[69]40class FollowMeCamera;
[15]41}
42}
[8]43
44#ifdef GL
45#include <Vector3D.h>
46#include <IMeshSceneNode.h>
47
[15]48namespace irr {
49namespace scene {
50class ISceneManager;
51class ITriangleSelector;
52class IMetaTriangleSelector;
53class ISceneNodeAnimatorCollisionResponse;
[8]54}
[15]55}
[8]56#endif
57
58#ifdef GL
[15]59class Model_impl : public irr::scene::ISceneNode,
60 public flair::core::Thread,
61 private vrpn_Tracker
[8]62#else
[15]63class Model_impl : public flair::core::Thread,
64 private vrpn_Tracker
[8]65#endif
[15]66 {
67public:
[158]68 Model_impl(flair::simulator::Model *self, std::string name,uint32_t modelId);
[15]69 ~Model_impl();
[8]70
71#ifdef GL
[15]72 void OnRegisterSceneNode(void);
73 void render(void);
[8]74
[15]75 const irr::core::aabbox3d<irr::f32> &getBoundingBox(void) const {
76 return box;
77 }
78 void UpdatePos(void);
79 void CheckCollision(void);
80 irr::scene::ITriangleSelector *TriangleSelector(void);
81 irr::scene::IMetaTriangleSelector *MetaTriangleSelector(void);
82 irr::core::aabbox3d<irr::f32> box;
83 void SynchronizationPoint();
[69]84 flair::simulator::FollowMeCamera *camera;
[15]85 irr::scene::ITriangleSelector *selector;
[8]86#endif
[15]87 void mainloop(void);
[8]88
[15]89 flair::gui::TabWidget *tabwidget;
90 flair::gui::DoubleSpinBox *dT;
[158]91 int modelId;
[361]92 flair::gui::Vector3DSpinBox *pos_init;
[8]93
[15]94private:
95 flair::gui::SpinBox *yaw_init;
96 flair::gui::CheckBox *enable_opti;
97 flair::simulator::Model *self;
[214]98 flair::core::Matrix *output;
[15]99 flair::core::Mutex *states_mutex;
[8]100
[15]101 void Run(void);
102 flair::core::Quaternion ComputeInitRotation(flair::core::Quaternion quat_in);
[8]103#ifdef GL
[15]104 void CollisionHandler(void);
[8]105
[15]106 irr::scene::IMetaTriangleSelector *meta_selector;
107 irr::scene::ISceneNodeAnimatorCollisionResponse *anim;
[8]108
[15]109 bool position_init;
[8]110
[15]111 flair::core::ConditionVariable *cond;
112 int sync_count;
[8]113
[15]114 flair::core::Mutex *collision_mutex;
115 bool collision_occured;
[167]116 flair::core::Vector3D<double> collision_point;
[8]117#endif
118};
119
120#endif // MODEL_IMPL_H
Note: See TracBrowser for help on using the repository browser.