MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / update

Method update

Source/Falcor/Scene/Camera/CameraController.cpp:114–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 }
113
114 bool OrbiterCameraController::update()
115 {
116 if(mpCamera && mbDirty)
117 {
118 mbDirty = false;
119 mShouldRotate = false;
120 mpCamera->setTarget(mModelCenter);
121
122 float3 camPos = mModelCenter;
123 // tdavidovic: Why do we multiply the rotation matrix from the left (i.e., as if we multiplied by a transpose?)
124 camPos += mul(float3(0,0,1), mRotation) * mModelRadius * mCameraDistance;
125 mpCamera->setPosition(camPos);
126
127 float3 up(0, 1, 0);
128 up = mul(up, mRotation);
129 mpCamera->setUpVector(up);
130 return true;
131 }
132 return false;
133 }
134
135 void OrbiterCameraController::resetInputState()
136 {

Callers 1

Calls 13

quatFromAngleAxisFunction · 0.85
matrixFromQuatFunction · 0.85
deltaMethod · 0.80
getUpVectorMethod · 0.80
mulFunction · 0.50
minFunction · 0.50
lengthFunction · 0.50
normalizeFunction · 0.50
crossFunction · 0.50
clampFunction · 0.50
getPositionMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected