(body *B2Body, def *B2FixtureDef)
| 204 | } |
| 205 | |
| 206 | func (fix *B2Fixture) Create(body *B2Body, def *B2FixtureDef) { |
| 207 | fix.M_userData = def.UserData |
| 208 | fix.M_friction = def.Friction |
| 209 | fix.M_restitution = def.Restitution |
| 210 | |
| 211 | fix.M_body = body |
| 212 | fix.M_next = nil |
| 213 | |
| 214 | fix.M_filter = def.Filter |
| 215 | |
| 216 | fix.M_isSensor = def.IsSensor |
| 217 | |
| 218 | fix.M_shape = def.Shape.Clone() |
| 219 | |
| 220 | // Reserve proxy space |
| 221 | childCount := fix.M_shape.GetChildCount() |
| 222 | fix.M_proxies = make([]B2FixtureProxy, childCount) |
| 223 | |
| 224 | for i := 0; i < childCount; i++ { |
| 225 | fix.M_proxies[i].Fixture = nil |
| 226 | fix.M_proxies[i].ProxyId = E_nullProxy |
| 227 | } |
| 228 | fix.M_proxyCount = 0 |
| 229 | |
| 230 | fix.M_density = def.Density |
| 231 | } |
| 232 | |
| 233 | func (fix *B2Fixture) Destroy() { |
| 234 |
no test coverage detected