MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / Island

Method Island

src/engine/Island.cpp:33–41  ·  view source on GitHub ↗

Constructor

Source from the content-addressed store, hash-verified

31
32// Constructor
33Island::Island(uint32 nbMaxBodies, uint32 nbMaxContactManifolds, MemoryManager& memoryManager)
34 : mBodies(nullptr), mContactManifolds(nullptr), mNbBodies(0), mNbContactManifolds(0) {
35
36 // Allocate memory for the arrays on the single frame allocator
37 mBodies = static_cast<RigidBody**>(memoryManager.allocate(MemoryManager::AllocationType::Frame,
38 sizeof(RigidBody*) * nbMaxBodies));
39 mContactManifolds = static_cast<ContactManifold**>(memoryManager.allocate(MemoryManager::AllocationType::Frame,
40 sizeof(ContactManifold*) * nbMaxContactManifolds));
41}
42
43// Destructor
44Island::~Island() {

Callers

nothing calls this directly

Calls 1

allocateMethod · 0.45

Tested by

no test coverage detected