EarClipping.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <ionMath.h>
5 
6 
7 namespace ion
8 {
9 
10  float Determinant(vec2f const & u, vec2f const & v);
11  bool IsPointInTriangle(vec2f const & a, vec2f const & b, vec2f const & c, vec2f const & point);
12  bool IsPointInOrOnTriangle(vec2f const & a, vec2f const & b, vec2f const & c, vec2f const & point);
13 
14  double Determinant(vec2d const & u, vec2d const & v);
15  bool IsPointInTriangle(vec2d const & a, vec2d const & b, vec2d const & c, vec2d const & point);
16  bool IsPointInOrOnTriangle(vec2d const & a, vec2d const & b, vec2d const & c, vec2d const & point);
17 
18  template <typename T>
19  struct STriangle2D
20  {
21  vec2<T> A, B, C;
22  };
23 
24  vector<STriangle2D<float>> TriangulateEarClipping(vector<vec2f> const & OriginalPoints);
25  vector<STriangle2D<double>> TriangulateEarClipping(vector<vec2d> const & OriginalPoints);
26 
27 }
float Determinant(vec2f const &u, vec2f const &v)
Definition: EarClipping.cpp:8
vec2< T > B
Definition: EarClipping.h:21
bool IsPointInOrOnTriangle(vec2f const &a, vec2f const &b, vec2f const &c, vec2f const &point)
Definition: EarClipping.cpp:18
Definition: EarClipping.h:19
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
vec2< T > C
Definition: EarClipping.h:21
vec2< T > A
Definition: EarClipping.h:21
bool IsPointInTriangle(vec2f const &a, vec2f const &b, vec2f const &c, vec2f const &point)
Definition: EarClipping.cpp:13
vector< STriangle2D< float > > TriangulateEarClipping(vector< vec2f > const &OriginalPoints)
Definition: EarClipping.cpp:94