leaf-node-light.h
Go to the documentation of this file.
1 //
2 // leaf-node-light.h
3 // gepetto-viewer
4 //
5 // Created by Joseph Mirabel in July 2015.
6 // Copyright (c) 2015 LAAS-CNRS. All rights reserved.
7 //
8 
9 #ifndef GEPETTO_VIEWER_LEAFNODELIGHT_HH
10 #define GEPETTO_VIEWER_LEAFNODELIGHT_HH
11 
14 
15 namespace gepetto {
16 namespace viewer {
17  DEF_CLASS_SMART_PTR(LeafNodeLight)
18 
19 
21  {
22  private:
24  LeafNodeLightWeakPtr weak_ptr_;
25 
27  ::osg::LightSourceRefPtr light_ptr_;
28 
29  void init();
30 
31  /* Default constructor */
32  LeafNodeLight(const std::string& name, const float& radius);
33  LeafNodeLight(const std::string& name, const float& radius, const osgVector4& color);
34 
35  /* Copy constructor */
36  LeafNodeLight(const std::string& name, const LeafNodeLight& other);
37 
39  void initWeakPtr (LeafNodeLightWeakPtr other_weak_ptr);
40 
41  static int uniqueLightNumber;
42 
43  protected:
44  public:
47  static LeafNodeLightPtr_t create(const std::string& name, const float &radius);
48  static LeafNodeLightPtr_t create(const std::string& name, const float &radius, const osgVector4& color);
49 
52  static LeafNodeLightPtr_t createCopy(LeafNodeLightPtr_t other);
53 
56  LeafNodeLightPtr_t clone(void) const;
57 
61  LeafNodeLightPtr_t copy() const { return clone(); }
62 
65  LeafNodeLightPtr_t self(void) const;
66 
68  virtual void setColor (const osgVector4& color);
69 
70  void setRoot (GroupNodePtr_t root);
71 
73 
75  virtual ~LeafNodeLight();
76 
77  };
78 } /* namespace viewer */
79 } /* namespace gepetto */
80 
81 #endif /* GEPETTO_VIEWER_LEAFNODELIGHT_HH */
::osg::Vec4f osgVector4
Definition: config-osg.h:110
Definition: leaf-node-light.h:20
LeafNodeLightPtr_t copy() const
Proceed to a copy of the currend object as clone.
Definition: leaf-node-light.h:61
Definition: action-search-bar.hh:27
viewer::GroupNodePtr_t GroupNodePtr_t
Definition: fwd.hh:50
SCENE_VIEWER_ACCEPT_VISITOR
Definition: leaf-node-light.h:72
Definition: leaf-node-sphere.h:19
#define DEF_CLASS_SMART_PTR(className)
Definition: macros.h:50