19 _user_mat(LMatrix4::ident_mat()),
34 _user_mat(copy._user_mat),
35 _left_eye_mat(copy._left_eye_mat),
36 _right_eye_mat(copy._right_eye_mat),
37 _ml_flags(copy._ml_flags)
44 INLINE
void MatrixLens::
46 Lens::operator = (copy);
47 _user_mat = copy._user_mat;
48 _left_eye_mat = copy._left_eye_mat;
49 _right_eye_mat = copy._right_eye_mat;
50 _ml_flags = copy._ml_flags;
68 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
75 INLINE
const LMatrix4 &MatrixLens::
76 get_user_mat()
const {
92 _left_eye_mat = left_eye_mat;
93 _ml_flags |= MF_has_left_eye;
94 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
104 _ml_flags &= ~MF_has_left_eye;
105 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
115 return (_ml_flags & MF_has_left_eye) != 0;
124 if ((_ml_flags & MF_has_left_eye) != 0) {
125 return _left_eye_mat;
142 _right_eye_mat = right_eye_mat;
143 _ml_flags |= MF_has_right_eye;
144 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
154 _ml_flags &= ~MF_has_right_eye;
155 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
165 return (_ml_flags & MF_has_right_eye) != 0;
174 if ((_ml_flags & MF_has_right_eye) != 0) {
175 return _right_eye_mat;
bool has_right_eye_mat() const
Returns true if the camera has a custom projection matrix set for the right eye, or false if the cent...
A base class for any number of different kinds of lenses, linear and otherwise.
A completely generic linear lens.
const LMatrix4 & get_right_eye_mat() const
Returns the custom projection matrix for the right eye, if any, or the center matrix if there is no c...
void set_right_eye_mat(const LMatrix4 &user_mat)
Sets a custom projection matrix for the right eye.
void clear_right_eye_mat()
Removes the custom projection matrix set for the right eye, and uses the center matrix (set by set_us...
set_user_mat
Explicitly specifies the projection matrix.
set_film_size
Sets the horizontal size of the film without changing its shape.
const LMatrix4 & get_left_eye_mat() const
Returns the custom projection matrix for the left eye, if any, or the center matrix if there is no cu...
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
void clear_left_eye_mat()
Removes the custom projection matrix set for the left eye, and uses the center matrix (set by set_use...
bool has_left_eye_mat() const
Returns true if the camera has a custom projection matrix set for the left eye, or false if the cente...
void set_left_eye_mat(const LMatrix4 &user_mat)
Sets a custom projection matrix for the left eye.