/
wmigor
/
z-plane
Обзор
Документация
Войти
/
wmigor
/
z-plane
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
app/src/AircraftDebugView.h
87 строк
2 KB
wmigor
Расчет аэродинмамических сил перенесе из AircraftPhysics в Wing, Thruster и Fuselage
10 июн 2026, 15:12
Верифицирован
10 июн 2026, 15:12
534021f
Код
Авторство
О чём код?
#pragma once #include "Aircraft.h" #include "AircraftGizmo.h" #include <osg/Geode> #include <osg/MatrixTransform> #include <osg/Switch> #include <osg/NodeCallback> #include <asim/Propeller.h> class AircraftDebugView : public osg::MatrixTransform { public: AircraftDebugView(Aircraft *aircraft); void switchMode(); private: osg::Geode *createDebugView(); osg::Geode *createWingDebugView(const asim::Wing *wing); void createWheels(); osg::PositionAttitudeTransform *createPropellerDebugView(const asim::Propeller *propeller); void createFuselages(); private: osg::ref_ptr<Aircraft> _aircraft; osg::ref_ptr<AircraftGizmo> _gizmo; osg::ref_ptr<osg::Geode> _debugView; int _mode = 0; }; class ControlSurfaceCallback : public osg::NodeCallback { public: ControlSurfaceCallback(const asim::Wing::Element *element, const osg::Vec3d &axis); void operator()(osg::Node *node, osg::NodeVisitor *nv) override; private: const asim::Wing::Element *_element; osg::Vec3d _axis; }; class ThrusterCallback : public osg::NodeCallback { public: ThrusterCallback(const asim::Thruster *thruster); void operator()(osg::Node *node, osg::NodeVisitor *nv) override; private: const asim::Thruster *_thruster; }; class ElementColorCallback : public osg::NodeCallback { public: virtual ~ElementColorCallback() {} virtual int getState() const = 0; void operator()(osg::Node *node, osg::NodeVisitor *nv) override; private: int _state = 0; }; class WingElementColorCallback : public ElementColorCallback { public: WingElementColorCallback(const asim::Wing::Element *element); int getState() const override; private: const asim::Wing::Element *_element; }; class PropellerElementColorCallback : public ElementColorCallback { public: PropellerElementColorCallback(const asim::Propeller::Element *element); int getState() const override; private: const asim::Propeller::Element *_element; };