CGizmo: Mark NumSelectedAxes() as const

This doesn't modify internal member state.
This commit is contained in:
Lioncash 2020-07-03 22:51:31 -04:00
parent 54f90b3b8f
commit 2d21d6af01
2 changed files with 6 additions and 3 deletions

View File

@ -189,12 +189,15 @@ bool CGizmo::CheckSelectedAxes(const CRay& rkRay)
return mSelectedAxes != EAxis::None;
}
uint32 CGizmo::NumSelectedAxes()
uint32 CGizmo::NumSelectedAxes() const
{
uint32 Out = 0;
for (uint32 iAxis = 1; iAxis < 8; iAxis <<= 1)
if (mSelectedAxes & FAxes(iAxis)) Out++;
{
if (mSelectedAxes & FAxes(iAxis))
Out++;
}
return Out;
}

View File

@ -123,7 +123,7 @@ public:
void DecrementSize();
void UpdateForCamera(const CCamera& rkCamera);
bool CheckSelectedAxes(const CRay& rkRay);
uint32 NumSelectedAxes();
uint32 NumSelectedAxes() const;
void ResetSelectedAxes();
void StartTransform();
bool TransformFromInput(const CRay& rkRay, CCamera& rkCamera);