mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
aabb block shape WIP + common refactor
This commit is contained in:
parent
73d87ae451
commit
0c35eeb072
21 changed files with 177 additions and 76 deletions
|
|
@ -22,10 +22,12 @@ Content* ContentBuilder::build() {
|
|||
vector<Block*> blockDefsIndices;
|
||||
for (const string& name : blockIds) {
|
||||
Block* def = blockDefs[name];
|
||||
def->id = blockDefsIndices.size();
|
||||
|
||||
// Generating runtime info
|
||||
def->rt.id = blockDefsIndices.size();
|
||||
def->rt.emissive = *((uint32_t*)def->emission);
|
||||
|
||||
// build hitbox grid 3d for raycasts
|
||||
// building hitbox grid 3d for raycasts
|
||||
const AABB& hitbox = def->hitbox;
|
||||
for (uint gy = 0; gy < BLOCK_AABB_GRID; gy++) {
|
||||
for (uint gz = 0; gz < BLOCK_AABB_GRID; gz++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue