public Vector4f Transform(Vector4f r) { return(new Vector4f(m[0, 0] * r.GetX() + m[0, 1] * r.GetY() + m[0, 2] * r.GetZ() + m[0, 3] * r.GetW(), m[1, 0] * r.GetX() + m[1, 1] * r.GetY() + m[1, 2] * r.GetZ() + m[1, 3] * r.GetW(), m[2, 0] * r.GetX() + m[2, 1] * r.GetY() + m[2, 2] * r.GetZ() + m[2, 3] * r.GetW(), m[3, 0] * r.GetX() + m[3, 1] * r.GetY() + m[3, 2] * r.GetZ() + m[3, 3] * r.GetW())); }
public Vector4f Cross(Vector4f r) { float x_ = y * r.GetZ() - z * r.GetY(); float y_ = z * r.GetX() - x * r.GetZ(); float z_ = x * r.GetY() - y * r.GetX(); return new Vector4f(x_, y_, z_, 0); }
public Vector4f Cross(Vector4f r) { float x_ = y * r.GetZ() - z * r.GetY(); float y_ = z * r.GetX() - x * r.GetZ(); float z_ = x * r.GetY() - y * r.GetX(); return(new Vector4f(x_, y_, z_, 0)); }
public Matrix4f InitRotation(Vector4f forward, Vector4f up, Vector4f right) { Vector4f f = forward; Vector4f r = right; Vector4f u = up; m[0, 0] = r.GetX(); m[0, 1] = r.GetY(); m[0, 2] = r.GetZ(); m[0, 3] = 0; m[1, 0] = u.GetX(); m[1, 1] = u.GetY(); m[1, 2] = u.GetZ(); m[1, 3] = 0; m[2, 0] = f.GetX(); m[2, 1] = f.GetY(); m[2, 2] = f.GetZ(); m[2, 3] = 0; m[3, 0] = 0; m[3, 1] = 0; m[3, 2] = 0; m[3, 3] = 1; return(this); }
public Vector4f Add(Vector4f r) { return(new Vector4f(x + r.GetX(), y + r.GetY(), z + r.GetZ(), w + r.GetW())); }
public float Dot(Vector4f r) { return(x * r.GetX() + y * r.GetY() + z * r.GetZ() + w * r.GetW()); }
public bool equals(Vector4f r) { return(x == r.GetX() && y == r.GetY() && z == r.GetZ() && w == r.GetW()); }
public Vector4f Div(Vector4f r) { return(new Vector4f(x / r.GetX(), y / r.GetY(), z / r.GetZ(), w / r.GetW())); }
public bool equals(Vector4f r) { return x == r.GetX() && y == r.GetY() && z == r.GetZ() && w == r.GetW(); }
public Vector4f Div(Vector4f r) { return new Vector4f(x / r.GetX(), y / r.GetY(), z / r.GetZ(), w / r.GetW()); }
public Vector4f Add(Vector4f r) { return new Vector4f(x + r.GetX(), y + r.GetY(), z + r.GetZ(), w + r.GetW()); }
public Vector4f Sub(Vector4f r) { return new Vector4f(x - r.GetX(), y - r.GetY(), z - r.GetZ(), w - r.GetW()); }
public Vector4f Mul(Vector4f r) { return new Vector4f(x * r.GetX(), y * r.GetY(), z * r.GetZ(), w * r.GetW()); }
public Vector4f Transform(Vector4f r) { return new Vector4f(m[0, 0] * r.GetX() + m[0, 1] * r.GetY() + m[0, 2] * r.GetZ() + m[0, 3] * r.GetW(), m[1, 0] * r.GetX() + m[1, 1] * r.GetY() + m[1, 2] * r.GetZ() + m[1, 3] * r.GetW(), m[2, 0] * r.GetX() + m[2, 1] * r.GetY() + m[2, 2] * r.GetZ() + m[2, 3] * r.GetW(), m[3, 0] * r.GetX() + m[3, 1] * r.GetY() + m[3, 2] * r.GetZ() + m[3, 3] * r.GetW()); }
public float GetX() { return(m_pos.GetX()); }
public Vector4f Sub(Vector4f r) { return(new Vector4f(x - r.GetX(), y - r.GetY(), z - r.GetZ(), w - r.GetW())); }
public Vector4f Mul(Vector4f r) { return(new Vector4f(x * r.GetX(), y * r.GetY(), z * r.GetZ(), w * r.GetW())); }
public float Dot(Vector4f r) { return x * r.GetX() + y * r.GetY() + z * r.GetZ() + w * r.GetW(); }