00001 // Filename: builderBucket.I 00002 // Created by: drose (09Sep97) 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 //////////////////////////////////////////////////////////////////// 00022 // Function: BuilderBucket::set_coords 00023 // Access: Public 00024 // Description: Sets the array that will be used to define the 00025 // vertices for any indexed geometry that is associated 00026 // with this bucket. 00027 //////////////////////////////////////////////////////////////////// 00028 INLINE void BuilderBucket:: 00029 set_coords(const PTA_Vertexf &coords) { 00030 _coords = coords; 00031 } 00032 00033 //////////////////////////////////////////////////////////////////// 00034 // Function: BuilderBucket::get_coords 00035 // Access: Public 00036 // Description: 00037 //////////////////////////////////////////////////////////////////// 00038 INLINE PTA_Vertexf BuilderBucket:: 00039 get_coords() const { 00040 return _coords; 00041 } 00042 00043 00044 //////////////////////////////////////////////////////////////////// 00045 // Function: BuilderBucket::set_normals 00046 // Access: Public 00047 // Description: Sets the array that will be used to define the 00048 // normals for any indexed geometry that is associated 00049 // with this bucket. 00050 //////////////////////////////////////////////////////////////////// 00051 INLINE void BuilderBucket:: 00052 set_normals(const PTA_Normalf &normals) { 00053 _normals = normals; 00054 } 00055 00056 00057 //////////////////////////////////////////////////////////////////// 00058 // Function: BuilderBucket::get_normals 00059 // Access: Public 00060 // Description: 00061 //////////////////////////////////////////////////////////////////// 00062 INLINE PTA_Normalf BuilderBucket:: 00063 get_normals() const { 00064 return _normals; 00065 } 00066 00067 00068 //////////////////////////////////////////////////////////////////// 00069 // Function: BuilderBucket::set_texcoords 00070 // Access: Public 00071 // Description: Sets the array that will be used to define the 00072 // texture coordinates for any indexed geometry that is 00073 // associated with this bucket. 00074 //////////////////////////////////////////////////////////////////// 00075 INLINE void BuilderBucket:: 00076 set_texcoords(const PTA_TexCoordf &texcoords) { 00077 _texcoords = texcoords; 00078 } 00079 00080 00081 //////////////////////////////////////////////////////////////////// 00082 // Function: BuilderBucket::get_texcoords 00083 // Access: Public 00084 // Description: 00085 //////////////////////////////////////////////////////////////////// 00086 INLINE PTA_TexCoordf BuilderBucket:: 00087 get_texcoords() const { 00088 return _texcoords; 00089 } 00090 00091 00092 //////////////////////////////////////////////////////////////////// 00093 // Function: BuilderBucket::set_colors 00094 // Access: Public 00095 // Description: Sets the array that will be used to define the 00096 // colors for any indexed geometry that is associated 00097 // with this bucket. 00098 //////////////////////////////////////////////////////////////////// 00099 INLINE void BuilderBucket:: 00100 set_colors(const PTA_Colorf &colors) { 00101 _colors = colors; 00102 } 00103 00104 00105 //////////////////////////////////////////////////////////////////// 00106 // Function: BuilderBucket::get_colors 00107 // Access: Public 00108 // Description: 00109 //////////////////////////////////////////////////////////////////// 00110 INLINE PTA_Colorf BuilderBucket:: 00111 get_colors() const { 00112 return _colors; 00113 } 00114 00115 00116 //////////////////////////////////////////////////////////////////// 00117 // Function: BuilderBucket::get_default_bucket 00118 // Access: Public, Static 00119 // Description: Returns a pointer to the BuilderBucket that is used 00120 // to initialize any BuilderBuckets created with a 00121 // default constructor. This is just a convenient way 00122 // to set some global parameters. 00123 //////////////////////////////////////////////////////////////////// 00124 INLINE BuilderBucket *BuilderBucket:: 00125 get_default_bucket() { 00126 if (_default_bucket==NULL) { 00127 _default_bucket = new BuilderBucket(true); 00128 } 00129 return _default_bucket; 00130 }