gepetto-viewer 6.0.0
An user-friendly Graphical Interface
Loading...
Searching...
No Matches
leaf-node-xyzaxis.h
Go to the documentation of this file.
1//
2// leaf-node-xyzaxis.h
3// gepetto-viewer
4//
5// Created by Justin Carpentier, Mathieu Geisert, Pierre Fernbach in avril
6// 2015. Copyright (c) 2014 LAAS-CNRS. All rights reserved
7//
8
9#ifndef GEPETTO_VIEWER_LEAFNODEXYZ_HH
10#define GEPETTO_VIEWER_LEAFNODEXYZ_HH
11
13
14#include <osgDB/ReadFile>
15
16namespace gepetto {
17namespace viewer {
18
19DEF_CLASS_SMART_PTR(LeafNodeXYZAxis)
20
21
23 private:
25 LeafNodeXYZAxisWeakPtr weak_ptr_;
26
28 float radius_;
29 ::osg::SphereRefPtr sphere_ptr_;
30
32 float sizeAxis_;
34 ::osg::Vec4ArrayRefPtr color_ptr_;
35
36 void init();
37
38 /* Default constructor */
39 LeafNodeXYZAxis(const std::string& name, const osgVector4& color,
40 float radiusCenter, float sizeAxis);
41
42 /* Copy constructor */
43 LeafNodeXYZAxis(const LeafNodeXYZAxis& other);
44
46 void initWeakPtr(LeafNodeXYZAxisWeakPtr other_weak_ptr);
47
48 protected:
49 public:
50 void addVertex(const osgVector3& vertex);
54 static LeafNodeXYZAxisPtr_t create(const std::string& name,
55 const osgVector4& color,
56 float radiusCenter, float sizeAxis);
57 static LeafNodeXYZAxisPtr_t create(const std::string& name,
58 const osgVector4& color,
59 float radiusCenter);
60
63 static LeafNodeXYZAxisPtr_t createCopy(LeafNodeXYZAxisPtr_t other);
64
67 virtual LeafNodeXYZAxisPtr_t clone(void) const;
68
72 virtual NodePtr_t copy() const { return clone(); }
73
76 LeafNodeXYZAxisPtr_t self(void) const;
77
78 // set color
79 float getRadius() const;
80 void setRadius(const float& radius);
81 void setSizeAxis(const float& sizeAxis);
82 float getSizeAxis() const;
83
85
88};
89} /* namespace viewer */
90} /* namespace gepetto */
91
92#endif /* GEPETTO_VIEWER_LEAFNODEXYZAXIS_HH */
Definition leaf-node-xyzaxis.h:22
static LeafNodeXYZAxisPtr_t create(const std::string &name, const osgVector4 &color, float radiusCenter, float sizeAxis)
SCENE_VIEWER_ACCEPT_VISITOR
Definition leaf-node-xyzaxis.h:84
LeafNodeXYZAxisPtr_t self(void) const
void setSizeAxis(const float &sizeAxis)
static LeafNodeXYZAxisPtr_t create(const std::string &name, const osgVector4 &color, float radiusCenter)
void addVertex(const osgVector3 &vertex)
void setRadius(const float &radius)
virtual NodePtr_t copy() const
Proceed to a copy of the currend object as clone.
Definition leaf-node-xyzaxis.h:72
static LeafNodeXYZAxisPtr_t createCopy(LeafNodeXYZAxisPtr_t other)
virtual LeafNodeXYZAxisPtr_t clone(void) const
Definition node-drawable.h:19
::osg::Vec3f osgVector3
Definition config-osg.h:99
::osg::Vec4f osgVector4
Definition config-osg.h:100
#define DEF_CLASS_SMART_PTR(className)
Definition macros.h:51
Definition action-search-bar.hh:27