Skip to content

[Book 1] Listing 76 Section 12.2 Wrong lookfrom and lookat default values #1341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
solimm4sks opened this issue Dec 7, 2023 · 1 comment
Closed
Assignees

Comments

@solimm4sks
Copy link

Snippet of the listing:

...
    double vfov     = 90;              // Vertical view angle (field of view)
    point3 lookfrom = point3(0,0,-1);  // Point camera is looking from
    point3 lookat   = point3(0,0,0);   // Point camera is looking at
    vec3   vup      = vec3(0,1,0);     // Camera-relative "up" direction
...

This is also currently the state of camera.h on the dev branch. Before implementing the movable camera, the camera center position (lookfrom) was (0, 0, 0), and it was looking at (0, 0, -1). This was reversed in this listing without any discernable reason or explanation in the text.

@hollasch hollasch self-assigned this Jan 12, 2024
@hollasch hollasch added this to the v4.0.0-alpha.2 milestone Jan 12, 2024
hollasch added a commit that referenced this issue Mar 10, 2024
When providing default values for the camera lookfrom/lookat points, we
mixed up the two from the earlier coded values. In any event, we always
explicitly set camera pose for each scene, so this didn't affect
any rendered image.

Resolves #1341
hollasch added a commit that referenced this issue Mar 10, 2024
When providing default values for the camera lookfrom/lookat points, we
mixed up the two from the earlier coded values. In any event, we always
explicitly set camera pose for each scene, so this didn't affect
any rendered image.

Resolves #1341
@hollasch
Copy link
Collaborator

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants