MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / transformFast

Function transformFast

physx/source/common/src/CmTransformUtils.h:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41// V3PrepareCross would help here, but it's not on all platforms yet...
42
43PX_FORCE_INLINE void transformFast(const FloatVArg wa, const Vec3VArg va, const Vec3VArg pa,
44 const FloatVArg wb, const Vec3VArg vb, const Vec3VArg pb,
45 FloatV& wo, Vec3V& vo, Vec3V& po)
46{
47 wo = FSub(FMul(wa, wb), V3Dot(va, vb));
48 vo = V3ScaleAdd(va, wb, V3ScaleAdd(vb, wa, V3Cross(va, vb)));
49
50 const Vec3V t1 = V3Scale(pb, FScaleAdd(wa, wa, FLoad(-0.5f)));
51 const Vec3V t2 = V3ScaleAdd(V3Cross(va, pb), wa, t1);
52 const Vec3V t3 = V3ScaleAdd(va, V3Dot(va, pb), t2);
53
54 po = V3ScaleAdd(t3, FLoad(2.f), pa);
55}
56
57PX_FORCE_INLINE void transformInvFast(const FloatVArg wa, const Vec3VArg va, const Vec3VArg pa,
58 const FloatVArg wb, const Vec3VArg vb, const Vec3VArg pb,

Callers 14

transformSafeMethod · 0.85
addCompoundMethod · 0.85
updateCompoundMethod · 0.85
contactHullHeightfield2Function · 0.85
overlapAABBTrianglesMethod · 0.85

Calls 8

FSubFunction · 0.50
FMulFunction · 0.50
V3DotFunction · 0.50
V3ScaleAddFunction · 0.50
V3CrossFunction · 0.50
V3ScaleFunction · 0.50
FScaleAddFunction · 0.50
FLoadFunction · 0.50

Tested by

no test coverage detected