/*	File: Triangle.h
 *
 *	Interface Description:
 *		Provides a concrete class Triangle which is a kind of a closed
 *		stretchable figure.
 *		See also Figure.h, ClosedF.h, StretchF.h, CloStreF.h.
 *	History:
 *		Date:		 Author:	 Change:
 *		97-05-14	 KHU		 Creation.
 */

#ifndef TRIANGLE_H_
#define TRIANGLE_H_

#include "CloStreF.h"

	const int triangleNbrOfPoints = 3;

	class Triangle : virtual public ClosedStretchableFigure
	{
	protected:
		// Attributes:

		CoordinatePair delta [triangleNbrOfPoints];

		// Commands:

		void Draw ();

	public:
		// Queries:

		Float Extent () const;

		Float Area () const;

		CoordinatePair Point (int nbr) const;
			// Precondition: 0 <= nbr < triangleNbrOfPoints.

		// Commands:

		void Stretch (/* IN */ const CoordinatePair & factor);

		// Constructors:

		Triangle
			(/* IN */ const CoordinatePair & point0,
			 /* IN */ const CoordinatePair & point1,
			 /* IN */ const CoordinatePair & point2);

	protected:
		void CheckInvariant ();

	}; // Triangle

#endif // TRIANGLE_H_