MCPcopy Create free account
hub / github.com/android/ndk-samples / Update

Method Update

teapots/more-teapots/src/main/cpp/MoreTeapotsRenderer.cpp:248–262  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Update --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

246// Update
247//--------------------------------------------------------------------------------
248void 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

Callers 1

DrawFrameMethod · 0.45

Calls 1

Vec3Class · 0.85

Tested by

no test coverage detected