public override bool Equals(object obj) { if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } Vertex2D rhs = (Vertex2D)obj; if (x != rhs.x) { return(false); } if (y != rhs.y) { return(false); } if (depth != rhs.depth) { return(false); } return(true); }
public static Vertex2D operator /(Vertex2D lhs, Vertex2D rhs) { Vertex2D result = new Vertex2D(lhs); result.x /= rhs.x == 0 ? 1 : rhs.x; result.y /= rhs.y == 0 ? 1 : rhs.y; return(result); }
public static Vertex2D operator *(Vertex2D lhs, int val) { Vertex2D result = new Vertex2D(lhs); result.x *= val; result.y *= val; return(result); }
public static Vertex2D operator *(Vertex2D lhs, Vertex2D rhs) { Vertex2D result = new Vertex2D(lhs); result.x *= rhs.x; result.y *= rhs.y; return(result); }
public Vertex2D(Vertex2D oth) { x = oth.x; y = oth.y; color = oth.color; diffuse = oth.diffuse; specular = oth.specular; depth = oth.depth; uv0 = oth.uv0; }
public static Vertex2D operator /(Vertex2D lhs, int val) { if (val == 0) { return(lhs); } Vertex2D result = new Vertex2D(lhs); result.x /= val; result.y /= val; return(result); }