mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 10:49:23 +00:00
Rotate gizmo transform functionality implemented
This commit is contained in:
@@ -201,7 +201,15 @@ void CSceneNode::Translate(const CVector3f& translation, ETransformSpace transfo
|
||||
|
||||
void CSceneNode::Rotate(const CQuaternion& rotation, ETransformSpace transformSpace)
|
||||
{
|
||||
mRotation *= rotation;
|
||||
switch (transformSpace)
|
||||
{
|
||||
case eWorldTransform:
|
||||
mRotation = rotation * mRotation;
|
||||
break;
|
||||
case eLocalTransform:
|
||||
mRotation *= rotation;
|
||||
break;
|
||||
}
|
||||
MarkTransformChanged();
|
||||
}
|
||||
|
||||
@@ -370,6 +378,30 @@ void CSceneNode::SetName(const std::string& Name)
|
||||
mName = Name;
|
||||
}
|
||||
|
||||
void CSceneNode::SetPosition(const CVector3f& position)
|
||||
{
|
||||
mPosition = position;
|
||||
MarkTransformChanged();
|
||||
}
|
||||
|
||||
void CSceneNode::SetRotation(const CQuaternion& rotation)
|
||||
{
|
||||
mRotation = rotation;
|
||||
MarkTransformChanged();
|
||||
}
|
||||
|
||||
void CSceneNode::SetRotation(const CVector3f& rotEuler)
|
||||
{
|
||||
mRotation = CQuaternion::FromEuler(rotEuler);
|
||||
MarkTransformChanged();
|
||||
}
|
||||
|
||||
void CSceneNode::SetScale(const CVector3f& scale)
|
||||
{
|
||||
mScale = scale;
|
||||
MarkTransformChanged();
|
||||
}
|
||||
|
||||
void CSceneNode::SetMouseHovering(bool Hovering)
|
||||
{
|
||||
mMouseHovering = Hovering;
|
||||
|
||||
Reference in New Issue
Block a user