00001 #include <TooN/TooN.h> 00002 00003 using namespace TooN; 00004 extern "C"{ 00005 00006 Vector<3> add_static(const Vector<3>& a, const Vector<3>& b) 00007 { 00008 Vector<3> t; 00009 for(int i=0; i < 3; i++) 00010 t[i] = a[i] + b[i]; 00011 00012 Vector<3> t1 = t; 00013 Vector<3> t2 = t1; 00014 return t2; 00015 } 00016 00017 Vector<-1> add_dynamic(const Vector<-1>& a, const Vector<-1>& b) 00018 { 00019 Vector<> t(a.size()); 00020 for(int i=0; i < 3; i++) 00021 t[i] = a[i] + b[i]; 00022 Vector<> t1 = t; 00023 Vector<> t2 = t1; 00024 return t2; 00025 } 00026 00027 }