-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnode.h
61 lines (46 loc) · 1.47 KB
/
node.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
#include <eq/eq.h>
#include "frameData.h"
#include "viewer.h"
#include "channel.h"
#include <osgGA/GUIEventHandler>
#include <osgViewer/Renderer>
namespace eqEarth
{
class Node final : public eq::Node
{
public:
explicit Node( eq::Config* parent );
protected:
virtual ~Node( );
public:
const FrameData& getFrameData( ) const { return _frameData; }
void addGraphicsContext( osg::GraphicsContext* context );
void removeGraphicsContext( osg::GraphicsContext* context );
void addCameraToOSGView( const eq::uint128_t& id, osg::Camera* camera );
void removeCameraFromOSGView( const eq::uint128_t& id,
osg::Camera* camera );
#if 0
CompositeViewer *getViewer( ) { return _viewer; }
const CompositeViewer *getViewer( ) const { return _viewer; }
#endif
protected:
virtual bool configInit( const eq::uint128_t& initID ) override;
virtual bool configExit( ) override;
virtual void frameStart( const eq::uint128_t& frameID,
const uint32_t frameNumber ) override;
virtual void frameFinish( const eq::uint128_t& frameID,
const uint32_t frameNumber ) override;
virtual void frameDrawFinish( const eq::uint128_t& frameID,
const uint32_t frameNumber ) override;
private:
void cleanup( );
protected:
FrameData _frameData;
uint32_t _frameNumber;
mutable std::mutex _viewer_lock;
osg::ref_ptr< CompositeViewer > _viewer;
public:
void renderLocked( osgViewer::Renderer* renderer ) const;
};
}