Beispiel #1
0
    public static Vector3 RotateAroundForward(Line _line)
    {
        _line.qV1.w = Mathf.Cos(Mathf.Deg2Rad * _line.rotation / 2);
        _line.qV1.x = Mathf.Sin(Mathf.Deg2Rad * _line.rotation / 2) * _line.forwardLocal.x;
        _line.qV1.y = Mathf.Sin(Mathf.Deg2Rad * _line.rotation / 2) * _line.forwardLocal.y;
        _line.qV1.z = Mathf.Sin(Mathf.Deg2Rad * _line.rotation / 2) * _line.forwardLocal.z;

        _line.qV2.w = Mathf.Cos(-Mathf.Deg2Rad * _line.rotation / 2);
        _line.qV2.x = Mathf.Sin(-Mathf.Deg2Rad * _line.rotation / 2) * _line.forwardLocal.x;
        _line.qV2.y = Mathf.Sin(-Mathf.Deg2Rad * _line.rotation / 2) * _line.forwardLocal.y;
        _line.qV2.z = Mathf.Sin(-Mathf.Deg2Rad * _line.rotation / 2) * _line.forwardLocal.z;

        return(QVector.GetImaginaryPart(_line.qV1 * QVector.SetVector3ToQuaternion(_line.rightLocalOri) * _line.qV2));
    }
Beispiel #2
0
 public static Vector3 GetImaginaryPart(QVector qV)
 {
     return(new Vector3(qV.x, qV.y, qV.z));
 }
Beispiel #3
0
 internal static extern bool calc_switch_cases(EffectiveAddress insn_ea,
     IntPtr /* SwitchDefinitionEx */ si,
     QVector<QVector<AddressDifference>> casevec,
     [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(QVector<EffectiveAddress>.Marshaler), MarshalCookie = "ea")]
     QVector<EffectiveAddress> targets);