1
This commit is contained in:
@@ -1063,6 +1063,12 @@ namespace MagicaCloth2
|
||||
return math.inverse(Matrix4x4.TRS(wpos, wrot, wscl));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float3 TransformPoint(in float3 pos, in float3 wpos, in quaternion wrot, in float3 wscl)
|
||||
{
|
||||
return math.transform(Matrix4x4.TRS(wpos, wrot, wscl), pos);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float3 TransformPoint(in float3 pos, in float4x4 localToWorldMatrix)
|
||||
{
|
||||
@@ -1139,6 +1145,12 @@ namespace MagicaCloth2
|
||||
return math.transform(worldToLocalMatrix, pos);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float3 InverseTransformPoint(in float3 pos, in float3 wpos, in quaternion wrot, in float3 wscl)
|
||||
{
|
||||
return math.transform(math.inverse(Matrix4x4.TRS(wpos, wrot, wscl)), pos);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float3 InverseTransformVector(in float3 vec, in float4x4 worldToLocalMatrix)
|
||||
{
|
||||
|
Reference in New Issue
Block a user