gepetto-viewer 6.0.0
An user-friendly Graphical Interface
Loading...
Searching...
No Matches
leaf-node-sphere.h
Go to the documentation of this file.
1//
2// leaf-node-sphere.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_LEAFNODESPHERE_HH
10#define GEPETTO_VIEWER_LEAFNODESPHERE_HH
11
13
14namespace gepetto {
15namespace viewer {
16DEF_CLASS_SMART_PTR(LeafNodeSphere)
17
18
20 private:
22 LeafNodeSphereWeakPtr weak_ptr_;
23
25 ::osg::SphereRefPtr sphere_ptr_;
26
27 void init();
28
29 protected:
30 /* Default constructor */
31 LeafNodeSphere(const std::string& name, const float& radius);
32 LeafNodeSphere(const std::string& name, const float& radius,
33 const osgVector4& color);
34
35 /* Copy constructor */
36 LeafNodeSphere(const std::string& name, const LeafNodeSphere& other);
37
39 void initWeakPtr(LeafNodeSphereWeakPtr other_weak_ptr);
40
41 public:
44 static LeafNodeSpherePtr_t create(const std::string& name,
45 const float& radius);
46 static LeafNodeSpherePtr_t create(const std::string& name,
47 const float& radius,
48 const osgVector4& color);
49
53 static LeafNodeSpherePtr_t createCopy(LeafNodeSpherePtr_t other);
54
57 LeafNodeSpherePtr_t clone(void) const;
58
62 LeafNodeSpherePtr_t copy() const { return clone(); }
63
66 LeafNodeSpherePtr_t self(void) const;
67
71 void setRadius(const float& radius);
72 float getRadius() const { return sphere_ptr_->getRadius(); }
73
75
77 virtual ~LeafNodeSphere();
78};
79} /* namespace viewer */
80} /* namespace gepetto */
81
82#endif /* GEPETTO_VIEWER_LEAFNODESPHERE_HH */
Definition leaf-node-sphere.h:19
static LeafNodeSpherePtr_t createCopy(LeafNodeSpherePtr_t other)
SCENE_VIEWER_ACCEPT_VISITOR
Definition leaf-node-sphere.h:74
LeafNodeSpherePtr_t self(void) const
float getRadius() const
Definition leaf-node-sphere.h:72
static LeafNodeSpherePtr_t create(const std::string &name, const float &radius)
static LeafNodeSpherePtr_t create(const std::string &name, const float &radius, const osgVector4 &color)
LeafNodeSphere(const std::string &name, const float &radius)
void initWeakPtr(LeafNodeSphereWeakPtr other_weak_ptr)
LeafNodeSpherePtr_t clone(void) const
LeafNodeSphere(const std::string &name, const float &radius, const osgVector4 &color)
void setRadius(const float &radius)
LeafNodeSphere(const std::string &name, const LeafNodeSphere &other)
LeafNodeSpherePtr_t copy() const
Proceed to a copy of the currend object as clone.
Definition leaf-node-sphere.h:62
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