gepetto-viewer
4.14.0
An user-friendly Graphical Interface
|
Go to the documentation of this file.
9 #ifndef GEPETTO_VIEWER_NODE_HH
10 #define GEPETTO_VIEWER_NODE_HH
33 osg::MatrixTransformRefPtr transform_ptr_;
40 osg::GroupRefPtr switch_node_ptr_;
42 std::vector< ::osg::GroupRefPtr> wireframe_modes_;
44 osg::GroupRefPtr hl_switch_node_ptr_;
45 std::size_t selected_highlight_;
46 bool highlight_enabled_;
47 std::vector< ::osg::GroupRefPtr> highlight_nodes_;
55 void updateTransform();
57 ::osg::Group* setupHighlightState(
unsigned int state);
71 Node(
const std::string& name);
79 ::osg::GroupRefPtr
asQueue()
const {
return transform_ptr_; }
81 void setID(
const std::string& id_name) {
83 switch_node_ptr_->setName(id_name_);
87 osg::StateSet* ss = NULL);
101 std::string
getID()
const {
return id_name_; }
105 void setDirty(
bool dirty =
true) { dirty_ = dirty; }
147 return visibilityMode_;
165 return selected_wireframe_;
181 virtual osg::ref_ptr<osg::Node>
getOsgNode()
const;
186 virtual ::osg::GroupRefPtr
asGroup()
const {
return switch_node_ptr_; }
193 return switch_node_ptr_->getOrCreateStateSet();
202 highlight_enabled_ = enabled;
216 virtual void setAlpha(
const float& alpha);
virtual void setAlpha(const float &alpha)
virtual void setWireFrameMode(const WireFrameMode &wireframe_state)
Virtual method for setting the wireframe mode of the object : visible or not.
@ VisibilityBit
Definition: node.h:22
::osg::Quat osgQuat
Definition: config-osg.h:102
Definition: node-visitor.h:35
virtual void setColor(const osgVector4 &color)=0
Definition: action-search-bar.hh:27
std::string getID() const
getID is a public method for getting the id_name of the Object
Definition: node.h:101
virtual void traverse(NodeVisitor &visitor)
::osg::Vec3f osgVector3
Definition: config-osg.h:99
friend struct NodeTest
Definition: node.h:27
void applyConfiguration(const Configuration &cfg)
Definition: node.h:126
::osg::GeodeRefPtr geode_ptr_
Definition: node.h:64
virtual LightingMode getLightingMode() const
void setTransparentRenderingBin(bool transparent=true, osg::StateSet *ss=NULL)
const std::size_t & getHighlightState() const
Definition: node.h:207
@ NodeBit
Definition: node.h:22
bool getHighlightEnabled() const
Definition: node.h:198
float alpha_
Definition: node.h:66
virtual osg::ref_ptr< osg::Node > getOsgNode() const
@ IntersectionBit
Definition: node.h:22
bool isSelectable() const
Definition: node.h:109
void applyConfiguration(const osgVector3 &position, const osgQuat &quat)
Definition: node.h:119
viewer::Configuration Configuration
Definition: configuration.hh:30
const Configuration & getGlobalTransform() const
returns rotation and position of the node in word frame
::osg::GroupRefPtr asQueue() const
Return the root node to include it in the scene.
Definition: node.h:79
T value
Definition: node-property.h:503
static const float TransparencyRenderingBinThreshold
Definition: node.h:90
virtual void setLightingMode(const LightingMode &lighting_state)
Virtual method for setting the lighting mode of the object : influence by light or not.
::osg::GeodeRefPtr landmark_geode_ptr_
Definition: node.h:61
virtual void setVisibilityMode(const VisibilityMode &visibility_state)
Virtual method for setting the visibility mode of the object : visible or not visible.
Definition: node-property.h:605
void setStaticTransform(const osgVector3 &position, const osgQuat &quat)
void setScale(float scale)
Definition: node.h:169
virtual void addLandmark(const float &size)
void setTransparency(const float &transparency)
void setScale(const osgVector3 &scale)
Definition: node.h:172
Abstract base class of 3D objects in a scene.
Definition: node.h:25
SCENE_VIEWER_ACCEPT_VISITOR
Definition: node.h:222
osgQuat getStaticRotation() const
void setHighlightEnabled(bool enabled)
Definition: node.h:200
VisibilityMode
Definition: config-osg.h:107
void setID(const std::string &id_name)
Definition: node.h:81
virtual ::osg::GroupRefPtr asGroup() const
Return the root node to include it in the scene.
Definition: node.h:186
virtual const VisibilityMode & getVisibilityMode() const
Definition: node.h:146
::osg::StateSetRefPtr getOrCreateRootStateSet()
Definition: node.h:192
float getTransparency() const
virtual const WireFrameMode & getWireFrameMode() const
Definition: node.h:164
bool isDirty() const
Definition: node.h:103
void setDirty(bool dirty=true)
Called when a property is modified.
Definition: node.h:105
virtual float getAlpha() const
void setHighlightState(unsigned int state)
LightingMode
Definition: config-osg.h:109
::osg::Vec4f osgVector4
Definition: config-osg.h:100
WireFrameMode
Definition: config-osg.h:111
Definition: node-property.h:480
Node(const std::string &name)
Default constructor.
void setSelectable(bool selectable=true)
osgVector3 getScale() const
Definition: node.h:176
Definition: config-osg.h:115
osgVector3 getStaticPosition() const