Panda3D
|
An orthographic lens. More...
#include "orthographicLens.h"
Public Member Functions | |
OrthographicLens (const OrthographicLens ©) | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
virtual bool | is_linear () const |
Returns true if the lens represents a linear projection (e.g. | |
virtual bool | is_orthographic () const |
Returns true if the lens represents a orthographic projection (i.e. | |
void | operator= (const OrthographicLens ©) |
virtual | PT (Lens) make_copy() const |
virtual void | write (ostream &out, int indent_level=0) const |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type Lens. | |
Protected Member Functions | |
virtual void | do_compute_projection_mat (Lens::CData *lens_cdata) |
Computes the complete transformation matrix from 3-d point to 2-d point, if the lens is linear. | |
Static Protected Member Functions | |
static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
This function is called by the BamReader's factory when a new object of type Lens is encountered in the Bam file. |
An orthographic lens.
Although this kind of lens is linear, like a PerspectiveLens, it doesn't respect field-of-view or focal length parameters, and adjusting these will have no effect. Instead, its field of view is controlled by adjusting the film_size; the orthographic lens represents a planar projection onto its imaginary film of the specified size, hanging in space.
Definition at line 34 of file orthographicLens.h.
void OrthographicLens::do_compute_projection_mat | ( | Lens::CData * | lens_cdata | ) | [protected, virtual] |
Computes the complete transformation matrix from 3-d point to 2-d point, if the lens is linear.
Reimplemented from Lens.
Definition at line 74 of file orthographicLens.cxx.
References Lens::do_adjust_comp_flags(), and LMatrix4f::ident_mat().
bool OrthographicLens::is_linear | ( | ) | const [virtual] |
Returns true if the lens represents a linear projection (e.g.
PerspectiveLens, OrthographicLens), and therefore there is a valid matrix returned by get_projection_mat(), or false otherwise.
Reimplemented from Lens.
Definition at line 41 of file orthographicLens.cxx.
bool OrthographicLens::is_orthographic | ( | ) | const [virtual] |
Returns true if the lens represents a orthographic projection (i.e.
it is a OrthographicLens), false otherwise.
Reimplemented from Lens.
Definition at line 53 of file orthographicLens.cxx.
TypedWritable * OrthographicLens::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of type Lens is encountered in the Bam file.
It should create the Lens and extract its information from the file.
Definition at line 147 of file orthographicLens.cxx.
References Lens::fillin().
Referenced by register_with_read_factory().
void OrthographicLens::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type Lens.
Definition at line 134 of file orthographicLens.cxx.
References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().