MCPcopy Create free account
hub / github.com/RenderKit/ospray / commit

Method commit

modules/cpu/camera/PanoramicCamera.cpp:30–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void PanoramicCamera::commit()
31{
32 Camera::commit();
33
34 getSh()->org = pos;
35
36 if (getSh()->super.motionBlur) {
37 getSh()->frame.vz = -dir;
38 getSh()->frame.vy = up;
39 } else {
40 getSh()->frame.vz = -normalize(dir);
41 getSh()->frame.vx = normalize(cross(up, getSh()->frame.vz));
42 getSh()->frame.vy = cross(getSh()->frame.vz, getSh()->frame.vx);
43 }
44
45 getSh()->stereoMode =
46 (OSPStereoMode)getParam<uint32_t>("stereoMode", OSP_STEREO_NONE);
47 getSh()->ipd_offset =
48 0.5f * getParam<float>("interpupillaryDistance", 0.0635f);
49
50 // flip offset to have left eye at top (image coord origin at lower left)
51 if (getSh()->stereoMode == OSP_STEREO_TOP_BOTTOM)
52 getSh()->ipd_offset = -getSh()->ipd_offset;
53}
54
55} // namespace ospray

Callers

nothing calls this directly

Calls 1

commitFunction · 0.50

Tested by

no test coverage detected