28class EXPCL_PANDA_GOBJ MatrixLens :
public Lens {
33 INLINE MatrixLens(
const MatrixLens ©);
34 INLINE
void operator = (
const MatrixLens ©);
55 virtual void write(std::ostream &out,
int indent_level = 0)
const;
58 virtual void do_compute_projection_mat(Lens::CData *lens_cdata);
62 LMatrix4 _left_eye_mat;
63 LMatrix4 _right_eye_mat;
66 MF_has_left_eye = 0x001,
67 MF_has_right_eye = 0x002,
72 static void register_with_read_factory();
81 return get_class_type();
83 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
84 static TypeHandle get_class_type() {
87 static void init_type() {
90 Lens::get_class_type());
94 static TypeHandle _type_handle;
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual bool is_linear() const
Returns true if the lens represents a linear projection (e.g.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
set_user_mat
Explicitly specifies the projection matrix.
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.
virtual PointerTo< Lens > make_copy() const
Allocates a new Lens just like this one.
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 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_right_eye_mat() const
Returns true if the camera has a custom projection matrix set for the right eye, or false if the cent...
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...
void set_left_eye_mat(const LMatrix4 &user_mat)
Sets a custom projection matrix for the left 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...
get_user_mat
Returns the explicit projection matrix as set by the user.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...