/// @Desc : Class represents a rectangle
class Rectangle <T>
{
public:
	/// rectangle corners
	T top;
    T bottom;
    T left;
    T right;
 
 	///----------------------------------------------------
	/// Constructors 
	///----------------------------------------------------

	/// if we use upper left point as origin point ..

	/// @Purpose : get the upper left corner of this rectangle as new point and return it .
	/// @Return : new point with x value = left and y value = top
	[ByVal] Point2D<T> getUpperLeftPoint();
	/// @Purpose :  get the lower right corner of this rectangle as new point and return it .
	/// @Purpose : new point with x value = right and y value = bottom
	[ByVal] Point2D<T> getLowerRightPoint();

	/// if we use lower left point as origin point ..

	/// @Purpose : get the lower left corner of this rectangle as new point and return it .
	/// @Return : new point with x value = left and y value = bottom
	[ByVal] Point2D<T> getLowerLeftPoint();
	/// @Purpose :  get the upper right corner of this rectangle as new point and return it .
	/// @Purpose : new point with x value = right and y value = top
	[ByVal] Point2D<T> getUpperRightPoint();
	///----------------------------------------------------
	/// Rectangle Methods
	///----------------------------------------------------
	
	///@Purpose: check if passed point fall in current rectangle
	///@Return:  true if it is, false otherwise
	boolean  isPointInRect ([IN] Point2D<T> point);
 
	///@Purpose: check if passed line fall in current rectangle
	///@Return:  true if it is, false otherwise
	boolean  IsLineInRect ( [IN] Line2D<T> line);
 
	///@Purpose: get rectangle center point
	///          in physics called center of gravity
	///@Return:  Point2D object
	Point2D<T> getCenterPoint();	
 
 
	///@Return: rectangle absolute height
	float getHeight();
	///@Return: rectangle absolute width
	float getWidth();
 	
	/// check if current rectangle is valid 
	/// return true if it is, otherwise false
	boolean isValid();
 

	/// @Purpose: get circle that current rectangle points are fall in its edge
	/// in other word circle the our rectangle will fall in
	/// remember that circle is always a circle not an ellipse so if the rectangle is
	/// not square the returned circle will contained the rectangle but the rectangle
	/// points may not be in circle edge.
	///
	/// @Return :circle object.
	Circle<T> getBoundCircle();
 
 	///----------------------------------------------------
	/// the following methods become:
	/// - Operators in C++ .
	///	- Normal methods in Java
	///----------------------------------------------------
 
 
	boolean equal   ( [IN] Rectangle<T> other );
	/// you can ignore it in java version .. 
	/// in c++ version it will become != .
	boolean Notequal( [IN] Rectangle<T> other );
};