Choreonoid  1.8
GL1SceneRenderer.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BASE_GL1_SCENE_RENDERER_H
7 #define CNOID_BASE_GL1_SCENE_RENDERER_H
8 
9 #include <cnoid/GLSceneRenderer>
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 class CNOID_EXPORT GL1SceneRenderer : public GLSceneRenderer
15 {
16 public:
17  GL1SceneRenderer(SgGroup* root = nullptr);
18  virtual ~GL1SceneRenderer();
19 
20  virtual void setOutputStream(std::ostream& os) override;
21  virtual PolymorphicSceneNodeFunctionSet* renderingFunctions() override;
22  virtual void renderCustomGroup(SgGroup* transform, std::function<void()> traverseFunction) override;
23  virtual void renderCustomTransform(SgTransform* transform, std::function<void()> traverseFunction) override;
24  virtual void renderNode(SgNode* node) override;
25  virtual void addNodeDecoration(SgNode* targetNode, NodeDecorationFunction func, int id) override;
26  virtual void clearNodeDecorations(int id) override;
27  virtual const Affine3& currentModelTransform() const override;
28  virtual const Matrix4& projectionMatrix() const override;
29  virtual double projectedPixelSizeRatio(const Vector3& position) const override;
30  virtual bool initializeGL() override;
31  virtual void flushGL() override;
32  virtual const std::string& glVendor() const override;
33  virtual void setViewport(int x, int y, int width, int height) override;
34 
35  virtual const Vector3& pickedPoint() const override;
36  virtual const SgNodePath& pickedNodePath() const override;
37  virtual bool isRenderingPickingImage() const override;
38 
39  virtual void setLightingMode(LightingMode mode) override;
40  virtual LightingMode lightingMode() const override;
41 
42  void setHeadLightLightingFromBackEnabled(bool on);
43  virtual void setDefaultSmoothShading(bool on) override;
44  virtual SgMaterial* defaultMaterial() override;
45  virtual void enableTexture(bool on) override;
46  virtual void setDefaultPointSize(double size) override;
47  virtual void setDefaultLineWidth(double width) override;
48 
49  virtual void showNormalVectors(double length) override;
50 
51  virtual void requestToClearResources() override;
52 
58  virtual void enableUnusedResourceCheck(bool on) override;
59 
60  virtual void setColor(const Vector3f& color) override;
61  virtual void setBackFaceCullingMode(int mode) override;
62  virtual int backFaceCullingMode() const override;
63 
64  protected:
65  virtual void doRender() override;
66  virtual bool doPick(int x, int y) override;
67 
68  private:
69  class Impl;
70  Impl* impl;
71 };
72 
73 }
74 
75 #endif
cnoid::SgTransform
Definition: SceneGraph.h:336
cnoid::Vector3
Eigen::Vector3d Vector3
Definition: EigenTypes.h:57
cnoid::GLSceneRenderer::LightingMode
LightingMode
Definition: GLSceneRenderer.h:74
cnoid::SgGroup
Definition: SceneGraph.h:220
cnoid::GL1SceneRenderer
Definition: GL1SceneRenderer.h:14
cnoid::GLSceneRenderer
Definition: GLSceneRenderer.h:16
cnoid::Matrix4
Eigen::Matrix4d Matrix4
Definition: EigenTypes.h:58
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::SceneRenderer::NodeDecorationFunction
std::function< SgNode *(SgNode *targetNode)> NodeDecorationFunction
Definition: SceneRenderer.h:42
cnoid::PolymorphicSceneNodeFunctionSet
Definition: PolymorphicSceneNodeFunctionSet.h:10
cnoid::SgNodePath
std::vector< SgNode * > SgNodePath
Definition: SceneGraph.h:24
cnoid::SgMaterial
Definition: SceneDrawables.h:18
cnoid::SgNode
Definition: SceneGraph.h:157
cnoid::Affine3
Eigen::Affine3d Affine3
Definition: EigenTypes.h:62