Example #1
0
 /// <summary>Constructs and initializes a Vector4f from the specified Tuple3f.</summary>
 /// <remarks>
 /// Constructs and initializes a Vector4f from the specified Tuple3f.
 /// The x,y,z components of this vector are set to the corresponding
 /// components of tuple t1.  The w component of this vector
 /// is set to 0.
 /// </remarks>
 /// <param name="t1">the tuple to be copied</param>
 /// <since>vecmath 1.2</since>
 public Vector4f(Tuple3f t1)
     : base(t1.x, t1.y, t1.z, 0.0f)
 {
 }
Example #2
0
 /// <summary>
 /// Multiply this matrix by the tuple t and and place the result
 /// into the tuple "result" (result = this*t).
 /// </summary>
 /// <remarks>
 /// Multiply this matrix by the tuple t and and place the result
 /// into the tuple "result" (result = this*t).
 /// </remarks>
 /// <param name="t">the tuple to be multiplied by this matrix</param>
 /// <param name="result">the tuple into which the product is placed</param>
 public void Transform(Tuple3f t, Tuple3f result)
 {
     float x;
     float y;
     float z;
     x = m00 * t.x + m01 * t.y + m02 * t.z;
     y = m10 * t.x + m11 * t.y + m12 * t.z;
     result.z = m20 * t.x + m21 * t.y + m22 * t.z;
     result.x = x;
     result.y = y;
 }
Example #3
0
 // Compatible with 1.1
 /// <summary>
 /// Sets the x,y,z components of this vector to the corresponding
 /// components of tuple t1.
 /// </summary>
 /// <remarks>
 /// Sets the x,y,z components of this vector to the corresponding
 /// components of tuple t1.  The w component of this vector
 /// is set to 0.
 /// </remarks>
 /// <param name="t1">the tuple to be copied</param>
 /// <since>vecmath 1.2</since>
 public void Set(Tuple3f t1)
 {
     this.x = t1.x;
     this.y = t1.y;
     this.z = t1.z;
     this.w = 0.0f;
 }
Example #4
0
 /**
  * Copy constructor.
  *
  * @param tuple Tuple.
  */
 public Vector3f(Tuple3f tuple)
 {
     this.x = tuple.GetX();
     this.y = tuple.GetY();
     this.z = tuple.GetZ();
 }
Example #5
0
 /// <summary>
 /// Multiply this matrix by the tuple t and place the result
 /// back into the tuple (t = this*t).
 /// </summary>
 /// <remarks>
 /// Multiply this matrix by the tuple t and place the result
 /// back into the tuple (t = this*t).
 /// </remarks>
 /// <param name="t">the tuple to be multiplied by this matrix and then replaced</param>
 public void Transform(Tuple3f t)
 {
     float x;
     float y;
     float z;
     x = m00 * t.x + m01 * t.y + m02 * t.z;
     y = m10 * t.x + m11 * t.y + m12 * t.z;
     z = m20 * t.x + m21 * t.y + m22 * t.z;
     t.Set(x, y, z);
 }
Example #6
0
 /// <summary>Constructs and initializes a Point3f from the specified Tuple3f.</summary>
 /// <remarks>Constructs and initializes a Point3f from the specified Tuple3f.</remarks>
 /// <param name="t1">the Tuple3f containing the initialization x y z data</param>
 public Point3f(Tuple3f t1)
     : base(t1)
 {
 }
Example #7
0
 /// <summary>Constructs and initializes a Color3f from the specified Tuple3f.</summary>
 /// <remarks>Constructs and initializes a Color3f from the specified Tuple3f.</remarks>
 /// <param name="t1">the Tuple3f containing the initialization x y z data</param>
 public Color3f(Tuple3f t1)
     : base(t1)
 {
 }
 public bool Equals(Tuple3f other)
 {
     return(Equals(other.GetX(),
                   other.GetY(),
                   other.GetZ()));
 }
 public bool EpsilonEquals(Tuple3f other, double epsilon = EPSILON)
 {
     return(EpsilonEquals(other.GetX(),
                          other.GetY(),
                          other.GetZ(), epsilon));
 }
Example #10
0
 /// <summary>Constructs and initializes a Vector3f from the specified Tuple3f.</summary>
 /// <remarks>Constructs and initializes a Vector3f from the specified Tuple3f.</remarks>
 /// <param name="t1">the Tuple3f containing the initialization x y z data</param>
 public Vector3f(Tuple3f t1)
     : base(t1)
 {
 }
 /**
  * Copy constructor.
  *
  * @param tuple Tuple.
  */
 public BuffTuple3f(Tuple3f tuple)
 {
     this.x = tuple.GetX();
     this.y = tuple.GetY();
     this.z = tuple.GetZ();
 }
Example #12
0
 /// <summary>Constructs and initializes a TexCoord3f from the specified Tuple3f.</summary>
 /// <remarks>Constructs and initializes a TexCoord3f from the specified Tuple3f.</remarks>
 /// <param name="t1">the Tuple3f containing the initialization x y z data</param>
 public TexCoord3f(Tuple3f t1)
     : base(t1)
 {
 }
Example #13
0
 /// <summary>Constructs and initializes a Point4f from the specified Tuple3f.</summary>
 /// <remarks>
 /// Constructs and initializes a Point4f from the specified Tuple3f.
 /// The x,y,z components of this point are set to the corresponding
 /// components of tuple t1.  The w component of this point
 /// is set to 1.
 /// </remarks>
 /// <param name="t1">the tuple to be copied</param>
 /// <since>vecmath 1.2</since>
 public Point4f(Tuple3f t1)
     : base(t1.x, t1.y, t1.z, 1.0f)
 {
 }
Example #14
0
 /// <summary>Constructs and initializes a Tuple3d from the specified Tuple3f.</summary>
 /// <remarks>Constructs and initializes a Tuple3d from the specified Tuple3f.</remarks>
 /// <param name="t1">the Tuple3f containing the initialization x y z data</param>
 public Tuple3d(Tuple3f t1)
 {
     this.x = (double)t1.x;
     this.y = (double)t1.y;
     this.z = (double)t1.z;
 }
Example #15
0
 /// <summary>Sets the value of this tuple to the value of tuple t1.</summary>
 /// <remarks>Sets the value of this tuple to the value of tuple t1.</remarks>
 /// <param name="t1">the tuple to be copied</param>
 public void Set(Tuple3f t1)
 {
     this.x = (double)t1.x;
     this.y = (double)t1.y;
     this.z = (double)t1.z;
 }
Example #16
0
 public void ScaleAdd(double s, Tuple3f t1)
 {
     ScaleAdd(s, new Point3d(t1));
 }