5 public class Position : Vector3
22 * @param [in] a The Position X.
23 * @param [in] b The Position Y.
24 * @param [in] c The Position Z.
26 public Position(float a, float b, float c)
35 * @param [in] o The Vector Position X, Y, Z.
37 public Position(Vector3 o)
42 ///< name "X", type float (Position X value)
47 set { width = value; }
50 ///< name "Y", type float (Position Y value)
54 get { return height; }
55 set { height = value; }
58 ///< name "Z", type float (Position Z value)
63 set { depth = value; }
70 * @param [in] l The Position to add.
71 * @param [in] r The Position to add
72 * @return A reference to this
74 public static Position operator +(Position l, Position r)
76 return new Position(l.X + r.X, l.Y + r.Y, l.Z + r.Z);
83 * @param [in] l The Position to substract.
84 * @param [in] r The Position to substract
85 * @return A reference to this
87 public static Position operator -(Position l, Position r)
89 return new Position(l.X - r.X, l.Y - r.Y, l.Z - r.Z);
96 * @param [in] a The Position to multiply.
97 * @param [in] b The Position to multiply
98 * @return A reference to this
100 public static Position operator *(Position a, double b)
102 return new Position((int)(a.X * b), (int)(a.Y * b), (int)(a.Z * b));
109 * @param [in] a The Position to divide.
110 * @param [in] b The Position to divide
111 * @return float value of division operation
113 public static float operator /(Position a, Position b)
115 return (float)System.Math.Sqrt((a.X / b.X) * (a.Y / b.Y) * (a.Z / b.Z));
122 * @param [in] o The Position object to compare.
123 * @return bool, whether object equal or not
125 public override bool Equals(object obj)
127 Position r = obj as Position;
132 return this.X == r.X && this.Y == r.Y && this.Z == r.Z;
139 * @return int, hascode of position
141 public override int GetHashCode()
143 return base.GetHashCode();
150 * @return Position object
152 public Position Clone()
154 Position copy = new Position(X, Y, Z);