gramods
OsgRenderer.hh
1 
2 #ifndef GRAMODS_GRAPHICS_OSGRENDERER
3 #define GRAMODS_GRAPHICS_OSGRENDERER
4 
5 #include <gmGraphics/Renderer.hh>
6 
7 #ifdef gramods_ENABLE_OpenSceneGraph
8 
9 #include <gmCore/Updateable.hh>
10 
11 namespace osg {
12  class Node;
13 }
14 
15 BEGIN_NAMESPACE_GMGRAPHICS;
16 
21  : public Renderer,
22  public gmCore::Updateable {
23 
24 public:
25 
26  OsgRenderer();
27  ~OsgRenderer();
28 
34  void setFrameNumber(unsigned int n);
35 
39  void render(const Camera &camera, const Eigen::Affine3f &Mm) override;
40 
44  void getNearFar(const Camera &camera,
45  const Eigen::Affine3f &Mm,
46  float &near,
47  float &far) override;
48 
52  void setSceneData(osg::Node *node);
53 
57  void update(clock::time_point time, size_t frame) override;
58 
59 private:
60  struct Impl;
61  std::unique_ptr<Impl> _impl;
62 };
63 
64 END_NAMESPACE_GMGRAPHICS;
65 
66 #endif
67 #endif
The Updateable class defines an interface for objects that may be updated, for example each execution...
Definition: Updateable.hh:18
The base of graphics Camera implementations.
Definition: Camera.hh:19
A renderer that renders an OpenSceneGraph scenegraph.
Definition: OsgRenderer.hh:22
The base of graphics Renderer implementations.
Definition: Renderer.hh:17
Definition: OsgRenderer.cpp:11