cgv
Loading...
Searching...
No Matches
stereo_view.cxx
1#include <cgv/base/base.h>
2#include "stereo_view.h"
3
4namespace cgv {
5 namespace render {
6
9{
10 set_default_values();
11}
12
15{
16 eye_distance = e;
17}
18
20void stereo_view::set_default_values()
21{
24 set_z_near(0.01);
25 set_z_far(10000.0);
26 set_eye_distance(0.03);
28}
29
32{
33 return eye_distance;
34}
35
43{
44 return (1.0 / (1.0 - parallax_zero_scale) - 1.0) * dot(get_focus() - get_eye(), view_dir);
45}
46
52
53 }
54}
virtual void set_z_near(double z)
set the z-value for the z-near clipping plane
virtual void set_default_view()
reset view with focus and y-extent based on current scene extent
virtual void set_z_far(double z)
set the z-value for the z-far clipping plane
virtual void set_parallax_zero_scale(double pzs)
set parallax zero scale
double get_eye_distance() const
query distance between eyes
double get_parallax_zero_depth() const
query parallax zero depth
double parallax_zero_scale
scale of parallax zero depth with respect to eye focus distance
Definition stereo_view.h:17
double get_parallax_zero_scale() const
query scale of parallax zero depth with respect to eye focus distance
stereo_view()
construct with standard values
virtual void set_eye_distance(double e)
set distance between eyes
double eye_distance
distance between eyes
Definition stereo_view.h:15
const dvec3 & get_focus() const
query focus point
Definition view.cxx:48
const dvec3 get_eye() const
query the eye point, which is computed from focus, view dir, y extent at focus and y view angle
Definition view.cxx:123
virtual void set_y_view_angle(double angle)
set opening angle (degrees) of view in y-direction keeping y extent at focus resulting in a dolly zoo...
Definition view.cxx:109
the cgv namespace
Definition print.h:11