Panda3D
 All Classes Functions Variables Enumerations
textureCollection.I
1 // Filename: textureCollection.I
2 // Created by: drose (16Mar02)
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: TextureCollection::Destructor
18 // Access: Published
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE TextureCollection::
22 ~TextureCollection() {
23 }
24 
25 ////////////////////////////////////////////////////////////////////
26 // Function: TextureCollection::operator +=
27 // Access: Published
28 // Description: Appends the other list onto the end of this one.
29 ////////////////////////////////////////////////////////////////////
30 INLINE void TextureCollection::
32  add_textures_from(other);
33 }
34 
35 ////////////////////////////////////////////////////////////////////
36 // Function: TextureCollection::operator +
37 // Access: Published
38 // Description: Returns a TextureCollection representing the
39 // concatenation of the two lists.
40 ////////////////////////////////////////////////////////////////////
42 operator + (const TextureCollection &other) const {
43  TextureCollection a(*this);
44  a += other;
45  return a;
46 }
47 
48 ////////////////////////////////////////////////////////////////////
49 // Function: TextureCollection::append
50 // Access: Published
51 // Description: Adds a new Texture to the collection. This method
52 // duplicates the add_texture() method; it is provided to
53 // satisfy Python's naming convention.
54 ////////////////////////////////////////////////////////////////////
56 append(Texture *texture) {
57  add_texture(texture);
58 }
59 
60 ////////////////////////////////////////////////////////////////////
61 // Function: TextureCollection::extend
62 // Access: Published
63 // Description: Appends the other list onto the end of this one.
64 // This method duplicates the += operator; it is
65 // provided to satisfy Python's naming convention.
66 ////////////////////////////////////////////////////////////////////
67 INLINE void TextureCollection::
68 extend(const TextureCollection &other) {
69  operator += (other);
70 }
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
Definition: texture.h:75
void add_texture(Texture *texture)
Adds a new Texture to the collection.
void operator+=(const TextureCollection &other)
Appends the other list onto the end of this one.
Manages a list of Texture objects, as returned by TexturePool::find_all_textures().
void append(Texture *texture)
Adds a new Texture to the collection.
void add_textures_from(const TextureCollection &other)
Adds all the Textures indicated in the other collection to this texture.
void extend(const TextureCollection &other)
Appends the other list onto the end of this one.
TextureCollection operator+(const TextureCollection &other) const
Returns a TextureCollection representing the concatenation of the two lists.