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

Function MakeB2Joint

DynamicsB2Joint.go:365–384  ·  view source on GitHub ↗
(def B2JointDefInterface)

Source from the content-addressed store, hash-verified

363}
364
365func MakeB2Joint(def B2JointDefInterface) *B2Joint { // def has to be backed by pointer
366 B2Assert(def.GetBodyA() != def.GetBodyB())
367
368 res := B2Joint{}
369
370 res.M_type = def.GetType()
371 res.M_prev = nil
372 res.M_next = nil
373 res.M_bodyA = def.GetBodyA()
374 res.M_bodyB = def.GetBodyB()
375 res.M_index = 0
376 res.M_collideConnected = def.IsCollideConnected()
377 res.M_islandFlag = false
378 res.M_userData = def.GetUserData()
379
380 res.M_edgeA = &B2JointEdge{}
381 res.M_edgeB = &B2JointEdge{}
382
383 return &res
384}
385
386func (j B2Joint) IsActive() bool {
387 return j.M_bodyA.IsActive() && j.M_bodyB.IsActive()

Callers 11

MakeB2WeldJointFunction · 0.85
MakeB2RopeJointFunction · 0.85
MakeB2PrismaticJointFunction · 0.85
MakeB2WheelJointFunction · 0.85
MakeB2MotorJointFunction · 0.85
MakeB2PulleyJointFunction · 0.85
MakeB2GearJointFunction · 0.85
MakeB2FrictionJointFunction · 0.85
MakeB2DistanceJointFunction · 0.85
MakeB2RevoluteJointFunction · 0.85
MakeB2MouseJointFunction · 0.85

Calls 6

B2AssertFunction · 0.85
GetBodyAMethod · 0.65
GetBodyBMethod · 0.65
GetTypeMethod · 0.65
IsCollideConnectedMethod · 0.65
GetUserDataMethod · 0.65

Tested by

no test coverage detected