1
// Wild Magic Source Code
3
// http://www.geometrictools.com
4
// Copyright (c) 1998-2007
6
// This library is free software; you can redistribute it and/or modify it
7
// under the terms of the GNU Lesser General Public License as published by
8
// the Free Software Foundation; either version 2.1 of the License, or (at
9
// your option) any later version. The license is available for reading at
10
// either of the locations:
11
// http://www.gnu.org/copyleft/lgpl.html
12
// http://www.geometrictools.com/License/WildMagicLicense.pdf
13
// The license applies to versions 0 through 4 of Wild Magic.
15
// Version: 4.0.0 (2006/06/28)
17
#ifndef WM4TRIANGLE2_H
18
#define WM4TRIANGLE2_H
20
#include "Wm4FoundationLIB.h"
21
#include "Wm4Vector2.h"
30
// The triangle is represented as an array of three vertices, V0, V1,
34
Triangle2 (); // uninitialized
35
Triangle2 (const Vector2<Real>& rkV0, const Vector2<Real>& rkV1,
36
const Vector2<Real>& rkV2);
37
Triangle2 (const Vector2<Real> akV[3]);
39
// distance from the point Q to the triangle
40
Real DistanceTo (const Vector2<Real>& rkQ) const;
45
#include "Wm4Triangle2.inl"
47
typedef Triangle2<float> Triangle2f;
48
typedef Triangle2<double> Triangle2d;