00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GEOM_VECMAT2_OP_HH
00020 #define GEOM_VECMAT2_OP_HH
00021
00022 #include "constants.hh"
00023
00024 #include <ost/geom/module_config.hh>
00025
00026 namespace geom {
00027
00028 class Vec2;
00029 class Mat2;
00030
00032 Real DLLEXPORT_OST_GEOM Length(const Vec2& v);
00033
00035 Real DLLEXPORT_OST_GEOM Length2(const Vec2& v);
00036
00038 bool DLLEXPORT_OST_GEOM Equal(const Vec2& v1, const Vec2& v2, Real ephilon=EPSILON);
00040 bool DLLEXPORT_OST_GEOM Equal(const Mat2& m1, const Mat2& m2, Real ephilon=EPSILON);
00041
00043 Real DLLEXPORT_OST_GEOM Dot(const Vec2& v1, const Vec2& v2);
00044
00046 Vec2 DLLEXPORT_OST_GEOM Normalize(const Vec2& v);
00047
00049 Vec2 DLLEXPORT_OST_GEOM CompMultiply(const Vec2& v1, const Vec2& v2);
00050
00052 Vec2 DLLEXPORT_OST_GEOM CompDivide(const Vec2& v1, const Vec2& v2);
00053
00055
00061 Vec2 DLLEXPORT_OST_GEOM operator*(const Vec2& v,const Mat2& m);
00062
00064
00070 Vec2 DLLEXPORT_OST_GEOM operator*(const Mat2& m, const Vec2& v);
00071
00073 Real DLLEXPORT_OST_GEOM Det(const Mat2& m);
00075 Mat2 DLLEXPORT_OST_GEOM Transpose(const Mat2& m);
00076
00078 Mat2 DLLEXPORT_OST_GEOM Invert(const Mat2& m);
00079
00081 Real DLLEXPORT_OST_GEOM Angle(const Vec2& v1, const Vec2& v2);
00083 Real DLLEXPORT_OST_GEOM SignedAngle(const Vec2& v1, const Vec2& v2);
00084
00086 Mat2 DLLEXPORT_OST_GEOM operator*(const Mat2& m1, const Mat2& m2);
00087
00089 Vec2 DLLEXPORT_OST_GEOM Min(const Vec2& v1, const Vec2& v2);
00090
00092 Vec2 DLLEXPORT_OST_GEOM Max(const Vec2& v1, const Vec2& v2);
00093
00095 DLLEXPORT Vec2 Rotate(const Vec2& v,Real ang);
00096
00097 }
00098
00099 #endif