Panda3D
eggTextureCollection.I
1 // Filename: eggTextureCollection.I
2 // Created by: drose (16Feb00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: EggTextureCollection::begin
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE EggTextureCollection::iterator EggTextureCollection::
22 begin() const {
23  nassertr(_ordered_textures.size() == _textures.size(),
24  _ordered_textures.begin());
25  return _ordered_textures.begin();
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: EggTextureCollection::end
30 // Access: Public
31 // Description:
32 ////////////////////////////////////////////////////////////////////
33 INLINE EggTextureCollection::iterator EggTextureCollection::
34 end() const {
35  return _ordered_textures.end();
36 }
37 
38 ////////////////////////////////////////////////////////////////////
39 // Function: EggTextureCollection::empty
40 // Access: Public
41 // Description:
42 ////////////////////////////////////////////////////////////////////
43 INLINE bool EggTextureCollection::
44 empty() const {
45  return _ordered_textures.empty();
46 }
47 
48 ////////////////////////////////////////////////////////////////////
49 // Function: EggTextureCollection::operator []
50 // Access: Published
51 // Description: Returns the nth EggTexture in the collection.
52 ////////////////////////////////////////////////////////////////////
54 operator [] (size_type n) const {
55  return get_texture(n);
56 }
57 
58 ////////////////////////////////////////////////////////////////////
59 // Function: EggTextureCollection::size
60 // Access: Published
61 // Description: Returns the number of EggTextures in the collection.
62 ////////////////////////////////////////////////////////////////////
63 INLINE EggTextureCollection::size_type EggTextureCollection::
64 size() const {
65  nassertr(_ordered_textures.size() == _textures.size(), 0);
66  return _ordered_textures.size();
67 }
Defines a texture map that may be applied to geometry.
Definition: eggTexture.h:33
EggTexture * get_texture(int index) const
Returns the nth EggTexture in the collection.
EggTexture * operator[](size_type n) const
Returns the nth EggTexture in the collection.
size_type size() const
Returns the number of EggTextures in the collection.