00001 // Filename: eggMorph.I 00002 // Created by: drose (29Jan99) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: EggMorph::Constructor 00022 // Access: Public 00023 // Description: 00024 //////////////////////////////////////////////////////////////////// 00025 template<class Parameter> 00026 INLINE EggMorph<Parameter>:: 00027 EggMorph(const string &name, const Parameter &offset) 00028 : Namable(name), _offset(offset) { 00029 } 00030 00031 00032 00033 //////////////////////////////////////////////////////////////////// 00034 // Function: EggMorph::set_offset 00035 // Access: Public 00036 // Description: 00037 //////////////////////////////////////////////////////////////////// 00038 template<class Parameter> 00039 INLINE void EggMorph<Parameter>:: 00040 set_offset(const Parameter &offset) { 00041 _offset = offset; 00042 } 00043 00044 00045 //////////////////////////////////////////////////////////////////// 00046 // Function: EggMorph::get_offset 00047 // Access: Public 00048 // Description: 00049 //////////////////////////////////////////////////////////////////// 00050 template<class Parameter> 00051 INLINE const Parameter &EggMorph<Parameter>:: 00052 get_offset() const { 00053 return _offset; 00054 } 00055 00056 00057 //////////////////////////////////////////////////////////////////// 00058 // Function: EggMorph::Ordering operator 00059 // Access: Public 00060 // Description: 00061 //////////////////////////////////////////////////////////////////// 00062 template<class Parameter> 00063 INLINE bool EggMorph<Parameter>:: 00064 operator < (const EggMorph<Parameter> &other) const { 00065 return get_name() < other.get_name(); 00066 } 00067 00068 00069 //////////////////////////////////////////////////////////////////// 00070 // Function: EggMorph::Equality operator 00071 // Access: Public 00072 // Description: 00073 //////////////////////////////////////////////////////////////////// 00074 template<class Parameter> 00075 INLINE bool EggMorph<Parameter>:: 00076 operator == (const EggMorph<Parameter> &other) const { 00077 return get_name() == other.get_name(); 00078 } 00079 00080 //////////////////////////////////////////////////////////////////// 00081 // Function: EggMorph::Inequality operator 00082 // Access: Public 00083 // Description: 00084 //////////////////////////////////////////////////////////////////// 00085 template<class Parameter> 00086 INLINE bool EggMorph<Parameter>:: 00087 operator != (const EggMorph<Parameter> &other) const { 00088 return !operator == (other); 00089 } 00090 00091 00092 //////////////////////////////////////////////////////////////////// 00093 // Function: EggMorphVertex output operator 00094 // Description: 00095 //////////////////////////////////////////////////////////////////// 00096 INLINE ostream &operator << (ostream &out, const EggMorphVertex &m) { 00097 return out << "<Dxyz> " << m.get_name() << " { " << m.get_offset() << " }"; 00098 } 00099 00100 00101 /* 00102 //////////////////////////////////////////////////////////////////// 00103 // Function: EggMorphNormal output operator 00104 // Description: 00105 //////////////////////////////////////////////////////////////////// 00106 INLINE ostream &operator << (ostream &out, const EggMorphNormal &m) { 00107 return out << "<DNormal> " << m.get_name() << " { " << m.get_offset() << " }"; 00108 } 00109 */ 00110 00111 00112 //////////////////////////////////////////////////////////////////// 00113 // Function: EggMorphTexCoord output operator 00114 // Description: 00115 //////////////////////////////////////////////////////////////////// 00116 INLINE ostream &operator << (ostream &out, const EggMorphTexCoord &m) { 00117 return out << "<Duv> " << m.get_name() << " { " << m.get_offset() << " }"; 00118 } 00119 00120 00121 //////////////////////////////////////////////////////////////////// 00122 // Function: EggMorphColor output operator 00123 // Description: 00124 //////////////////////////////////////////////////////////////////// 00125 INLINE ostream &operator << (ostream &out, const EggMorphColor &m) { 00126 return out << "<Drgba> " << m.get_name() << " { " << m.get_offset() << " }"; 00127 }