Adds SoDatumLabel::getLabelTextCenter() to get the externalize the finding of position of text center.

This commit is contained in:
Paddle
2023-10-02 16:50:10 +02:00
committed by abdullahtahiriyo
parent 3f1251df25
commit fa2b0c8f7c
3 changed files with 97 additions and 33 deletions

View File

@@ -215,7 +215,7 @@ SbVec3f EditableDatumLabel::getTextCenterPoint() const
{
//Here we need the 3d point and not the 2d point as are the SoLabel points.
// First we get the 2D point (on the sketch/image plane) of the middle of the text label.
SbVec3f point2D = label->textOffset;
SbVec3f point2D = label->getLabelTextCenter();
// Get the translation and rotation values from the transform
SbVec3f translation = transform->translation.getValue();
SbRotation rotation = transform->rotation.getValue();