void MeshNode::Init(Mesh* mesh){ //this method can only be called once assert(!initialized); assert(NULL != mesh); mesh_ = mesh; //D3DXCreateSphere(GraphicsLayer::GetInstance()->GetDevice(), mesh_->localBounds.radius, 10,10, &boundsMesh_,NULL); initialized = true; UpdateWorldBounds(); }
const BoundingBoxf& SceneNode::GetWorldBoundingBox() const { UpdateWorldBounds(); return mWorldBounds; }