| 211 | } |
| 212 | |
| 213 | FlatPoint3D Terathon::Transform(const FlatPoint3D& p, const Motor3D& Q) |
| 214 | { |
| 215 | #ifdef TERATHON_SSE |
| 216 | |
| 217 | FlatPoint3D result; |
| 218 | |
| 219 | vec_float q = VecLoadUnaligned(&p.x); |
| 220 | vec_float v = VecLoadUnaligned(&Q.v.x); |
| 221 | vec_float m = VecLoadUnaligned(&Q.m.x); |
| 222 | vec_float qw = VecSmearW(q); |
| 223 | vec_float vw = VecSmearW(v); |
| 224 | vec_float mw = VecSmearW(m); |
| 225 | |
| 226 | vec_float a = VecCross3D(v, q) + m * qw; |
| 227 | vec_float u = VecCross3D(v, a) + a * vw - v * (mw * qw); |
| 228 | |
| 229 | VecStore3D(q + (u + u), &result.x); |
| 230 | result.w = p.w; |
| 231 | return (result); |
| 232 | |
| 233 | #else |
| 234 | |
| 235 | Bivector3D a = (!Q.v.xyz ^ p.xyz) + Q.m.xyz * p.w; |
| 236 | return (FlatPoint3D(p.xyz + ((Q.v.xyz ^ a) + !a * Q.v.w - !Q.v.xyz * (Q.m.w * p.w)) * 2.0F, p.w)); |
| 237 | |
| 238 | #endif |
| 239 | } |
| 240 | |
| 241 | Point3D Terathon::Transform(const Point3D& p, const Motor3D& Q) |
| 242 | { |
nothing calls this directly
no test coverage detected