You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
|
1 month ago
|
|
||
|
|
#ifndef HUtilityAnnotation_H
|
||
|
|
#define HUtilityAnnotation_H
|
||
|
|
|
||
|
|
#include <osg/Geode>
|
||
|
|
#include <osgText/Text>
|
||
|
|
|
||
|
|
namespace OSGView
|
||
|
|
{
|
||
|
|
|
||
|
|
class HUtilityAnnotation : public osg::Geode
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
HUtilityAnnotation() {}
|
||
|
|
|
||
|
|
virtual ~HUtilityAnnotation() {}
|
||
|
|
|
||
|
|
/*! Inserts a note
|
||
|
|
\param target where the arrow should point
|
||
|
|
\param position where the text is positioned
|
||
|
|
\param AnnotateThis key to what this annotation is annotating
|
||
|
|
\param pView pointer to the view
|
||
|
|
\param layer_key style segment for this note
|
||
|
|
\param bg_type one of four stock background types
|
||
|
|
\param useArrow sets the visibility of the arrow
|
||
|
|
\param key_path is the key path returned by HC_Show_Selection_Original_Keys
|
||
|
|
\param key_path_length is the length returned by HC_Show_Selection_Original_Keys
|
||
|
|
\return key to the root of the note segment tree */
|
||
|
|
|
||
|
|
virtual osg::Geode* Insert(
|
||
|
|
const std::string charText,
|
||
|
|
osg::Vec3 target,
|
||
|
|
osg::Vec3 position,
|
||
|
|
bool useArrow = true);
|
||
|
|
|
||
|
|
|
||
|
|
/*! Repositions the text */
|
||
|
|
virtual void MoveText(osg::Vec3 pos);
|
||
|
|
|
||
|
|
protected:
|
||
|
|
|
||
|
|
osg::Vec3 m_target; //the place where the arrow point
|
||
|
|
osg::Vec3 m_position; //position where the text is positioned
|
||
|
|
|
||
|
|
osg::ref_ptr<osgText::Text> m_text; //Text drawable
|
||
|
|
};
|
||
|
|
|
||
|
|
} //end namespace
|
||
|
|
|
||
|
|
|
||
|
|
#endif
|