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

Method GetLocalVector

DynamicsB2Body.go:246–248  ·  view source on GitHub ↗
(worldVector B2Vec2)

Source from the content-addressed store, hash-verified

244}
245
246func (body B2Body) GetLocalVector(worldVector B2Vec2) B2Vec2 {
247 return B2RotVec2MulT(body.M_xf.Q, worldVector)
248}
249
250func (body B2Body) GetLinearVelocityFromWorldPoint(worldPoint B2Vec2) B2Vec2 {
251 return B2Vec2Add(body.M_linearVelocity, B2Vec2CrossScalarVector(body.M_angularVelocity, B2Vec2Sub(worldPoint, body.M_sweep.C)))

Callers 2

InitializeMethod · 0.80
InitializeMethod · 0.80

Calls 1

B2RotVec2MulTFunction · 0.85

Tested by

no test coverage detected