/** * Copy constructor. * * @param tuple Tuple. */ public BuffTuple4f(Tuple tuple) { if (tuple is Tuple4f) { Tuple4f _tuple = (Tuple4f)tuple; this.x = _tuple.GetX(); this.y = _tuple.GetY(); this.z = _tuple.GetZ(); this.w = _tuple.GetW(); } else if (tuple is BuffTuple4f) { BuffTuple4f _tuple = (BuffTuple4f)tuple; this.x = _tuple.GetX(); this.y = _tuple.GetY(); this.z = _tuple.GetZ(); this.w = _tuple.GetW(); } else { Tuple4f _tuple = new Tuple4f(tuple); this.x = _tuple.GetX(); this.y = _tuple.GetY(); this.z = _tuple.GetZ(); this.w = _tuple.GetW(); } }
public bool Equals(Tuple4f other) { return(Equals(other.GetX(), other.GetY(), other.GetZ(), other.GetW())); }
public bool EpsilonEquals(Tuple4f other, double epsilon = EPSILON) { return(EpsilonEquals(other.GetX(), other.GetY(), other.GetZ(), other.GetW(), epsilon)); }
/** * Copy constructor. * * @param tuple Tuple. */ public Vector4f(Tuple4f tuple) { this.x = tuple.GetX(); this.y = tuple.GetY(); this.z = tuple.GetZ(); this.w = tuple.GetW(); }
/** * Copy constructor. * * @param tuple Tuple. */ public BuffTuple4f(Tuple4f tuple) { this.x = tuple.GetX(); this.y = tuple.GetY(); this.z = tuple.GetZ(); this.w = tuple.GetW(); }
/// <summary> Constructs and initializes a Quat4d from the specified Tuple4f. </summary> /// <param name="t1">the Tuple4f containing the initialization x y z w data /// </param> public Quat4d(Tuple4f t1) { double mag; mag = 1.0 / System.Math.Sqrt(t1.x * t1.x + t1.y * t1.y + t1.z * t1.z + t1.w * t1.w); x = t1.x * mag; y = t1.y * mag; z = t1.z * mag; w = t1.w * mag; }
/// <summary> Constructs and initializes a Quat4f from the specified Tuple4f. </summary> /// <param name="t1">the Tuple4f containing the initialization x y z w data /// </param> public Quat4f(Tuple4f t1) { float mag; //UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'" mag = (float) (1.0 / System.Math.Sqrt(t1.x * t1.x + t1.y * t1.y + t1.z * t1.z + t1.w * t1.w)); x = t1.x * mag; y = t1.y * mag; z = t1.z * mag; w = t1.w * mag; }
/// <summary> Constructs and initializes a Vector4d from the specified Tuple4f.</summary> /// <param name="t1">the Tuple4f containing the initialization x y z w data /// </param> public Vector4d(Tuple4f t1):base(t1) { }
/// <summary> Sets the value of this tuple to the value of tuple t1.</summary> /// <param name="t1">the tuple to be copied /// </param> public void set_Renamed(Tuple4f t1) { x = t1.x; y = t1.y; z = t1.z; w = t1.w; }
/// <summary> Constructs and initializes a Tuple4d from the specified Tuple4f.</summary> /// <param name="t1">the Tuple4f containing the initialization x y z w data /// </param> public Tuple4d(Tuple4f t1) { set_Renamed(t1); }
/// <summary> Transform the vector vec using this Matrix4f and place the /// result back into vec. /// </summary> /// <param name="vec">the single precision vector to be transformed /// </param> public void transform(Tuple4f vec) { transform(vec, vec); }
/// <summary> Returns a hash number based on the data values in this /// object. Two different Matrix4f objects with identical data values /// (ie, returns true for equals(Matrix4f) ) will return the same hash /// number. Two objects with different data members may return the /// same hash value, although this is not likely. /// </summary> /// <returns> the integer hash value /// </returns> //public override int GetHashCode() //{ // //UPGRADE_ISSUE: Method 'java.lang.Float.floatToIntBits' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangFloatfloatToIntBits_float'" // return Float.floatToIntBits(m00) ^ Float.floatToIntBits(m01) ^ Float.floatToIntBits(m02) ^ Float.floatToIntBits(m03) ^ Float.floatToIntBits(m10) ^ Float.floatToIntBits(m11) ^ Float.floatToIntBits(m12) ^ Float.floatToIntBits(m13) ^ Float.floatToIntBits(m20) ^ Float.floatToIntBits(m21) ^ Float.floatToIntBits(m22) ^ Float.floatToIntBits(m23) ^ Float.floatToIntBits(m30) ^ Float.floatToIntBits(m31) ^ Float.floatToIntBits(m32) ^ Float.floatToIntBits(m33); //} /// <summary> Transform the vector vec using this Matrix4f and place the /// result into vecOut. /// </summary> /// <param name="vec">the single precision vector to be transformed /// </param> /// <param name="vecOut">the vector into which the transformed values are placed /// </param> public void transform(Tuple4f vec, Tuple4f vecOut) { // alias-safe vecOut.set_Renamed(m00 * vec.x + m01 * vec.y + m02 * vec.z + m03 * vec.w, m10 * vec.x + m11 * vec.y + m12 * vec.z + m13 * vec.w, m20 * vec.x + m21 * vec.y + m22 * vec.z + m23 * vec.w, m30 * vec.x + m31 * vec.y + m32 * vec.z + m33 * vec.w); }
/// <summary> Constructs and initializes a Point4f from the specified Tuple4f.</summary> /// <param name="t1">the Tuple4f containing the initialization x y z w data /// </param> public Point4f(Tuple4f t1):base(t1) { }
/// <summary> Transform the vector vec using this Matrix4d and place the /// result into vecOut. /// </summary> /// <param name="vec">the single precision vector to be transformed /// </param> /// <param name="vecOut">the vector into which the transformed values are placed /// </param> public void transform(Tuple4f vec, Tuple4f vecOut) { // alias-safe //UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'" vecOut.set_Renamed((float) (m00 * vec.x + m01 * vec.y + m02 * vec.z + m03 * vec.w), (float) (m10 * vec.x + m11 * vec.y + m12 * vec.z + m13 * vec.w), (float) (m20 * vec.x + m21 * vec.y + m22 * vec.z + m23 * vec.w), (float) (m30 * vec.x + m31 * vec.y + m32 * vec.z + m33 * vec.w)); }