Panda3D
panda
src
pgraphnodes
lodNodeType.cxx
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file lodNodeType.cxx
10
* @author drose
11
* @date 2007-06-08
12
*/
13
14
#include "
lodNodeType.h
"
15
#include "
string_utils.h
"
16
#include "
config_pgraph.h
"
17
18
using
std::istream;
19
using
std::ostream;
20
using
std::string;
21
22
ostream &
23
operator << (ostream &out, LODNodeType lnt) {
24
switch
(lnt) {
25
case
LNT_pop:
26
return
out <<
"pop"
;
27
28
case
LNT_fade:
29
return
out <<
"fade"
;
30
}
31
32
pgraph_cat->error()
33
<<
"Invalid LODNodeType value: "
<< (int)lnt <<
"\n"
;
34
nassertr(
false
, out);
35
return
out;
36
}
37
38
istream &
39
operator >> (istream &in, LODNodeType &lnt) {
40
string
word;
41
in >> word;
42
if
(cmp_nocase_uh(word,
"pop"
) == 0) {
43
lnt = LNT_pop;
44
}
else
if
(cmp_nocase_uh(word,
"fade"
) == 0) {
45
lnt = LNT_fade;
46
}
else
{
47
pgraph_cat->error()
48
<<
"Invalid LODNodeType string: "
<< word <<
"\n"
;
49
lnt = LNT_pop;
50
}
51
return
in;
52
}
string_utils.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
lodNodeType.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
config_pgraph.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Mon Sep 14 2020 15:07:02 for Panda3D by
1.8.20