9 #ifndef GEPETTO_VIEWER_NODE_HH 10 #define GEPETTO_VIEWER_NODE_HH 37 osg::MatrixTransformRefPtr transform_ptr_;
44 osg::GroupRefPtr switch_node_ptr_;
46 std::vector< ::osg::GroupRefPtr > wireframe_modes_;
48 osg::GroupRefPtr hl_switch_node_ptr_;
49 std::size_t selected_highlight_;
50 bool highlight_enabled_;
51 std::vector< ::osg::GroupRefPtr > highlight_nodes_;
59 void updateTransform ();
61 ::osg::Group* setupHighlightState (
unsigned int state);
75 Node (
const std::string& name);
85 return transform_ptr_;
88 void setID (
const std::string& id_name)
91 switch_node_ptr_->setName (id_name_);
95 osg::StateSet* ss = NULL);
165 {
return visibilityMode_; }
183 return selected_wireframe_;
199 virtual osg::ref_ptr<osg::Node>
getOsgNode()
const;
206 return switch_node_ptr_;
215 return switch_node_ptr_->getOrCreateStateSet ();
222 return highlight_enabled_;
228 highlight_enabled_ = enabled;
235 return selected_highlight_;
244 virtual void setAlpha (
const float& alpha);
const Configuration & getGlobalTransform() const
returns rotation and position of the node in word frame
T value
Definition: node-property.h:405
virtual void setLightingMode(const LightingMode &lighting_state)
Virtual method for setting the lighting mode of the object : influence by light or not...
viewer::Configuration Configuration
Definition: configuration.hh:30
virtual void setWireFrameMode(const WireFrameMode &wireframe_state)
Virtual method for setting the wireframe mode of the object : visible or not.
osgVector3 getStaticPosition() const
virtual void setAlpha(const float &alpha)
virtual LightingMode getLightingMode() const
Node(const std::string &name)
Default constructor.
::osg::Vec3f osgVector3
Definition: config-osg.h:109
::osg::Quat osgQuat
Definition: config-osg.h:112
void setID(const std::string &id_name)
Definition: node.h:88
Definition: node-property.h:492
void setHighlightEnabled(bool enabled)
Definition: node.h:225
std::string getID() const
getID is a public method for getting the id_name of the Object
Definition: node.h:109
::osg::GeodeRefPtr geode_ptr_
Definition: node.h:68
::osg::Vec4f osgVector4
Definition: config-osg.h:110
virtual const VisibilityMode & getVisibilityMode() const
Definition: node.h:164
VisibilityMode
Definition: config-osg.h:117
void setScale(float scale)
Definition: node.h:187
SCENE_VIEWER_ACCEPT_VISITOR
Definition: node.h:250
Definition: node-visitor.h:35
void applyConfiguration(const Configuration &cfg)
Definition: node.h:144
bool isDirty() const
Definition: node.h:114
void applyConfiguration(const osgVector3 &position, const osgQuat &quat)
Definition: node.h:137
Definition: action-search-bar.hh:27
friend struct NodeTest
Definition: node.h:31
virtual void setColor(const osgVector4 &color)=0
virtual ::osg::GroupRefPtr asGroup() const
Return the root node to include it in the scene.
Definition: node.h:204
virtual void traverse(NodeVisitor &visitor)
void setSelectable(bool selectable=true)
float getTransparency() const
Definition: node-property.h:381
virtual void addLandmark(const float &size)
::osg::StateSetRefPtr getOrCreateRootStateSet()
Definition: node.h:213
::osg::GroupRefPtr asQueue() const
Return the root node to include it in the scene.
Definition: node.h:83
virtual const WireFrameMode & getWireFrameMode() const
Definition: node.h:181
bool getHighlightEnabled() const
Definition: node.h:220
osgVector3 getScale() const
Definition: node.h:194
LightingMode
Definition: config-osg.h:124
Definition: config-osg.h:144
virtual float getAlpha() const
virtual void setVisibilityMode(const VisibilityMode &visibility_state)
Virtual method for setting the visibility mode of the object : visible or not visible.
const std::size_t & getHighlightState() const
Definition: node.h:233
void setStaticTransform(const osgVector3 &position, const osgQuat &quat)
void setHighlightState(unsigned int state)
void setScale(const osgVector3 &scale)
Definition: node.h:190
static const float TransparencyRenderingBinThreshold
Definition: node.h:98
osgQuat getStaticRotation() const
void setTransparentRenderingBin(bool transparent=true, osg::StateSet *ss=NULL)
virtual osg::ref_ptr< osg::Node > getOsgNode() const
void setDirty(bool dirty=true)
Called when a property is modified.
Definition: node.h:119
bool isSelectable() const
Definition: node.h:126
::osg::GeodeRefPtr landmark_geode_ptr_
Definition: node.h:65
WireFrameMode
Definition: config-osg.h:130
void setTransparency(const float &transparency)
Abstract base class of 3D objects in a scene.
Definition: node.h:28
float alpha_
Definition: node.h:70