15 #include "matrixLens.h" 17 #include "bamReader.h" 51 write(ostream &out,
int indent_level)
const {
52 indent(out, indent_level) << get_type() <<
":\n";
63 do_compute_projection_mat(Lens::CData *lens_cdata) {
64 lens_cdata->_projection_mat = do_get_lens_mat_inv(lens_cdata) * _user_mat * do_get_film_mat(lens_cdata);
66 if (_ml_flags & MF_has_left_eye) {
67 lens_cdata->_projection_mat_left = do_get_lens_mat_inv(lens_cdata) * _left_eye_mat * do_get_film_mat(lens_cdata);
69 lens_cdata->_projection_mat_left = lens_cdata->_projection_mat;
72 if (_ml_flags & MF_has_right_eye) {
73 lens_cdata->_projection_mat_right = do_get_lens_mat_inv(lens_cdata) * _right_eye_mat * do_get_film_mat(lens_cdata);
75 lens_cdata->_projection_mat_right = lens_cdata->_projection_mat;
78 do_adjust_comp_flags(lens_cdata, CF_projection_mat_inv,
107 parse_params(params, scan, manager);
108 lens->fillin(scan, manager);
A base class for any number of different kinds of lenses, linear and otherwise.
A completely generic linear lens.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Base class for objects that can be written to and read from Bam files.
static void register_with_read_factory()
Tells the BamReader how to create objects of type Lens.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
void register_factory(TypeHandle handle, CreateFunc *func)
Registers a new kind of thing the Factory will be able to create.
const LMatrix4 & get_projection_mat(StereoChannel channel=SC_mono) const
Returns the complete transformation matrix from a 3-d point in space to a point on the film...
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
virtual bool is_linear() const
Returns true if the lens represents a linear projection (e.g.