-------------------------------------------------------------------------------- Update --------------------------------------------------------------------------------
| 246 | // Update |
| 247 | //-------------------------------------------------------------------------------- |
| 248 | void MoreTeapotsRenderer::Update(float) { |
| 249 | const float CAM_X = 0.f; |
| 250 | const float CAM_Y = 0.f; |
| 251 | const float CAM_Z = 2000.f; |
| 252 | |
| 253 | mat_view_ = ndk_helper::Mat4::LookAt(ndk_helper::Vec3(CAM_X, CAM_Y, CAM_Z), |
| 254 | ndk_helper::Vec3(0.f, 0.f, 0.f), |
| 255 | ndk_helper::Vec3(0.f, 1.f, 0.f)); |
| 256 | |
| 257 | if (camera_) { |
| 258 | camera_->Update(); |
| 259 | mat_view_ = camera_->GetTransformMatrix() * mat_view_ * |
| 260 | camera_->GetRotationMatrix(); |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | //-------------------------------------------------------------------------------- |
| 265 | // Render |