Added ClearRotation() and SetScale(float) in Transform class.
This commit is contained in:
parent
7f39d77318
commit
7165984d22
@ -321,6 +321,14 @@ namespace hgl
|
|||||||
matrix_dirty=true;
|
matrix_dirty=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClearRotation()
|
||||||
|
{
|
||||||
|
rotation_quat=IdentityQuatf;
|
||||||
|
rotation_axis=Vector3f(0,0,0);
|
||||||
|
rotate_angle=0;
|
||||||
|
matrix_dirty=true;
|
||||||
|
}
|
||||||
|
|
||||||
void SetRotation(const Quatf &q)
|
void SetRotation(const Quatf &q)
|
||||||
{
|
{
|
||||||
rotation_quat=q;
|
rotation_quat=q;
|
||||||
@ -360,6 +368,12 @@ namespace hgl
|
|||||||
UpdateQuat();
|
UpdateQuat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetScale(const float &v)
|
||||||
|
{
|
||||||
|
scale_vector=Vector3f(v,v,v);
|
||||||
|
matrix_dirty=true;
|
||||||
|
}
|
||||||
|
|
||||||
void SetScale(const Vector3f &v)
|
void SetScale(const Vector3f &v)
|
||||||
{
|
{
|
||||||
scale_vector=v;
|
scale_vector=v;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user