Panda3D
perspectiveLens.I
1 // Filename: perspectiveLens.I
2 // Created by: drose (18Feb99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 ////////////////////////////////////////////////////////////////////
16 // Function: PerspectiveLens::Constructor
17 // Access: Public
18 // Description:
19 ////////////////////////////////////////////////////////////////////
20 INLINE PerspectiveLens::
21 PerspectiveLens() {
22 }
23 
24 ////////////////////////////////////////////////////////////////////
25 // Function: PerspectiveLens::Constructor
26 // Access: Public
27 // Description:
28 ////////////////////////////////////////////////////////////////////
29 INLINE PerspectiveLens::
30 PerspectiveLens(PN_stdfloat hfov, PN_stdfloat vfov) {
31  Lens::CDWriter lens_cdata(Lens::_cycler, true);
32  lens_cdata->_fov.set(hfov, vfov);
33 }
34 
35 ////////////////////////////////////////////////////////////////////
36 // Function: PerspectiveLens::Copy Constructor
37 // Access: Public
38 // Description:
39 ////////////////////////////////////////////////////////////////////
40 INLINE PerspectiveLens::
41 PerspectiveLens(const PerspectiveLens &copy) : Lens(copy) {
42 }
43 
44 ////////////////////////////////////////////////////////////////////
45 // Function: PerspectiveLens::Copy Assignment Operator
46 // Access: Public
47 // Description:
48 ////////////////////////////////////////////////////////////////////
49 INLINE void PerspectiveLens::
50 operator = (const PerspectiveLens &copy) {
51  Lens::operator = (copy);
52 }
53 
A base class for any number of different kinds of lenses, linear and otherwise.
Definition: lens.h:45
A perspective-type lens: a normal camera.
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...