public static Vector3 Transform(ref Vector3 v, ref MyTransform t2) { Vector3 result; Transform(ref v, ref t2, out result); return(result); }
public static MyTransform Transform(ref MyTransform t1, ref MyTransform t2) { MyTransform result; Transform(ref t1, ref t2, out result); return(result); }
public static Vector3 Transform(ref Vector3 v, ref MyTransform t2) { Vector3 vector; Transform(ref v, ref t2, out vector); return(vector); }
public static MyTransform Transform(ref MyTransform t1, ref MyTransform t2) { MyTransform transform; Transform(ref t1, ref t2, out transform); return(transform); }
public static void Transform(ref MyTransform t1, ref MyTransform t2, out MyTransform result) { Vector3 newPos; Vector3.Transform(ref t1.Position, ref t2.Rotation, out newPos); newPos += t2.Position; Quaternion newRot; Quaternion.Multiply(ref t1.Rotation, ref t2.Rotation, out newRot); result.Position = newPos; result.Rotation = newRot; }
public static void Transform(ref MyTransform t1, ref MyTransform t2, out MyTransform result) { Vector3 vector; Quaternion quaternion; Vector3.Transform(ref t1.Position, ref t2.Rotation, out vector); vector += t2.Position; Quaternion.Multiply(ref t1.Rotation, ref t2.Rotation, out quaternion); result.Position = vector; result.Rotation = quaternion; }
public void SyncHeadToolTransform(ref MatrixD headMatrix) { if (ControllerInfo.IsLocallyControlled()) { MatrixD headMatrixLocal = headMatrix * PositionComp.WorldMatrixInvScaled; MyTransform transformToBeSent = new MyTransform(headMatrixLocal); transformToBeSent.Rotation = Quaternion.Normalize(transformToBeSent.Rotation); m_localHeadTransformTool.Value = transformToBeSent; } }
public MatrixD GetHeadMatrix(bool includeY, bool includeX = true, bool forceHeadAnim = false, bool forceHeadBone = false, bool preferLocalOverSync = false) { if (preferLocalOverSync || ControllerInfo.IsLocallyControlled()) { int headBone = IsInFirstPersonView || forceHeadBone || ForceFirstPersonCamera ? m_headBoneIndex : m_camera3rdBoneIndex; MatrixD headMatrix = GetHeadMatrixInternal(headBone, includeY, includeX, forceHeadAnim, forceHeadBone); MatrixD headMatrixLocal = headMatrix * PositionComp.WorldMatrixInvScaled; MyTransform transformToBeSent = new MyTransform(headMatrixLocal); transformToBeSent.Rotation = Quaternion.Normalize(transformToBeSent.Rotation); m_localHeadTransform.Value = transformToBeSent; return headMatrix; } else { return m_localHeadTransform.Value.TransformMatrix * PositionComp.WorldMatrix; } }
public static void Transform(ref Vector3 v, ref MyTransform t2, out Vector3 result) { Vector3.Transform(ref v, ref t2.Rotation, out result); result += t2.Position; }
public static Vector3 Transform(ref Vector3 v, ref MyTransform t2) { Vector3 result; Transform(ref v, ref t2, out result); return result; }
public static MyTransform Transform(ref MyTransform t1, ref MyTransform t2) { MyTransform result; Transform(ref t1, ref t2, out result); return result; }