19 #ifndef GEOM_VECMAT3_OP_HH
20 #define GEOM_VECMAT3_OP_HH
35 return v[0]*v[0]+v[1]*v[1]+v[2]*v[2];
48 return std::fabs(v1[0]-v2[0])<ephilon &&
49 std::fabs(v1[1]-v2[1])<ephilon &&
50 std::fabs(v1[2]-v2[2])<ephilon;
57 return std::fabs(m1(0,0)-m2(0,0))<ephilon &&
58 std::fabs(m1(0,1)-m2(0,1))<ephilon &&
59 std::fabs(m1(0,2)-m2(0,2))<ephilon &&
60 std::fabs(m1(1,0)-m2(1,0))<ephilon &&
61 std::fabs(m1(1,1)-m2(1,1))<ephilon &&
62 std::fabs(m1(1,2)-m2(1,2))<ephilon &&
63 std::fabs(m1(2,0)-m2(2,0))<ephilon &&
64 std::fabs(m1(2,1)-m2(2,1))<ephilon &&
65 std::fabs(m1(2,2)-m2(2,2))<ephilon;
71 return v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2];
87 Vec3 nrvo(v1[1]*v2[2]-v2[1]*v1[2],
88 v1[2]*v2[0]-v2[2]*v1[0],
89 v1[0]*v2[1]-v2[0]*v1[1]);
96 Vec3 nrvo(v1[0]*v2[0],v1[1]*v2[1],v1[2]*v2[2]);
103 Vec3 nrvo(v1[0]/v2[0],v1[1]/v2[1],v1[2]/v2[2]);
110 Vec3 nrvo(v[0]*m(0,0)+v[1]*m(1,0)+v[2]*m(2,0),
111 v[0]*m(0,1)+v[1]*m(1,1)+v[2]*m(2,1),
112 v[0]*m(0,2)+v[1]*m(1,2)+v[2]*m(2,2));
119 Vec3 nrvo(v[0]*m(0,0)+v[1]*m(0,1)+v[2]*m(0,2),
120 v[0]*m(1,0)+v[1]*m(1,1)+v[2]*m(1,2),
121 v[0]*m(2,0)+v[1]*m(2,1)+v[2]*m(2,2));
128 Mat3 nrvo(m1(0,0)*m2(0,0)+m1(0,1)*m2(1,0)+m1(0,2)*m2(2,0),
129 m1(0,0)*m2(0,1)+m1(0,1)*m2(1,1)+m1(0,2)*m2(2,1),
130 m1(0,0)*m2(0,2)+m1(0,1)*m2(1,2)+m1(0,2)*m2(2,2),
132 m1(1,0)*m2(0,0)+m1(1,1)*m2(1,0)+m1(1,2)*m2(2,0),
133 m1(1,0)*m2(0,1)+m1(1,1)*m2(1,1)+m1(1,2)*m2(2,1),
134 m1(1,0)*m2(0,2)+m1(1,1)*m2(1,2)+m1(1,2)*m2(2,2),
136 m1(2,0)*m2(0,0)+m1(2,1)*m2(1,0)+m1(2,2)*m2(2,0),
137 m1(2,0)*m2(0,1)+m1(2,1)*m2(1,1)+m1(2,2)*m2(2,1),
138 m1(2,0)*m2(0,2)+m1(2,1)*m2(1,2)+m1(2,2)*m2(2,2));
171 const Vec3& p3,
const Vec3&p4);
176 Vec3 nrvo(std::min(v1[0],v2[0]),
177 std::min(v1[1],v2[1]),
178 std::min(v1[2],v2[2]));
185 Vec3 nrvo(std::max(v1[0],v2[0]),
186 std::max(v1[1],v2[1]),
187 std::max(v1[2],v2[2]));