[286] | 1 | // %flair:license{
|
---|
| 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
| 4 | // %flair:license}
|
---|
| 5 | // created: 2018/12/11
|
---|
| 6 | // filename: UavVrpnObject_impl.h
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: uav vrpn object, can display a real vrpn object in a simulated environment
|
---|
| 14 | //
|
---|
| 15 | /*********************************************************************/
|
---|
| 16 |
|
---|
| 17 | #ifndef UAVVRPNOBJECT_IMPL_H
|
---|
| 18 | #define UAVVRPNOBJECT_IMPL_H
|
---|
| 19 |
|
---|
| 20 | #ifdef GL
|
---|
| 21 |
|
---|
| 22 | #include <IODevice.h>
|
---|
| 23 | #include <IMeshSceneNode.h>
|
---|
| 24 |
|
---|
| 25 | namespace flair {
|
---|
| 26 | namespace gui {
|
---|
| 27 | class DoubleSpinBox;
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | namespace flair {
|
---|
| 32 | namespace simulator {
|
---|
| 33 | class Blade;
|
---|
| 34 | class UavVrpnObject;
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | class UavVrpnObject_impl : private flair::core::IODevice,
|
---|
| 39 | public irr::scene::ISceneNode {
|
---|
| 40 | public:
|
---|
| 41 | UavVrpnObject_impl(flair::simulator::UavVrpnObject *self,std::string name);
|
---|
| 42 | ~UavVrpnObject_impl();
|
---|
| 43 |
|
---|
| 44 | void Draw(void);
|
---|
| 45 |
|
---|
| 46 | const irr::core::aabbox3d<irr::f32> &getBoundingBox(void) const {
|
---|
| 47 | return box;
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | void render(void);
|
---|
| 51 |
|
---|
| 52 | private:
|
---|
| 53 | flair::simulator::Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
|
---|
| 54 | flair::gui::DoubleSpinBox *arm_length;
|
---|
| 55 | irr::core::aabbox3d<irr::f32> box;
|
---|
| 56 | void OnRegisterSceneNode(void);
|
---|
| 57 | flair::simulator::UavVrpnObject *self;
|
---|
| 58 |
|
---|
| 59 | /*!
|
---|
| 60 | * \brief Update using provided datas
|
---|
| 61 | *
|
---|
| 62 | * Reimplemented from IODevice.
|
---|
| 63 | *
|
---|
| 64 | * \param data data from the parent to process
|
---|
| 65 | */
|
---|
| 66 | void UpdateFrom(const flair::core::io_data *data);
|
---|
| 67 |
|
---|
| 68 | };
|
---|
| 69 |
|
---|
| 70 |
|
---|
| 71 | #endif // GL
|
---|
| 72 |
|
---|
| 73 | #endif // UAVVRPNOBJECT_IMPL_H
|
---|