gepetto-viewer 6.0.0
An user-friendly Graphical Interface
Loading...
Searching...
No Matches
leaf-node-capsule.h
Go to the documentation of this file.
1//
2// leaf-node-capsule.h
3// gepetto-viewer
4//
5// Created by Justin Carpentier, Mathieu Geisert in November 2014.
6// Copyright (c) 2014 LAAS-CNRS. All rights reserved.
7//
8
9#ifndef GEPETTO_VIEWER_LEAFNODECAPSULE_HH
10#define GEPETTO_VIEWER_LEAFNODECAPSULE_HH
11
13
14namespace gepetto {
15namespace viewer {
16DEF_CLASS_SMART_PTR(LeafNodeCapsule)
17
18
22 private:
24 LeafNodeCapsuleWeakPtr weak_ptr_;
26 ::osg::CapsuleRefPtr capsule_ptr_;
27
28 void init();
29
30 /* Default constructor */
31 LeafNodeCapsule(const std::string& name, const float& radius,
32 const float& height);
33 LeafNodeCapsule(const std::string& name, const float& radius,
34 const float& height, const osgVector4& color);
35
36 /* Copy constructor */
37 LeafNodeCapsule(const LeafNodeCapsule& other);
38
40 void initWeakPtr(LeafNodeCapsuleWeakPtr other_weak_ptr);
41
42 protected:
43 public:
46 static LeafNodeCapsulePtr_t create(const std::string& name,
47 const float& radius, const float& height);
48 static LeafNodeCapsulePtr_t create(const std::string& name,
49 const float& radius, const float& height,
50 const osgVector4& color);
51
54 static LeafNodeCapsulePtr_t createCopy(const LeafNodeCapsulePtr_t& other);
55
58 virtual LeafNodeCapsulePtr_t clone(void) const;
59
63 virtual LeafNodeCapsulePtr_t copy() const { return clone(); }
64
67 LeafNodeCapsulePtr_t self(void) const;
68
72 virtual void setRadius(const float& radius);
73
74 float getRadius() const { return capsule_ptr_->getRadius(); }
75
79 virtual void setHeight(const float& height);
80 float getHeight() const { return capsule_ptr_->getHeight(); }
81
83
86};
87} /* namespace viewer */
88} /* namespace gepetto */
89
90#endif /* GEPETTO_VIEWER_LEAFNODECAPSULE_HH */
Definition leaf-node-capsule.h:21
static LeafNodeCapsulePtr_t create(const std::string &name, const float &radius, const float &height)
float getRadius() const
Definition leaf-node-capsule.h:74
virtual void setRadius(const float &radius)
virtual void setHeight(const float &height)
virtual LeafNodeCapsulePtr_t copy() const
Proceed to a copy of the currend object as clone.
Definition leaf-node-capsule.h:63
LeafNodeCapsulePtr_t self(void) const
static LeafNodeCapsulePtr_t createCopy(const LeafNodeCapsulePtr_t &other)
float getHeight() const
Definition leaf-node-capsule.h:80
static LeafNodeCapsulePtr_t create(const std::string &name, const float &radius, const float &height, const osgVector4 &color)
SCENE_VIEWER_ACCEPT_VISITOR
Definition leaf-node-capsule.h:82
virtual LeafNodeCapsulePtr_t clone(void) const
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