Added Euler Angles properties to Managed Transforms

This commit is contained in:
Diren D Bharwani 2022-10-24 22:41:36 +08:00
parent 24c591ec27
commit ff025f212c
2 changed files with 32 additions and 0 deletions

View File

@ -37,6 +37,14 @@ namespace SHADE
{ {
GetNativeComponent()->SetLocalOrientation(Convert::ToNative(val)); GetNativeComponent()->SetLocalOrientation(Convert::ToNative(val));
} }
Vector3 Transform::LocalEulerAngles::get()
{
return Convert::ToCLI(GetNativeComponent()->GetLocalRotation());
}
void Transform::LocalEulerAngles::set(Vector3 val)
{
GetNativeComponent()->SetLocalRotation(Convert::ToNative(val));
}
Vector3 Transform::LocalScale::get() Vector3 Transform::LocalScale::get()
{ {
return Convert::ToCLI(GetNativeComponent()->GetLocalScale()); return Convert::ToCLI(GetNativeComponent()->GetLocalScale());
@ -62,6 +70,14 @@ namespace SHADE
{ {
GetNativeComponent()->SetWorldOrientation(Convert::ToNative(val)); GetNativeComponent()->SetWorldOrientation(Convert::ToNative(val));
} }
Vector3 Transform::GlobalEulerAngles::get()
{
return Convert::ToCLI(GetNativeComponent()->GetWorldRotation());
}
void Transform::GlobalEulerAngles::set(Vector3 val)
{
GetNativeComponent()->SetWorldRotation(Convert::ToNative(val));
}
Vector3 Transform::GlobalScale::get() Vector3 Transform::GlobalScale::get()
{ {
return Convert::ToCLI(GetNativeComponent()->GetWorldScale()); return Convert::ToCLI(GetNativeComponent()->GetWorldScale());

View File

@ -60,6 +60,14 @@ namespace SHADE
void set(Quaternion val); void set(Quaternion val);
} }
/// <summary> /// <summary>
/// Local euler angle rotations stored by this Transform.
/// </summary>
property Vector3 LocalEulerAngles
{
Vector3 get();
void set(Vector3 val);
}
/// <summary>
/// Local scale stored by this Transform. /// Local scale stored by this Transform.
/// </summary> /// </summary>
property Vector3 LocalScale property Vector3 LocalScale
@ -84,6 +92,14 @@ namespace SHADE
void set(Quaternion val); void set(Quaternion val);
} }
/// <summary> /// <summary>
/// Global euler angle rotations stored by this Transform.
/// </summary>
property Vector3 GlobalEulerAngles
{
Vector3 get();
void set(Vector3 val);
}
/// <summary>
/// Global scale stored by this Transform. /// Global scale stored by this Transform.
/// </summary> /// </summary>
property Vector3 GlobalScale property Vector3 GlobalScale