MCPcopy Create free account
hub / github.com/RenderKit/embree / getISPCCamera

Method getISPCCamera

tutorials/common/tutorial/camera.h:73–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 Vec3fa camera2world(const Vec3fa& p) { return xfmPoint(camera2world(),p); }
72
73 ISPCCamera getISPCCamera (size_t width, size_t height)
74 {
75 const float fovScale = 1.0f/tanf(deg2rad(0.5f*fov));
76 const AffineSpace3fa local2world = camera2world();
77 Vec3fa vx = local2world.l.vx;
78 Vec3fa vy = -local2world.l.vy;
79 Vec3fa vz = -0.5f*width*local2world.l.vx + 0.5f*height*local2world.l.vy + 0.5f*height*fovScale*local2world.l.vz;
80 Vec3fa p = local2world.p;
81 return ISPCCamera(AffineSpace3f(vx,vy,vz,p));
82 }
83
84 void move (float dx, float dy, float dz)
85 {

Callers 6

renderToFileMethod · 0.80
clickFuncMethod · 0.80
displayFuncMethod · 0.80
renderBenchFuncFunction · 0.80
renderBenchmarkLegacyFunction · 0.80

Calls 2

ISPCCameraClass · 0.85
deg2radFunction · 0.50

Tested by

no test coverage detected