void Draw() { for (int i = 0; i < voCameras.size(); ++i) { switch (voCameras[i]->Tag) { case CameraUnion::INT: UpdateCameras(*voCameras[i]->iCamera); break; case CameraUnion::FLOAT: UpdateCameras(*voCameras[i]->fCamera); break; } } }
/* * Update() is called once per frame from the Game() instance. */ void PoolScene::Update() { if (waterReflectionCamera.IsValid() && waterReflectionCamera->GetSceneObject().IsValid()) { // Update the positions of [waterReflectionCamera] and [waterSurfaceCamera] to match [mainCamera]. // Additionally set reflection parameters for [waterReflectionCamera]. UpdateCameras(); // advance ripples UpdateRippleSimulation(); } }
/* * Called whenever this scene is activated. */ void PoolScene::OnActivate() { UpdateCameras(); }