//============================================================================== void Octree::placeSceneNode(SceneNode* sn) { SpatialComponent* sp = sn->getSpatial(); ANKI_ASSERT(sp != nullptr); OctreeNode* toBePlacedNode = place(sp->getAabb()); if(toBePlacedNode != nullptr) { toBePlacedNode->addSceneNode(sn); } }
//============================================================================== void SceneDebugDrawer::draw(SpatialComponent& x) const { if(!x.bitsEnabled(SpatialComponent::Flag::VISIBLE_CAMERA)) { return; } m_dbg->setColor(Vec3(1.0, 0.0, 1.0)); CollisionDebugDrawer coldraw(m_dbg); x.getAabb().accept(coldraw); }