diff options
author | rodri <rgl@antares-labs.eu> | 2024-02-03 22:20:04 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-02-03 22:20:04 +0000 |
commit | 6c7fd839f6ea6326bae354a27a2ba3c592444856 (patch) | |
tree | a28e85a775d3761e67642160ca6173b27653bf2e /camera.c | |
parent | f2e5828b91c56c2fc0247c5feb5a7215ec4529cc (diff) | |
download | libgraphics-6c7fd839f6ea6326bae354a27a2ba3c592444856.tar.gz libgraphics-6c7fd839f6ea6326bae354a27a2ba3c592444856.tar.bz2 libgraphics-6c7fd839f6ea6326bae354a27a2ba3c592444856.zip |
document part of the pipeline. prepare the grounds for triangle clipping.
Diffstat (limited to 'camera.c')
-rw-r--r-- | camera.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -43,10 +43,7 @@ void placecamera(Camera *c, Point3 p, Point3 focus, Point3 up) { c->p = p; - if(focus.w == 0) - c->bz = focus; - else - c->bz = normvec3(subpt3(c->p, focus)); + c->bz = focus.w == 0? focus: normvec3(subpt3(c->p, focus)); c->bx = normvec3(crossvec3(up, c->bz)); c->by = crossvec3(c->bz, c->bx); } |