00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "lodNodeType.h"
00016 #include "string_utils.h"
00017
00018 ostream &
00019 operator << (ostream &out, LODNodeType lnt) {
00020 switch (lnt) {
00021 case LNT_pop:
00022 return out << "pop";
00023
00024 case LNT_fade:
00025 return out << "fade";
00026 }
00027
00028 pgraph_cat->error()
00029 << "Invalid LODNodeType value: " << (int)lnt << "\n";
00030 nassertr(false, out);
00031 return out;
00032 }
00033
00034 istream &
00035 operator >> (istream &in, LODNodeType &lnt) {
00036 string word;
00037 in >> word;
00038 if (cmp_nocase_uh(word, "pop") == 0) {
00039 lnt = LNT_pop;
00040 } else if (cmp_nocase_uh(word, "fade") == 0) {
00041 lnt = LNT_fade;
00042 } else {
00043 pgraph_cat->error()
00044 << "Invalid LODNodeType string: " << word << "\n";
00045 lnt = LNT_pop;
00046 }
00047 return in;
00048 }