MCPcopy Create free account
hub / github.com/defold/defold / GetGridShapeData

Function GetGridShapeData

engine/physics/src/physics/box2d/box2d_physics.cpp:1007–1020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1005 }
1006
1007 static inline GridShapeData* GetGridShapeData(Body* body, uint32_t index)
1008 {
1009 if (index >= body->m_ShapeCount)
1010 {
1011 return 0;
1012 }
1013
1014 ShapeData* shape_data = body->m_Shapes[index];
1015 if (shape_data == 0 || shape_data->m_Type != SHAPE_TYPE_GRID)
1016 {
1017 return 0;
1018 }
1019 return (GridShapeData*) shape_data;
1020 }
1021
1022 static int GetGridCellVertices(GridShapeData* shape_data, int index, b2Vec2* vertices)
1023 {

Callers 3

CreateGridCellShapeFunction · 0.85
SetGridShapeHullFunction · 0.85
SetGridShapeEnableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected