MCPcopy Create free account
hub / github.com/EricLengyel/Terathon-Math-Library / Transform

Method Transform

TSMotor3D.cpp:213–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213FlatPoint3D 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
241Point3D Terathon::Transform(const Point3D& p, const Motor3D& Q)
242{

Callers

nothing calls this directly

Calls 6

VecLoadUnalignedFunction · 0.85
VecSmearWFunction · 0.85
VecCross3DFunction · 0.85
VecStore3DFunction · 0.85
FlatPoint3DClass · 0.85
Plane3DClass · 0.85

Tested by

no test coverage detected