00001 // Filename: eggTextureCollection.I 00002 // Created by: drose (16Feb00) 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: EggTextureCollection::begin 00018 // Access: Public 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE EggTextureCollection::iterator EggTextureCollection:: 00022 begin() const { 00023 nassertr(_ordered_textures.size() == _textures.size(), 00024 _ordered_textures.begin()); 00025 return _ordered_textures.begin(); 00026 } 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Function: EggTextureCollection::end 00030 // Access: Public 00031 // Description: 00032 //////////////////////////////////////////////////////////////////// 00033 INLINE EggTextureCollection::iterator EggTextureCollection:: 00034 end() const { 00035 return _ordered_textures.end(); 00036 } 00037 00038 //////////////////////////////////////////////////////////////////// 00039 // Function: EggTextureCollection::empty 00040 // Access: Public 00041 // Description: 00042 //////////////////////////////////////////////////////////////////// 00043 INLINE bool EggTextureCollection:: 00044 empty() const { 00045 return _ordered_textures.empty(); 00046 } 00047 00048 //////////////////////////////////////////////////////////////////// 00049 // Function: EggTextureCollection::operator [] 00050 // Access: Published 00051 // Description: Returns the nth EggTexture in the collection. 00052 //////////////////////////////////////////////////////////////////// 00053 EggTexture *EggTextureCollection:: 00054 operator [] (size_type n) const { 00055 return get_texture(n); 00056 } 00057 00058 //////////////////////////////////////////////////////////////////// 00059 // Function: EggTextureCollection::size 00060 // Access: Published 00061 // Description: Returns the number of EggTextures in the collection. 00062 //////////////////////////////////////////////////////////////////// 00063 INLINE EggTextureCollection::size_type EggTextureCollection:: 00064 size() const { 00065 nassertr(_ordered_textures.size() == _textures.size(), 0); 00066 return _ordered_textures.size(); 00067 }