/// //Initializes an asset buffer // //Parameters: // buffer: pointer to the buffer to initialize static void AssetManager_InitializeBuffer(AssetBuffer* buffer) { buffer->meshMap = HashMap_Allocate(); buffer->textureMap = HashMap_Allocate(); HashMap_Initialize(buffer->meshMap); HashMap_Initialize(buffer->textureMap); }
/// //Initializes an oct tree and creates a root node with the given dimensions // //Parameters: // tree: A pointer to the oct tree to initialize // leftBound: The left bound of the octtree // rightBound: The right bound of the octtree // bottomBound: The bottom bound of the octtree // topBound: The top bound of the octtree // backBound: The back bound of the octtree // frontBound: The front bound of the octtree void OctTree_Initialize(OctTree* tree, float leftBound, float rightBound, float bottomBound, float topBound, float backBound, float frontBound) { //Allocate root tree->root = OctTree_Node_Allocate(); //Initialize root OctTree_Node_Initialize(tree->root, tree, NULL, 0, leftBound, rightBound, bottomBound, topBound, backBound, frontBound); //Allocate hashmap tree->map = HashMap_Allocate(); //Initialize map HashMap_Initialize(tree->map); }