MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getCenter

Method getCenter

game/state/tilemap/tileobject.h:50–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 // Vector from object position to object center
49 virtual Vec3<float> getCenterOffset() const { return {0.0f, 0.0f, 0.0f}; }
50 virtual Vec3<float> getCenter() const { return getPosition() + getCenterOffset(); };
51
52 // Used to calculate draw order
53 virtual float getZOrder() const { return getCenter().z + (float)getType() / 1000.0f; }

Callers 13

getDistanceToMethod · 0.95
operator()Method · 0.80
findCollisionMethod · 0.80
dieMethod · 0.80
dieMethod · 0.80
dieMethod · 0.80
setPositionMethod · 0.80
calculateVisionToUnitMethod · 0.80
applyDamageMethod · 0.80
renderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected