Clone() public method

Return a copy of this vector.
public Clone ( ) : Vec2
return Vec2
Beispiel #1
0
 /// <summary>
 /// Create a matrix with given vectors as columns.
 /// </summary>
 /// <param name="c1">Column 1 of matrix</param>
 /// <param name="c2">Column 2 of matrix</param>
 public Mat22(Vec2 c1, Vec2 c2)
 {
     Ex = c1.Clone();
     Ey = c2.Clone();
 }
Beispiel #2
0
 /// <summary>
 /// Creates an AABB object using the given bounding vertices.
 /// </summary>
 /// <param name="lowerVertex">the bottom left vertex of the bounding box</param>
 /// <param name="maxVertex">the top right vertex of the bounding box</param>
 public AABB(Vec2 lowerVertex, Vec2 upperVertex)
 {
     this.lowerBound = lowerVertex.Clone(); // clone to be safe
     this.upperBound = upperVertex.Clone();
 }
Beispiel #3
0
 /// <summary>
 /// Initialize using a position vector and a rotation matrix.
 /// </summary>
 public Transform(Vec2 position, Rot r)
 {
     P = position.Clone();
     Q = r.Clone();
 }
Beispiel #4
0
 /// <summary>Initialize using a position vector and a rotation matrix. </summary>
 public Transform(Vec2 _position, Rot _R)
 {
     p = _position.Clone();
     q = _R.Clone();
 }
Beispiel #5
0
 /// <summary>
 /// Initialize using a position vector and a rotation matrix.
 /// </summary>
 public Transform(Vec2 position, Rot r)
 {
     P = position.Clone();
     Q = r.Clone();
 }
Beispiel #6
0
 /// <summary>
 /// Create a matrix with given vectors as columns.
 /// </summary>
 /// <param name="c1">Column 1 of matrix</param>
 /// <param name="c2">Column 2 of matrix</param>
 public Mat22(Vec2 c1, Vec2 c2)
 {
     Ex = c1.Clone();
     Ey = c2.Clone();
 }
Beispiel #7
0
 /// <summary>
 /// Create a matrix with given vectors as columns.
 /// </summary>
 /// <param name="c1">Column 1 of matrix</param>
 /// <param name="c2">Column 2 of matrix</param>
 public Mat22(Vec2 c1, Vec2 c2)
 {
     ex = c1.Clone();
     ey = c2.Clone();
 }
Beispiel #8
0
 /// <summary>
 /// Creates an AABB object using the given bounding vertices.
 /// </summary>
 /// <param name="lowerVertex">the bottom left vertex of the bounding box</param>
 /// <param name="upperVertex">the top right vertex of the bounding box</param>
 public AABB(Vec2 lowerVertex, Vec2 upperVertex)
 {
     LowerBound = lowerVertex.Clone(); // clone to be safe
     UpperBound = upperVertex.Clone();
 }