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

Method WriteCache

CollisionB2Distance.go:297–305  ·  view source on GitHub ↗
(cache *B2SimplexCache)

Source from the content-addressed store, hash-verified

295}
296
297func (simplex B2Simplex) WriteCache(cache *B2SimplexCache) {
298 cache.Metric = simplex.GetMetric()
299 cache.Count = simplex.M_count
300 vertices := &simplex.M_vs
301 for i := 0; i < simplex.M_count; i++ {
302 cache.IndexA[i] = vertices[i].IndexA
303 cache.IndexB[i] = vertices[i].IndexB
304 }
305}
306
307func (simplex B2Simplex) GetSearchDirection() B2Vec2 {
308 switch simplex.M_count {

Callers 1

B2DistanceFunction · 0.80

Calls 1

GetMetricMethod · 0.95

Tested by

no test coverage detected