(aabb *B2AABB, xf B2Transform, childIndex int)
| 176 | } |
| 177 | |
| 178 | func (chain B2ChainShape) ComputeAABB(aabb *B2AABB, xf B2Transform, childIndex int) { |
| 179 | B2Assert(childIndex < chain.M_count) |
| 180 | |
| 181 | i1 := childIndex |
| 182 | i2 := childIndex + 1 |
| 183 | if i2 == chain.M_count { |
| 184 | i2 = 0 |
| 185 | } |
| 186 | |
| 187 | v1 := B2TransformVec2Mul(xf, chain.M_vertices[i1]) |
| 188 | v2 := B2TransformVec2Mul(xf, chain.M_vertices[i2]) |
| 189 | |
| 190 | aabb.LowerBound = B2Vec2Min(v1, v2) |
| 191 | aabb.UpperBound = B2Vec2Max(v1, v2) |
| 192 | } |
| 193 | |
| 194 | func (chain B2ChainShape) ComputeMass(massData *B2MassData, density float64) { |
| 195 | massData.Mass = 0.0 |
nothing calls this directly
no test coverage detected