00001 // Filename: lensNode.I 00002 // Created by: drose (26Feb02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: copy_lens 00022 // Access: Public 00023 // Description: Sets up the LensNode using a copy of the 00024 // indicated Lens. If the original Lens is 00025 // changed or destroyed, this LensNode is not 00026 // affected. 00027 //////////////////////////////////////////////////////////////////// 00028 INLINE void LensNode:: 00029 copy_lens(const Lens &lens) { 00030 _lens = lens.make_copy(); 00031 } 00032 00033 //////////////////////////////////////////////////////////////////// 00034 // Function: set_lens 00035 // Access: Public 00036 // Description: Sets up the LensNode using this particular Lens 00037 // pointer. If the lens is subsequently modified, the 00038 // LensNode properties immediately reflect the change. 00039 //////////////////////////////////////////////////////////////////// 00040 INLINE void LensNode:: 00041 set_lens(Lens *lens) { 00042 _lens = lens; 00043 } 00044 00045 //////////////////////////////////////////////////////////////////// 00046 // Function: get_lens 00047 // Access: Public 00048 // Description: Returns a pointer to the particular Lens 00049 // associated with this LensNode, or NULL if there is 00050 // not yet a Lens associated. 00051 //////////////////////////////////////////////////////////////////// 00052 INLINE Lens *LensNode:: 00053 get_lens() const { 00054 return _lens; 00055 }