00001
00002
00003
00004
00005
00006 #ifndef synaps_topology_triangle_H
00007 #define synaps_topology_triangle_H
00008
00009 #include <iostream>
00010 #include <synaps/init.h>
00011 #include <synaps/topology/vertex.h>
00012
00013 __BEGIN_NAMESPACE_SYNAPS
00014
00015 namespace topology
00016 {
00017
00021 template <class Point>
00022 class triangle
00023 {
00024
00025 public:
00026
00028 typedef topology::vertex< Point > Vertex;
00029
00030
00032 Vertex *a,*b,*c;
00033
00035 triangle() {}
00036
00038 triangle( Vertex *v1, Vertex *v2, Vertex *v3 )
00039 {
00040 a = v1;
00041 b = v2;
00042 c = v3;
00043 }
00044
00045 };
00046
00047 }
00048
00050 template < class Typ >
00051 std::ostream& operator << ( std::ostream& os, const topology::triangle< Typ >& t )
00052 {
00053 os << "Triangle("
00054 << (t.a)->point << " ; "
00055 << (t.b)->point << " ; "
00056 << (t.c)->point << ")\n";
00057 return os;
00058 }
00059
00060 __END_NAMESPACE_SYNAPS
00061
00062 #endif // synaps_topology_triangle_H