MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / translate

Method translate

testbed/src/Scene.cpp:155–162  ·  view source on GitHub ↗

Translate the camera

Source from the content-addressed store, hash-verified

153
154// Translate the camera
155void Scene::translate(int xMouse, int yMouse) {
156 float dx = static_cast<float>(xMouse - mLastMouseX);
157 float dy = static_cast<float>(yMouse - mLastMouseY);
158
159 // Translate the camera
160 mCamera.translateCamera(-dx / float(mCamera.getWidth()),
161 -dy / float(mCamera.getHeight()), mCenterScene);
162}
163
164// Rotate the camera
165void Scene::rotate(int xMouse, int yMouse) {

Callers

nothing calls this directly

Calls 3

translateCameraMethod · 0.80
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected