MCPcopy Create free account
hub / github.com/ByteArena/box2d / GetTransform

Method GetTransform

CommonB2Math.go:745–757  ·  view source on GitHub ↗
(xf *B2Transform, beta float64)

Source from the content-addressed store, hash-verified

743}
744
745func (sweep B2Sweep) GetTransform(xf *B2Transform, beta float64) {
746
747 xf.P = B2Vec2Add(
748 B2Vec2MulScalar(1.0-beta, sweep.C0),
749 B2Vec2MulScalar(beta, sweep.C),
750 )
751
752 angle := (1.0-beta)*sweep.A0 + beta*sweep.A
753 xf.Q.Set(angle)
754
755 // Shift to origin
756 xf.P.OperatorMinusInplace(B2RotVec2Mul(xf.Q, sweep.LocalCenter))
757}
758
759func (sweep *B2Sweep) Advance(alpha float64) {
760 B2Assert(sweep.Alpha0 < 1.0)

Callers 9

InitializeMethod · 0.45
FindMinSeparationMethod · 0.45
EvaluateMethod · 0.45
B2TimeOfImpactFunction · 0.45
GetWorldManifoldMethod · 0.45
B2ContactUpdateFunction · 0.45
TestPointMethod · 0.45
RayCastMethod · 0.45
MakeB2MouseJointFunction · 0.45

Calls 5

B2Vec2AddFunction · 0.85
B2Vec2MulScalarFunction · 0.85
B2RotVec2MulFunction · 0.85
SetMethod · 0.45
OperatorMinusInplaceMethod · 0.45

Tested by

no test coverage detected