Files Classes Functions Hierarchy
#include <trianglepartition.h>
Public Member Functions | |
| trianglepartition (T const &p0_, T const &p1_, T const &p2_) | |
| Anti clockwise point ordering. | |
| trianglepartition () | |
| Unconstructed triangle. | |
| void | construct (T const &p0_, T const &p1_, T const &p2_) |
| Construct this triangle from anti clockwise point ordering. | |
| boolc | isInside (T const &a) const |
| Is the point inside the triangle? | |
Public Attributes | |
| T | pi [3] |
| The three points of the triangle. | |
| halfspaceD2< T, D > | hi [3] |
| The halfspaces are opposite the vertex with the same index, and point inwards. | |
Definition at line 12 of file trianglepartition.h.
| trianglepartition< T, D >::trianglepartition | ( | T const & | p0_, | |
| T const & | p1_, | |||
| T const & | p2_ | |||
| ) | [inline] |
Anti clockwise point ordering.
Definition at line 54 of file trianglepartition.h.
00059 { 00060 construct(p0_,p1_,p2_); 00061 }
| trianglepartition< T, D >::trianglepartition | ( | ) | [inline] |
| void trianglepartition< T, D >::construct | ( | T const & | p0_, | |
| T const & | p1_, | |||
| T const & | p2_ | |||
| ) | [inline] |
Construct this triangle from anti clockwise point ordering.
Definition at line 65 of file trianglepartition.h.
00070 { 00071 pi[0] = p0_; 00072 pi[1] = p1_; 00073 pi[2] = p2_; 00074 00075 hi[0] = halfspaceD2<T,D>(pi[0],pi[1]); 00076 hi[1] = halfspaceD2<T,D>(pi[1],pi[2]); 00077 hi[2] = halfspaceD2<T,D>(pi[2],pi[0]); 00078 }
| boolc trianglepartition< T, D >::isInside | ( | T const & | a | ) | const [inline, virtual] |
Is the point inside the triangle?
Implements partitionspace< T >.
Definition at line 81 of file trianglepartition.h.
References trianglepartition< T, D >::hi.
00082 { 00083 for (uint i=0; i<3; ++i) 00084 if (!hi[i].isInside(x)) 00085 return false; 00086 00087 return true; 00088 }
| halfspaceD2<T,D> trianglepartition< T, D >::hi[3] |
The halfspaces are opposite the vertex with the same index, and point inwards.
Definition at line 21 of file trianglepartition.h.
Referenced by trianglepartition< T, D >::isInside().
| T trianglepartition< T, D >::pi[3] |
1.5.8