#ifndef D2SIMPLEX_H
#define D2SIMPLEX_H

#include <print.h>
#include <point.h>

typedef point2<double> const pt2c;



/*!
\brief A triangle in 2D.
*/
class d2simplex
{
public:

  /** Ordered in anticlockwise direction. */
  point2<double> v[3];

  /** Do the two simplexes intersect? */
  bool const intersects(d2simplex const & s2) const;

  /** If one simplex sees the other there is no intersection. */
  bool const sees(d2simplex const & s2) const;

  /** Anticlockwise rotation of the simplex about its center. */
  void rotate(doublec theta);

  /** Shift the simplex. */
  void translate( pt2c & x );

};







#endif



