39 _user_mat(copy._user_mat),
40 _left_eye_mat(copy._left_eye_mat),
41 _right_eye_mat(copy._right_eye_mat),
42 _ml_flags(copy._ml_flags)
51 INLINE
void MatrixLens::
53 Lens::operator = (copy);
54 _user_mat = copy._user_mat;
55 _left_eye_mat = copy._left_eye_mat;
56 _right_eye_mat = copy._right_eye_mat;
57 _ml_flags = copy._ml_flags;
81 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
113 _left_eye_mat = left_eye_mat;
114 _ml_flags |= MF_has_left_eye;
115 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
128 _ml_flags &= ~MF_has_left_eye;
129 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
142 return (_ml_flags & MF_has_left_eye) != 0;
154 if ((_ml_flags & MF_has_left_eye) != 0) {
155 return _left_eye_mat;
177 _right_eye_mat = right_eye_mat;
178 _ml_flags |= MF_has_right_eye;
179 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
192 _ml_flags &= ~MF_has_right_eye;
193 do_adjust_comp_flags(lens_cdata, CF_mat, 0);
206 return (_ml_flags & MF_has_right_eye) != 0;
218 if ((_ml_flags & MF_has_right_eye) != 0) {
219 return _right_eye_mat;
A base class for any number of different kinds of lenses, linear and otherwise.
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...
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...
const LMatrix4 & get_user_mat() const
Returns the explicit projection matrix as set by the user.
void set_film_size(PN_stdfloat width)
Sets the horizontal size of the film without changing its shape.
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...
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_user_mat(const LMatrix4 &user_mat)
Explicitly specifies the projection matrix.
This is a 4-by-4 transform matrix.
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...
void set_left_eye_mat(const LMatrix4 &user_mat)
Sets a custom projection matrix for the left eye.
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...