virtual bool handleEvent(canvas::EventPtr event);
- virtual bool hitBound( const osg::Vec2f& pos,
+ /**
+ *
+ * @param global_pos Position in global (canvas) coordinate frame
+ * @param parent_pos Position in parent coordinate frame
+ * @param local_pos Position in local (element) coordinate frame
+ */
+ virtual bool hitBound( const osg::Vec2f& global_pos,
+ const osg::Vec2f& parent_pos,
const osg::Vec2f& local_pos ) const;
/**
- * Get whether the element is visible or hidden (Can be changed with
- * setting property "visible" accordingly).
+ * Set visibility of the element.
+ */
+ void setVisible(bool visible);
+
+ /**
+ * Get whether the element is visible or hidden.
*/
bool isVisible() const;
osg::MatrixTransform* getMatrixTransform();
osg::MatrixTransform const* getMatrixTransform() const;
+ /**
+ * Transform position to local coordinages.
+ */
+ osg::Vec2f posToLocal(const osg::Vec2f& pos) const;
+
virtual void childAdded( SGPropertyNode * parent,
SGPropertyNode * child );
virtual void childRemoved( SGPropertyNode * parent,