(fA *B2Fixture, indexA int, fB *B2Fixture, indexB int)
| 404 | } |
| 405 | |
| 406 | func MakeB2Contact(fA *B2Fixture, indexA int, fB *B2Fixture, indexB int) B2Contact { |
| 407 | |
| 408 | contact := B2Contact{} |
| 409 | contact.M_flags = B2Contact_Flag.E_enabledFlag |
| 410 | |
| 411 | contact.M_fixtureA = fA |
| 412 | contact.M_fixtureB = fB |
| 413 | |
| 414 | contact.M_indexA = indexA |
| 415 | contact.M_indexB = indexB |
| 416 | |
| 417 | contact.M_manifold = NewB2Manifold() |
| 418 | contact.M_manifold.PointCount = 0 |
| 419 | |
| 420 | contact.M_prev = nil |
| 421 | contact.M_next = nil |
| 422 | |
| 423 | contact.M_nodeA = NewB2ContactEdge() |
| 424 | |
| 425 | contact.M_nodeA.Contact = nil |
| 426 | contact.M_nodeA.Prev = nil |
| 427 | contact.M_nodeA.Next = nil |
| 428 | contact.M_nodeA.Other = nil |
| 429 | |
| 430 | contact.M_nodeB = NewB2ContactEdge() |
| 431 | |
| 432 | contact.M_nodeB.Contact = nil |
| 433 | contact.M_nodeB.Prev = nil |
| 434 | contact.M_nodeB.Next = nil |
| 435 | contact.M_nodeB.Other = nil |
| 436 | |
| 437 | contact.M_toiCount = 0 |
| 438 | |
| 439 | contact.M_friction = B2MixFriction(contact.M_fixtureA.M_friction, contact.M_fixtureB.M_friction) |
| 440 | contact.M_restitution = B2MixRestitution(contact.M_fixtureA.M_restitution, contact.M_fixtureB.M_restitution) |
| 441 | |
| 442 | contact.M_tangentSpeed = 0.0 |
| 443 | |
| 444 | return contact |
| 445 | } |
| 446 | |
| 447 | // Update the contact manifold and touching status. |
| 448 | // Note: do not assume the fixture AABBs are overlapping or are valid. |
no test coverage detected