9 #ifndef GEPETTO_VIEWER_LEAFNODELINE_HH
10 #define GEPETTO_VIEWER_LEAFNODELINE_HH
24 LeafNodeLineWeakPtr weak_ptr_;
27 ::osg::GeometryRefPtr beam_ptr_;
28 ::osg::ref_ptr< ::osg::DrawArrays > drawArray_ptr_;
29 ::osg::Vec3ArrayRefPtr points_ptr_;
30 ::osg::Vec4ArrayRefPtr color_ptr_;
45 void initWeakPtr (LeafNodeLineWeakPtr other_weak_ptr);
53 static LeafNodeLinePtr_t
create (
const std::string& name, const ::osg::Vec3ArrayRefPtr& points,
const osgVector4& color);
57 static LeafNodeLinePtr_t
createCopy (LeafNodeLinePtr_t other);
61 virtual LeafNodeLinePtr_t
clone (
void)
const;
70 LeafNodeLinePtr_t
self (void)
const;
91 virtual void setMode (
const GLenum& mode);
99 virtual void setPoints (const ::osg::Vec3ArrayRefPtr& points);
115 ::osg::Vec4ArrayRefPtr color_array_ptr =
dynamic_cast<osg::Vec4Array*
>(beam_ptr_->getColorArray());
116 ASSERT(color_array_ptr,
"Problem of dynamic casting from VecArray to Vec4Array");
118 return color_array_ptr->at(0);
Definition: properties.h:17
Definition: leaf-node-line.h:20
virtual void setStartPoint(const osgVector3 &start_point)
void setColors(const ::osg::Vec4ArrayRefPtr &color)
virtual void setPoints(const ::osg::Vec3ArrayRefPtr &points)
osgVector3 getEndPoint() const
void setPointsSubset(const int first, const std::size_t count)
static LeafNodeLinePtr_t createCopy(LeafNodeLinePtr_t other)
osgVector3 getStartPoint() const
static LeafNodeLinePtr_t create(const std::string &name, const ::osg::Vec3ArrayRefPtr &points, const osgVector4 &color)
osgVector4 getColor() const
Definition: leaf-node-line.h:113
static LeafNodeLinePtr_t create(const std::string &name, const osgVector3 &start_point, const osgVector3 &end_point)
virtual void setEndPoint(const osgVector3 &end_point)
SCENE_VIEWER_ACCEPT_VISITOR
Definition: leaf-node-line.h:126
void setColor(const osgVector4 &color)
virtual void setPoints(const osgVector3 &start_point, const osgVector3 &end_point)
virtual void setMode(const GLenum &mode)
::osg::GeometryRefPtr geometry() const
Definition: leaf-node-line.h:121
static LeafNodeLinePtr_t create(const std::string &name, const osgVector3 &start_point, const osgVector3 &end_point, const osgVector4 &color)
virtual LeafNodeLinePtr_t clone(void) const
virtual NodePtr_t copy() const
Proceed to a copy of the currend object as clone.
Definition: leaf-node-line.h:66
::osg::Vec3ArrayRefPtr getPoints()
Definition: leaf-node-line.h:105
Abstract base class of 3D objects in a scene.
Definition: node.h:29
::osg::Vec3f osgVector3
Definition: config-osg.h:109
::osg::Vec4f osgVector4
Definition: config-osg.h:110
#define ASSERT(condition, message)
Definition: macros.h:40
#define DEF_CLASS_SMART_PTR(className)
Definition: macros.h:50
viewer::NodePtr_t NodePtr_t
Definition: fwd.hh:47
Definition: action-search-bar.hh:27