00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef LOADEROPTIONS_H
00016 #define LOADEROPTIONS_H
00017
00018 #include "pandabase.h"
00019 #include "autoTextureScale.h"
00020
00021
00022
00023
00024
00025
00026 class EXPCL_PANDA_PUTIL LoaderOptions {
00027 PUBLISHED:
00028
00029 enum LoaderFlags {
00030 LF_search = 0x0001,
00031 LF_report_errors = 0x0002,
00032 LF_convert_skeleton = 0x0004,
00033 LF_convert_channels = 0x0008,
00034 LF_convert_anim = 0x000c,
00035 LF_no_disk_cache = 0x0010,
00036 LF_no_ram_cache = 0x0020,
00037 LF_no_cache = 0x0030,
00038 LF_cache_only = 0x0040,
00039 LF_allow_instance = 0x0080,
00040 };
00041
00042
00043 enum TextureFlags {
00044 TF_preload = 0x0004,
00045 TF_preload_simple = 0x0008,
00046 TF_allow_1d = 0x0010,
00047 TF_generate_mipmaps = 0x0020,
00048 TF_multiview = 0x0040,
00049 };
00050
00051 LoaderOptions(int flags = LF_search | LF_report_errors);
00052 INLINE LoaderOptions(int flags, int texture_flags);
00053 INLINE LoaderOptions(const LoaderOptions ©);
00054 INLINE void operator = (const LoaderOptions ©);
00055
00056 INLINE void set_flags(int flags);
00057 INLINE int get_flags() const;
00058
00059 INLINE void set_texture_flags(int flags);
00060 INLINE int get_texture_flags() const;
00061 INLINE void set_texture_num_views(int num_views);
00062 INLINE int get_texture_num_views() const;
00063
00064 INLINE void set_auto_texture_scale(AutoTextureScale scale);
00065 INLINE AutoTextureScale get_auto_texture_scale() const;
00066
00067 void output(ostream &out) const;
00068
00069 private:
00070 void write_flag(ostream &out, string &sep,
00071 const string &flag_name, int flag) const;
00072 void write_texture_flag(ostream &out, string &sep,
00073 const string &flag_name, int flag) const;
00074 int _flags;
00075 int _texture_flags;
00076 int _texture_num_views;
00077 AutoTextureScale _auto_texture_scale;
00078 };
00079
00080 INLINE ostream &operator << (ostream &out, const LoaderOptions &opts) {
00081 opts.output(out);
00082 return out;
00083 }
00084
00085 #include "loaderOptions.I"
00086
00087 #endif