ECM2
This commit is contained in:
29
Assets/VolumetricLightBeam/Scripts/TransformUtils.cs
Normal file
29
Assets/VolumetricLightBeam/Scripts/TransformUtils.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace VLB
|
||||
{
|
||||
public static class TransformUtils
|
||||
{
|
||||
public struct Packed
|
||||
{
|
||||
public Vector3 position;
|
||||
public Quaternion rotation;
|
||||
public Vector3 lossyScale;
|
||||
|
||||
public bool IsSame(Transform transf)
|
||||
{
|
||||
return transf.position == position && transf.rotation == rotation && transf.lossyScale == lossyScale;
|
||||
}
|
||||
}
|
||||
|
||||
public static Packed GetWorldPacked(this Transform self)
|
||||
{
|
||||
return new Packed()
|
||||
{
|
||||
position = self.position,
|
||||
rotation = self.rotation,
|
||||
lossyScale = self.lossyScale,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user