mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Fixed control point overlay position.
This commit is contained in:
parent
2842cccf53
commit
3beec440a2
1 changed files with 19 additions and 2 deletions
|
@ -457,12 +457,29 @@ public:
|
|||
}
|
||||
|
||||
lcVector3 GetRotationCenter() const
|
||||
{
|
||||
lcuint32 Section = GetFocusSection();
|
||||
|
||||
if (Section == LC_PIECE_SECTION_POSITION || Section == LC_PIECE_SECTION_INVALID)
|
||||
{
|
||||
if (mState & LC_PIECE_PIVOT_POINT_VALID)
|
||||
return lcMul31(mPivotMatrix.GetTranslation(), mModelWorld);
|
||||
else
|
||||
return mModelWorld.GetTranslation();
|
||||
}
|
||||
else
|
||||
{
|
||||
int ControlPointIndex = Section - LC_PIECE_SECTION_CONTROL_POINT_1;
|
||||
|
||||
if (ControlPointIndex >= 0 && ControlPointIndex < mControlPoints.GetSize())
|
||||
{
|
||||
lcMatrix44& Transform = mControlPoints[ControlPointIndex].Transform;
|
||||
return lcMul31(Transform.GetTranslation(), mModelWorld);
|
||||
}
|
||||
|
||||
return mModelWorld.GetTranslation();
|
||||
}
|
||||
}
|
||||
|
||||
lcMatrix33 GetRelativeRotation() const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue