will it explode ?
This commit is contained in:
@@ -252,3 +252,9 @@ void Transform::Lerp(const Transform& t1, const Transform& t2, float amount, Tra
|
|||||||
Quaternion::Slerp(t1.Orientation, t2.Orientation, amount, result.Orientation);
|
Quaternion::Slerp(t1.Orientation, t2.Orientation, amount, result.Orientation);
|
||||||
Float3::Lerp(t1.Scale, t2.Scale, amount, result.Scale);
|
Float3::Lerp(t1.Scale, t2.Scale, amount, result.Scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
|
||||||
|
{
|
||||||
|
Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
|
||||||
|
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
|
||||||
|
}
|
||||||
|
|||||||
@@ -304,11 +304,8 @@ public:
|
|||||||
/// <param name="InReturnScale">return scale</param>
|
/// <param name="InReturnScale">return scale</param>
|
||||||
/// InRefrenceTransform
|
/// InRefrenceTransform
|
||||||
/// <returns>rotated and snaped transform</returns>
|
/// <returns>rotated and snaped transform</returns>
|
||||||
static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
|
inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize);
|
||||||
{
|
|
||||||
Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
|
|
||||||
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// combines funcions <br/>
|
/// combines funcions <br/>
|
||||||
/// <see cref="SnapToRotatedGridWithOffset"/>,<br/>
|
/// <see cref="SnapToRotatedGridWithOffset"/>,<br/>
|
||||||
@@ -321,11 +318,8 @@ public:
|
|||||||
/// <param name="InRelativeTo">Realative transform</param>
|
/// <param name="InRelativeTo">Realative transform</param>
|
||||||
/// InRefrenceTransform
|
/// InRefrenceTransform
|
||||||
/// <returns>rotated and snaped transform with scale <see cref="Float3.One"/> </returns>
|
/// <returns>rotated and snaped transform with scale <see cref="Float3.One"/> </returns>
|
||||||
static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
|
inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize);
|
||||||
{
|
|
||||||
Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
|
|
||||||
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, Float3::One);
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// combines funcions <br/>
|
/// combines funcions <br/>
|
||||||
/// <see cref="SnapToRotatedGridWithOffset"/>,<br/>
|
/// <see cref="SnapToRotatedGridWithOffset"/>,<br/>
|
||||||
@@ -339,11 +333,8 @@ public:
|
|||||||
/// <param name="InReturnScale">return scale</param>
|
/// <param name="InReturnScale">return scale</param>
|
||||||
/// InRefrenceTransform
|
/// InRefrenceTransform
|
||||||
/// <returns>rotated and snaped transform</returns>
|
/// <returns>rotated and snaped transform</returns>
|
||||||
static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo,const Float3& InReturnScale,const Vector3& InGridSize)
|
inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo,const Float3& InReturnScale,const Vector3& InGridSize);
|
||||||
{
|
|
||||||
Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
|
|
||||||
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, InReturnScale);
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// combines funcions <br/>
|
/// combines funcions <br/>
|
||||||
/// <see cref="SnapToRotatedGridWithOffset"/>,<br/>
|
/// <see cref="SnapToRotatedGridWithOffset"/>,<br/>
|
||||||
@@ -356,11 +347,7 @@ public:
|
|||||||
/// <param name="InRelativeTo">Realative transform</param>
|
/// <param name="InRelativeTo">Realative transform</param>
|
||||||
/// InRefrenceTransform
|
/// InRefrenceTransform
|
||||||
/// <returns>rotated and snaped transform with scale <see cref="Float3.One"/> </returns>
|
/// <returns>rotated and snaped transform with scale <see cref="Float3.One"/> </returns>
|
||||||
static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint,const Vector3& InNormal,const Vector3& InNormalOffset, const Transform& InRelativeTo,const Vector3& InGridSize)
|
inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint,const Vector3& InNormal,const Vector3& InNormalOffset, const Transform& InRelativeTo,const Vector3& InGridSize);
|
||||||
{
|
|
||||||
Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
|
|
||||||
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, Float3::One);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FORCE_INLINE Transform operator*(const Transform& other) const
|
FORCE_INLINE Transform operator*(const Transform& other) const
|
||||||
|
|||||||
Reference in New Issue
Block a user