void CCTDebugData::addAABB(const NxExtendedBounds3& bounds, NxU32 color) { NxExtendedVec3 center; NxVec3 extents; bounds.getCenter(center); bounds.getExtents(extents); NxBounds3 tmp; tmp.setCenterExtents(NxVec3((float)center.x, (float)center.y, (float)center.z), extents); addAABB(tmp, color, false); }
bool ToiletBlock::addCollisionShapes(BlockSource& region, const BlockPos& pos, const AABB* posAABB, std::vector<AABB, std::allocator<AABB>>& pool, Entity* entity) { addAABB(AABB(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F).move(pos.x, pos.y, pos.z), posAABB, pool); addAABB(CollisionHelper::getRotatedCollisionBox(region.getData(pos), 0.65F, 0.5F, 0.0F, 1.0F, 1.1F, 1.0F).move(pos.x, pos.y, pos.z), posAABB, pool); return true; }
void BrewingStandTile::addAABBs(TileSource* region, int x, int y, int z, AABB const* posAABB, std::vector<AABB, std::allocator<AABB>>& pool) { addAABB(AABB(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.875F, 0.5625F).move(x, y, z), posAABB, pool); addAABB(AABB(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F).move(x, y, z), posAABB, pool); }
bool PistonArmTile::addCollisionShapes(TileSource& region, int x, int y, int z, AABB const* posAABB, std::vector<AABB, std::allocator<AABB>>& pool) { int data = region.getData(x, y, z); float var9 = 0.25F; float var10 = 0.375F; float var11 = 0.625F; float var12 = 0.25F; float var13 = 0.75F; switch(getRotation(data)) { case 0: addAABB(AABB(0.0F, 0.0F, 0.0F, 1.0F, 0.25F, 1.0F).move(x, y, z), posAABB, pool); addAABB(AABB(0.375F, 0.25F, 0.375F, 0.625F, 1.0F, 0.625F).move(x, y, z), posAABB, pool); break; case 1: addAABB(AABB(0.0F, 0.75F, 0.0F, 1.0F, 1.0F, 1.0F).move(x, y, z), posAABB, pool); addAABB(AABB(0.375F, 0.0F, 0.375F, 0.625F, 0.75F, 0.625F).move(x, y, z), posAABB, pool); break; case 2: addAABB(AABB(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.25F).move(x, y, z), posAABB, pool); addAABB(AABB(0.25F, 0.375F, 0.25F, 0.75F, 0.625F, 1.0F).move(x, y, z), posAABB, pool); break; case 3: addAABB(AABB(0.0F, 0.0F, 0.75F, 1.0F, 1.0F, 1.0F).move(x, y, z), posAABB, pool); addAABB(AABB(0.25F, 0.375F, 0.0F, 0.75F, 0.625F, 0.75F).move(x, y, z), posAABB, pool); break; case 4: addAABB(AABB(0.0F, 0.0F, 0.0F, 0.25F, 1.0F, 1.0F).move(x, y, z), posAABB, pool); addAABB(AABB(0.375F, 0.25F, 0.25F, 0.625F, 0.75F, 1.0F).move(x, y, z), posAABB, pool); break; case 5: addAABB(AABB(0.75F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F).move(x, y, z), posAABB, pool); addAABB(AABB(0.0F, 0.375F, 0.25F, 0.75F, 0.625F, 0.75F).move(x, y, z), posAABB, pool); break; } return true; }