SystemContainer.h 2.38 KB
Newer Older
1 2 3 4 5 6
#ifndef SYSTEMCONTAINER_H
#define SYSTEMCONTAINER_H

#include <osg/Geode>
#include <QMap>
#include <QVarLengthArray>
7
#include <QVector3D>
8 9 10 11 12 13
#include <QVector4D>

#include "ImageWindowGeode.h"
#include "WaypointGroupNode.h"

#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
14
#include "GLOverlayGeode.h"
15 16 17 18 19 20 21 22
#include "ObstacleGroupNode.h"
#endif

class SystemContainer
{
public:
    SystemContainer();

23 24
    QVector3D& gpsLocalOrigin(void);

25 26 27 28 29 30 31 32 33 34
    QVector4D& target(void);

    QVector< osg::ref_ptr<osg::Node> >& models(void);

    QMap<int, QVector<osg::Vec3d> >& trailMap(void);
    QMap<int, int>& trailIndexMap(void);

    osg::ref_ptr<ImageWindowGeode>& depthImageNode(void);
    osg::ref_ptr<osg::Geode>& localGridNode(void);
    osg::ref_ptr<osg::Node>& modelNode(void);
35
    osg::ref_ptr<osg::Group>& orientationNode(void);
36 37
    osg::ref_ptr<osg::Geode>& pointCloudNode(void);
    osg::ref_ptr<ImageWindowGeode>& rgbImageNode(void);
38
    osg::ref_ptr<osg::Group>& setpointGroupNode(void);
39 40 41 42 43
    osg::ref_ptr<osg::Node>& targetNode(void);
    osg::ref_ptr<osg::Geode>& trailNode(void);
    osg::ref_ptr<WaypointGroupNode>& waypointGroupNode(void);
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
    osg::ref_ptr<ObstacleGroupNode>& obstacleGroupNode(void);
44
    QMap<QString,osg::ref_ptr<GLOverlayGeode> >& overlayNodeMap(void);
45 46 47 48
    osg::ref_ptr<osg::Geode>& plannedPathNode(void);
#endif

private:
49
    QVector3D mGPSLocalOrigin;
50 51 52 53 54 55 56 57 58 59 60 61
    QVector4D mTarget;

    QVector< osg::ref_ptr<osg::Node> > mModels;

    // map component id to component-specific trail
    QMap<int, QVector<osg::Vec3d> > mTrailMap;
    QMap<int, int> mTrailIndexMap;

    // osg structures
    osg::ref_ptr<ImageWindowGeode> mDepthImageNode;
    osg::ref_ptr<osg::Geode> mLocalGridNode;
    osg::ref_ptr<osg::Node> mModelNode;
62
    osg::ref_ptr<osg::Group> mOrientationNode;
63 64
    osg::ref_ptr<osg::Geode> mPointCloudNode;
    osg::ref_ptr<ImageWindowGeode> mRGBImageNode;
65
    osg::ref_ptr<osg::Group> mSetpointGroupNode;
66 67 68 69 70
    osg::ref_ptr<osg::Node> mTargetNode;
    osg::ref_ptr<osg::Geode> mTrailNode;
    osg::ref_ptr<WaypointGroupNode> mWaypointGroupNode;
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
    osg::ref_ptr<ObstacleGroupNode> mObstacleGroupNode;
71
    QMap<QString,osg::ref_ptr<GLOverlayGeode> > mOverlayNodeMap;
72 73 74 75 76
    osg::ref_ptr<osg::Geode> mPlannedPathNode;
#endif
};

#endif // SYSTEMCONTAINER_H