MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / Contact

Class Contact

src/main/java/trace/physics/PhysicsSystem.kt:42–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 val allPhysicsLines = mutableSetOf<FLineToPhysics>();
41
42 var TICK = 0L;
43
44 class Contact(val tick: Long, val A: FLine, val B: FLine) {
45 var terminated = -1L
46
47 override fun equals(other: Any?): Boolean {
48 if (this === other) return true
49 if (other !is Contact) return false
50
51 if (A != other.A) return false
52 if (B != other.B) return false
53
54 return true
55 }
56
57 override fun hashCode(): Int {
58 var result = A.hashCode()
59 result = 31 * result + B.hashCode()
60 return result
61 }
62
63 var points: List<field.linalg.Vec2>? = null
64 }
65

Callers 2

beginContactMethod · 0.85
endContactMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected