Class MathUtils
Assembly: UnityEditor.dll
Syntax
Methods
|
Improve this Doc
View Source
ClosestPtRaySphere(Ray, Vector3, Single, ref Single, ref Vector3)
Declaration
public static bool ClosestPtRaySphere(Ray ray, Vector3 sphereOrigin, float sphereRadius, ref float t, ref Vector3 q)
Parameters
Returns
|
Improve this Doc
View Source
ClosestPtSegmentRay(Vector3, Vector3, Ray, out Single, out Single, out Vector3)
Declaration
public static Vector3 ClosestPtSegmentRay(Vector3 p1, Vector3 q1, Ray ray, out float squaredDist, out float s, out Vector3 closestRay)
Parameters
Returns
|
Improve this Doc
View Source
Ease(Single, Single, Single)
Smooths the input parameter t.
If less than k1 ir greater than k2, it uses a sin.
Between k1 and k2 it uses linear interp.
Declaration
public static float Ease(float t, float k1, float k2)
Parameters
Returns
|
Improve this Doc
View Source
GetQuatConjugate(Quaternion)
Declaration
public static Quaternion GetQuatConjugate(Quaternion q)
Parameters
Returns
|
Improve this Doc
View Source
GetQuatExp(Quaternion)
Declaration
public static Quaternion GetQuatExp(Quaternion q)
Parameters
Returns
|
Improve this Doc
View Source
GetQuatLength(Quaternion)
Declaration
public static float GetQuatLength(Quaternion q)
Parameters
Returns
|
Improve this Doc
View Source
GetQuatLog(Quaternion)
Logarithm of a unit quaternion. The result is not necessary a unit quaternion.
Declaration
public static Quaternion GetQuatLog(Quaternion q)
Parameters
Returns
|
Improve this Doc
View Source
GetQuatSquad(Single, Quaternion, Quaternion, Quaternion, Quaternion)
SQUAD Spherical Quadrangle interpolation [Shoe87]
Declaration
public static Quaternion GetQuatSquad(float t, Quaternion q0, Quaternion q1, Quaternion a0, Quaternion a1)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public static Quaternion GetSquadIntermediate(Quaternion q0, Quaternion q1, Quaternion q2)
Parameters
Returns
|
Improve this Doc
View Source
IntersectRaySphere(Ray, Vector3, Single, ref Single, ref Vector3)
Declaration
public static bool IntersectRaySphere(Ray ray, Vector3 sphereOrigin, float sphereRadius, ref float t, ref Vector3 q)
Parameters
Returns
|
Improve this Doc
View Source
IntersectRayTriangle(Ray, Vector3, Vector3, Vector3, Boolean)
Declaration
public static object IntersectRayTriangle(Ray ray, Vector3 v0, Vector3 v1, Vector3 v2, bool bidirectional)
Parameters
Returns
|
Improve this Doc
View Source
OrthogonalizeMatrix(Matrix4x4)
Declaration
public static Matrix4x4 OrthogonalizeMatrix(Matrix4x4 m)
Parameters
Returns
|
Improve this Doc
View Source
QuaternionFromMatrix(Matrix4x4)
Declaration
public static Quaternion QuaternionFromMatrix(Matrix4x4 m)
Parameters
Returns
|
Improve this Doc
View Source
QuaternionNormalize(ref Quaternion)
Declaration
public static void QuaternionNormalize(ref Quaternion q)
Parameters
|
Improve this Doc
View Source
Slerp(Quaternion, Quaternion, Single)
We need this because Quaternion.Slerp always uses the shortest arc.
Declaration
public static Quaternion Slerp(Quaternion p, Quaternion q, float t)
Parameters
Returns
Extension Methods