Panda3D
|
00001 // Filename: qtessInputEntry.I 00002 // Created by: drose (13Oct03) 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: QtessInputEntry::Copy Constructor 00018 // Access: Public 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE QtessInputEntry:: 00022 QtessInputEntry(const QtessInputEntry ©) { 00023 (*this) = copy; 00024 } 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Function: QtessInputEntry::add_node_name 00028 // Access: Public 00029 // Description: 00030 //////////////////////////////////////////////////////////////////// 00031 INLINE void QtessInputEntry:: 00032 add_node_name(const string &name) { 00033 _node_names.push_back(GlobPattern(name)); 00034 } 00035 00036 //////////////////////////////////////////////////////////////////// 00037 // Function: QtessInputEntry::set_importance 00038 // Access: Public 00039 // Description: 00040 //////////////////////////////////////////////////////////////////// 00041 INLINE void QtessInputEntry:: 00042 set_importance(double i) { 00043 _importance = i; 00044 _type = T_importance; 00045 } 00046 00047 //////////////////////////////////////////////////////////////////// 00048 // Function: QtessInputEntry::set_match_uu 00049 // Access: Public 00050 // Description: 00051 //////////////////////////////////////////////////////////////////// 00052 INLINE void QtessInputEntry:: 00053 set_match_uu() { 00054 _type = T_match_uu; 00055 _constrain_u = NULL; 00056 } 00057 00058 //////////////////////////////////////////////////////////////////// 00059 // Function: QtessInputEntry::set_match_vv 00060 // Access: Public 00061 // Description: 00062 //////////////////////////////////////////////////////////////////// 00063 INLINE void QtessInputEntry:: 00064 set_match_vv() { 00065 _type = T_match_vv; 00066 _constrain_v = NULL; 00067 } 00068 00069 //////////////////////////////////////////////////////////////////// 00070 // Function: QtessInputEntry::set_match_uv 00071 // Access: Public 00072 // Description: 00073 //////////////////////////////////////////////////////////////////// 00074 INLINE void QtessInputEntry:: 00075 set_match_uv() { 00076 _type = T_match_uv; 00077 _constrain_u = NULL; 00078 } 00079 00080 //////////////////////////////////////////////////////////////////// 00081 // Function: QtessInputEntry::set_match_vu 00082 // Access: Public 00083 // Description: 00084 //////////////////////////////////////////////////////////////////// 00085 INLINE void QtessInputEntry:: 00086 set_match_vu() { 00087 _type = T_match_vu; 00088 _constrain_v = NULL; 00089 } 00090 00091 //////////////////////////////////////////////////////////////////// 00092 // Function: QtessInputEntry::set_min_u 00093 // Access: Public 00094 // Description: 00095 //////////////////////////////////////////////////////////////////// 00096 INLINE void QtessInputEntry:: 00097 set_min_u(int min_u) { 00098 _type = T_min_u; 00099 _num_u = min_u; 00100 } 00101 00102 //////////////////////////////////////////////////////////////////// 00103 // Function: QtessInputEntry::set_min_v 00104 // Access: Public 00105 // Description: 00106 //////////////////////////////////////////////////////////////////// 00107 INLINE void QtessInputEntry:: 00108 set_min_v(int min_v) { 00109 _type = T_min_v; 00110 _num_v = min_v; 00111 } 00112 00113 //////////////////////////////////////////////////////////////////// 00114 // Function: QtessInputEntry::set_undefined 00115 // Access: Public 00116 // Description: 00117 //////////////////////////////////////////////////////////////////// 00118 INLINE void QtessInputEntry:: 00119 set_undefined() { 00120 _type = T_undefined; 00121 } 00122 00123 //////////////////////////////////////////////////////////////////// 00124 // Function: QtessInputEntry::set_omit 00125 // Access: Public 00126 // Description: 00127 //////////////////////////////////////////////////////////////////// 00128 INLINE void QtessInputEntry:: 00129 set_omit() { 00130 _type = T_omit; 00131 } 00132 00133 //////////////////////////////////////////////////////////////////// 00134 // Function: QtessInputEntry::set_num_tris 00135 // Access: Public 00136 // Description: 00137 //////////////////////////////////////////////////////////////////// 00138 INLINE void QtessInputEntry:: 00139 set_num_tris(int nt) { 00140 _num_tris = nt; 00141 _type = T_num_tris; 00142 } 00143 00144 //////////////////////////////////////////////////////////////////// 00145 // Function: QtessInputEntry::set_uv 00146 // Access: Public 00147 // Description: 00148 //////////////////////////////////////////////////////////////////// 00149 INLINE void QtessInputEntry:: 00150 set_uv(int u, int v) { 00151 set_uv(u, v, NULL, 0); 00152 } 00153 00154 //////////////////////////////////////////////////////////////////// 00155 // Function: QtessInputEntry::set_per_isoparam 00156 // Access: Public 00157 // Description: 00158 //////////////////////////////////////////////////////////////////// 00159 INLINE void QtessInputEntry:: 00160 set_per_isoparam(double pi) { 00161 _per_isoparam = pi; 00162 _type = T_per_isoparam; 00163 } 00164 00165 //////////////////////////////////////////////////////////////////// 00166 // Function: QtessInputEntry::set_per_score 00167 // Access: Public 00168 // Description: 00169 //////////////////////////////////////////////////////////////////// 00170 INLINE void QtessInputEntry:: 00171 set_per_score(double pi) { 00172 _per_isoparam = pi; 00173 _type = T_per_score; 00174 } 00175 00176 //////////////////////////////////////////////////////////////////// 00177 // Function: QtessInputEntry::get_num_surfaces 00178 // Access: Public 00179 // Description: 00180 //////////////////////////////////////////////////////////////////// 00181 INLINE int QtessInputEntry:: 00182 get_num_surfaces() const { 00183 return _surfaces.size(); 00184 } 00185 00186 00187 INLINE ostream &operator << (ostream &out, const QtessInputEntry &entry) { 00188 entry.output(out); 00189 return out; 00190 } 00191