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

Method RayCast

CollisionB2ShapeChain.go:161–176  ·  view source on GitHub ↗
(output *B2RayCastOutput, input B2RayCastInput, xf B2Transform, childIndex int)

Source from the content-addressed store, hash-verified

159}
160
161func (chain B2ChainShape) RayCast(output *B2RayCastOutput, input B2RayCastInput, xf B2Transform, childIndex int) bool {
162 B2Assert(childIndex < chain.M_count)
163
164 edgeShape := MakeB2EdgeShape()
165
166 i1 := childIndex
167 i2 := childIndex + 1
168 if i2 == chain.M_count {
169 i2 = 0
170 }
171
172 edgeShape.M_vertex1 = chain.M_vertices[i1]
173 edgeShape.M_vertex2 = chain.M_vertices[i2]
174
175 return edgeShape.RayCast(output, input, xf, 0)
176}
177
178func (chain B2ChainShape) ComputeAABB(aabb *B2AABB, xf B2Transform, childIndex int) {
179 B2Assert(childIndex < chain.M_count)

Callers

nothing calls this directly

Calls 3

B2AssertFunction · 0.85
MakeB2EdgeShapeFunction · 0.85
RayCastMethod · 0.65

Tested by

no test coverage detected