MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / CameraPose

Method CameraPose

Examples/StereoKitTest/DebugToolWindow.cs:301–312  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

299 }
300
301 void CameraPose()
302 {
303 if (camera == null)
304 {
305 Log.Warn("Camera should be enabled before printing screenshot pose.");
306 return;
307 }
308 Matrix toLocal = Demo.contentPose.Inverse;
309 Vec3 pos = toLocal * camera.CamAt;
310 Vec3 fwd = toLocal * (camera.CamAt + camera.CamDir);
311 Log.Info($"Tests.Screenshot(\"image.jpg\", 0, 600, 600, {(int)camera.Fov},\n\tDemo.contentPose * new Vec3({pos.x:0.000}f, {pos.y:0.000}f, {pos.z:0.000}f),\n\tDemo.contentPose * new Vec3({fwd.x:0.000}f, {fwd.y:0.000}f, {fwd.z:0.000}f));");
312 }
313
314 void HandshotPose(Handed hand)
315 {

Callers

nothing calls this directly

Calls 2

WarnMethod · 0.80
InfoMethod · 0.80

Tested by

no test coverage detected