9#ifndef GEPETTO_VIEWER_LEAFNODEGROUND_HH
10#define GEPETTO_VIEWER_LEAFNODEGROUND_HH
29 LeafNodeGroundWeakPtr weak_ptr_;
32 ::osg::Vec3ArrayRefPtr vertices_array_ptr_;
33 ::osg::Vec4ArrayRefPtr colors_array_ptr_;
36 ::osg::GeometryRefPtr grid_geometry_ptr_;
37 ::osg::ref_ptr< ::osg::DrawArrays> draw_array_ptr_;
42 void updateVertices();
51 LeafNodeGround(
const std::string& name,
int nX,
int nY,
float square_length,
56 void initWeakPtr(
const LeafNodeGroundWeakPtr& other_weak_ptr);
68 static LeafNodeGroundPtr_t
create(
const std::string& name,
int nX,
int nY,
69 float square_length,
float square_width);
71 static LeafNodeGroundPtr_t
create(
const std::string& name,
int nX,
int nY,
72 float square_length,
float square_width,
76 static LeafNodeGroundPtr_t
create(
const std::string& name);
81 LeafNodeGroundPtr_t
self(
void)
const;
Definition leaf-node-ground.h:18
const osgVector4 & getColor1() const
Definition leaf-node-ground.h:94
void setColor(const osgVector4 &color)
LeafNodeGroundPtr_t self(void) const
Returns a shared pointer of the object itself.
virtual void setColor2(const osgVector4 &color2)
Allow to define color2.
const osgVector4 & getColor2() const
Definition leaf-node-ground.h:102
virtual ~LeafNodeGround()
static LeafNodeGroundPtr_t create(const std::string &name, int nX, int nY, float square_length, float square_width, const osgVector4 &color1, const osgVector4 &color2)
static LeafNodeGroundPtr_t create(const std::string &name, int nX, int nY, float square_length, float square_width)
Constructor with all useful parameters.
virtual void setColor1(const osgVector4 &color1)
Allow to define color1.
virtual void setColors(const osgVector4 &color1, const osgVector4 &color2)
Allow to define both colors.
static LeafNodeGroundPtr_t create(const std::string &name)
SCENE_VIEWER_ACCEPT_VISITOR
Virtual method for setting the shadow mode of the object : receive, cast, both or no shadow.
Definition leaf-node-ground.h:118
Abstract base class of 3D objects in a scene.
Definition node.h:25
Definition node-property.h:522
::osg::Vec4f osgVector4
Definition config-osg.h:100
#define DEF_CLASS_SMART_PTR(className)
Definition macros.h:51
Definition action-search-bar.hh:27