| 128 | } |
| 129 | |
| 130 | void TeapotRenderer::Update(float) { |
| 131 | const float CAM_X = 0.f; |
| 132 | const float CAM_Y = 0.f; |
| 133 | const float CAM_Z = 700.f; |
| 134 | |
| 135 | mat_view_ = ndk_helper::Mat4::LookAt(ndk_helper::Vec3(CAM_X, CAM_Y, CAM_Z), |
| 136 | ndk_helper::Vec3(0.f, 0.f, 0.f), |
| 137 | ndk_helper::Vec3(0.f, 1.f, 0.f)); |
| 138 | |
| 139 | if (camera_) { |
| 140 | camera_->Update(); |
| 141 | mat_view_ = camera_->GetTransformMatrix() * mat_view_ * |
| 142 | camera_->GetRotationMatrix() * mat_model_; |
| 143 | } else { |
| 144 | mat_view_ = mat_view_ * mat_model_; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | void TeapotRenderer::Render() { |
| 149 | // |