Panda3D
|
00001 // Filename: textureCollection.I 00002 // Created by: drose (16Mar02) 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: TextureCollection::Destructor 00018 // Access: Published 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE TextureCollection:: 00022 ~TextureCollection() { 00023 } 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Function: TextureCollection::operator += 00027 // Access: Published 00028 // Description: Appends the other list onto the end of this one. 00029 //////////////////////////////////////////////////////////////////// 00030 INLINE void TextureCollection:: 00031 operator += (const TextureCollection &other) { 00032 add_textures_from(other); 00033 } 00034 00035 //////////////////////////////////////////////////////////////////// 00036 // Function: TextureCollection::operator + 00037 // Access: Published 00038 // Description: Returns a TextureCollection representing the 00039 // concatenation of the two lists. 00040 //////////////////////////////////////////////////////////////////// 00041 INLINE TextureCollection TextureCollection:: 00042 operator + (const TextureCollection &other) const { 00043 TextureCollection a(*this); 00044 a += other; 00045 return a; 00046 } 00047 00048 //////////////////////////////////////////////////////////////////// 00049 // Function: TextureCollection::append 00050 // Access: Published 00051 // Description: Adds a new Texture to the collection. This method 00052 // duplicates the add_texture() method; it is provided to 00053 // satisfy Python's naming convention. 00054 //////////////////////////////////////////////////////////////////// 00055 void TextureCollection:: 00056 append(Texture *texture) { 00057 add_texture(texture); 00058 } 00059 00060 //////////////////////////////////////////////////////////////////// 00061 // Function: TextureCollection::extend 00062 // Access: Published 00063 // Description: Appends the other list onto the end of this one. 00064 // This method duplicates the += operator; it is 00065 // provided to satisfy Python's naming convention. 00066 //////////////////////////////////////////////////////////////////// 00067 INLINE void TextureCollection:: 00068 extend(const TextureCollection &other) { 00069 operator += (other); 00070 }