loaderOptions.I

00001 // Filename: loaderOptions.I
00002 // Created by:  drose (05Oct05)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: LoaderOptions::Constructor
00018 //       Access: Published
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE LoaderOptions::
00022 LoaderOptions(int flags, int texture_flags) : 
00023   _flags(flags), 
00024   _texture_flags(texture_flags),
00025   _texture_num_views(0),
00026   _auto_texture_scale(ATS_unspecified)
00027 {
00028 }
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //     Function: LoaderOptions::Copy Constructor
00032 //       Access: Published
00033 //  Description:
00034 ////////////////////////////////////////////////////////////////////
00035 INLINE LoaderOptions::
00036 LoaderOptions(const LoaderOptions &copy) :
00037   _flags(copy._flags),
00038   _texture_flags(copy._texture_flags),
00039   _texture_num_views(copy._texture_num_views),
00040   _auto_texture_scale(copy._auto_texture_scale)
00041 {
00042 }
00043 
00044 ////////////////////////////////////////////////////////////////////
00045 //     Function: LoaderOptions::Copy Assignment Operator
00046 //       Access: Published
00047 //  Description:
00048 ////////////////////////////////////////////////////////////////////
00049 INLINE void LoaderOptions::
00050 operator = (const LoaderOptions &copy) {
00051   _flags = copy._flags;
00052   _texture_flags = copy._texture_flags;
00053   _texture_num_views = copy._texture_num_views;
00054   _auto_texture_scale = copy._auto_texture_scale;
00055 }
00056 
00057 ////////////////////////////////////////////////////////////////////
00058 //     Function: LoaderOptions::set_flags
00059 //       Access: Published
00060 //  Description:
00061 ////////////////////////////////////////////////////////////////////
00062 INLINE void LoaderOptions::
00063 set_flags(int flags) {
00064   _flags = flags;
00065 }
00066 
00067 ////////////////////////////////////////////////////////////////////
00068 //     Function: LoaderOptions::get_flags
00069 //       Access: Published
00070 //  Description:
00071 ////////////////////////////////////////////////////////////////////
00072 INLINE int LoaderOptions::
00073 get_flags() const {
00074   return _flags;
00075 }
00076 
00077 ////////////////////////////////////////////////////////////////////
00078 //     Function: LoaderOptions::set_texture_flags
00079 //       Access: Published
00080 //  Description:
00081 ////////////////////////////////////////////////////////////////////
00082 INLINE void LoaderOptions::
00083 set_texture_flags(int texture_flags) {
00084   _texture_flags = texture_flags;
00085 }
00086 
00087 ////////////////////////////////////////////////////////////////////
00088 //     Function: LoaderOptions::get_texture_flags
00089 //       Access: Published
00090 //  Description:
00091 ////////////////////////////////////////////////////////////////////
00092 INLINE int LoaderOptions::
00093 get_texture_flags() const {
00094   return _texture_flags;
00095 }
00096 
00097 ////////////////////////////////////////////////////////////////////
00098 //     Function: LoaderOptions::set_texture_num_views
00099 //       Access: Published
00100 //  Description: Specifies the expected number of views to load for
00101 //               the texture.  This is ignored unless TF_multiview is
00102 //               included in texture_flags.  This must be specified
00103 //               when loading a 3-d multiview texture, in which case
00104 //               it is used to differentiate z levels from separate
00105 //               views; it may be zero in the case of 2-d textures or
00106 //               cube maps, in which case the number of views can be
00107 //               inferred from the number of images found on disk.
00108 ////////////////////////////////////////////////////////////////////
00109 INLINE void LoaderOptions::
00110 set_texture_num_views(int texture_num_views) {
00111   _texture_num_views = texture_num_views;
00112 }
00113 
00114 ////////////////////////////////////////////////////////////////////
00115 //     Function: LoaderOptions::get_texture_num_views
00116 //       Access: Published
00117 //  Description: See set_texture_num_views().
00118 ////////////////////////////////////////////////////////////////////
00119 INLINE int LoaderOptions::
00120 get_texture_num_views() const {
00121   return _texture_num_views;
00122 }
00123 
00124 ////////////////////////////////////////////////////////////////////
00125 //     Function: LoaderOptions::set_auto_texture_scale
00126 //       Access: Published
00127 //  Description: Set this flag to ATS_none, ATS_up, ATS_down, or
00128 //               ATS_pad to control how a texture is scaled from
00129 //               disk when it is subsequently loaded.  Set it to
00130 //               ATS_unspecified to restore the default behavior.
00131 ////////////////////////////////////////////////////////////////////
00132 INLINE void LoaderOptions::
00133 set_auto_texture_scale(AutoTextureScale scale) {
00134   _auto_texture_scale = scale;
00135 }
00136 
00137 ////////////////////////////////////////////////////////////////////
00138 //     Function: LoaderOptions::get_auto_texture_scale
00139 //       Access: Published
00140 //  Description: See set_auto_texture_scale().
00141 ////////////////////////////////////////////////////////////////////
00142 INLINE AutoTextureScale LoaderOptions::
00143 get_auto_texture_scale() const {
00144   return _auto_texture_scale;
00145 }