contrib/gel/gtrl/gtrl_triangle.cxx
Go to the documentation of this file.
00001 // This is gel/gtrl/gtrl_triangle.cxx
00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00003 #pragma implementation
00004 #endif
00005 //:
00006 // \file
00007 // \author crossge@crd.ge.com
00008 
00009 #include "gtrl_triangle.h"
00010 
00011 gtrl_triangle::gtrl_triangle( gtrl_vertex_sptr p1, gtrl_vertex_sptr p2, gtrl_vertex_sptr p3)
00012   : p1_(p1), p2_(p2), p3_(p3),
00013     midpoint_( new gtrl_vertex( (p1->x()+p2->x()+p3->x())/3,
00014                                 (p1->y()+p2->y()+p3->y())/3))
00015 {
00016 }