gepetto-viewer 6.0.0
An user-friendly Graphical Interface
Loading...
Searching...
No Matches
leaf-node-cylinder.h
Go to the documentation of this file.
1//
2// leaf-node-cylinder.h
3// gepetto-viewer
4//
5// Created by Justin Carpentier, Mathieu Geisert November 2014.
6// Copyright (c) 2014 LAAS-CNRS. All rights reserved.
7//
8
9#ifndef GEPETTO_VIEWER_LEAFNODECYLINDER_HH
10#define GEPETTO_VIEWER_LEAFNODECYLINDER_HH
11
13
14namespace gepetto {
15namespace viewer {
16DEF_CLASS_SMART_PTR(LeafNodeCylinder)
17
18
20 private:
22 LeafNodeCylinderWeakPtr weak_ptr_;
23
25 ::osg::CylinderRefPtr cylinder_ptr_;
26
27 void init();
28
29 /* Default constructor */
30 LeafNodeCylinder(const std::string &name, const float &radius,
31 const float &height);
32 LeafNodeCylinder(const std::string &name, const float &radius,
33 const float &height, const osgVector4 &color);
34
35 /* Copy constructor */
37
39 void initWeakPtr(LeafNodeCylinderWeakPtr other_weak_ptr);
40
41 protected:
42 public:
45 static LeafNodeCylinderPtr_t create(const std::string &name,
46 const float &radius, const float &height);
47 static LeafNodeCylinderPtr_t create(const std::string &name,
48 const float &radius, const float &height,
49 const osgVector4 &color);
50
53 static LeafNodeCylinderPtr_t createCopy(LeafNodeCylinderPtr_t other);
54
57 virtual LeafNodeCylinderPtr_t clone(void) const;
58
62 virtual NodePtr_t copy() const { return clone(); }
63
66 LeafNodeCylinderPtr_t self(void) const;
67
71 void setRadius(const float &radius);
72
73 float getRadius() const { return cylinder_ptr_->getRadius(); }
74
78 void setHeight(const float &height);
79
80 float getHeight() const { return cylinder_ptr_->getHeight(); }
81
83
86};
87} /* namespace viewer */
88} /* namespace gepetto */
89
90#endif /* GEPETTO_VIEWER_LEAFNODECYLINDER_HH */
Definition leaf-node-cylinder.h:19
SCENE_VIEWER_ACCEPT_VISITOR
Definition leaf-node-cylinder.h:82
static LeafNodeCylinderPtr_t create(const std::string &name, const float &radius, const float &height)
static LeafNodeCylinderPtr_t createCopy(LeafNodeCylinderPtr_t other)
virtual LeafNodeCylinderPtr_t clone(void) const
float getRadius() const
Definition leaf-node-cylinder.h:73
void setHeight(const float &height)
LeafNodeCylinderPtr_t self(void) const
void setRadius(const float &radius)
virtual NodePtr_t copy() const
Proceed to a copy of the currend object as clone.
Definition leaf-node-cylinder.h:62
float getHeight() const
Definition leaf-node-cylinder.h:80
static LeafNodeCylinderPtr_t create(const std::string &name, const float &radius, const float &height, const osgVector4 &color)
Definition node-drawable.h:19
::osg::Vec4f osgVector4
Definition config-osg.h:100
#define DEF_CLASS_SMART_PTR(className)
Definition macros.h:51
Definition action-search-bar.hh:27