#3757 New feature to add a text annotation in the 3D view

This commit is contained in:
Jacob Støren
2018-11-30 14:29:46 +01:00
parent 92a45e959e
commit a9a5eaf604
8 changed files with 343 additions and 0 deletions

View File

@@ -64,6 +64,15 @@ cvf::Vec3d RimTextAnnotation::anchorPoint() const
return pos;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimTextAnnotation::setAnchorPoint(const Vec3d & pointXyz)
{
m_anchorPointXyd = pointXyz;
m_anchorPointXyd.v().z() *= -1;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -74,6 +83,15 @@ cvf::Vec3d RimTextAnnotation::labelPoint() const
return pos;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimTextAnnotation::setLabelPoint(const Vec3d & pointXyz)
{
m_labelPointXyd = pointXyz;
m_labelPointXyd.v().z() *= -1;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -54,7 +54,9 @@ public:
~RimTextAnnotation();
Vec3d anchorPoint() const;
void setAnchorPoint(const Vec3d & pointXyz) ;
Vec3d labelPoint() const;
void setLabelPoint(const Vec3d & pointXyz) ;
void setText(const QString& text);
const QString& text() const;
bool isActive();