Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/gobj/geomSprite.I

Go to the documentation of this file.
00001 // Filename: geomSprite.I
00002 // Created by:  charles (18Jul00)
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 //    Function : GeomSprite::set_texture
00021 //      Access : public
00022 // Description :
00023 ////////////////////////////////////////////////////////////////////
00024 INLINE void GeomSprite::
00025 set_texture(Texture *tex) {
00026   _texture = tex;
00027 }
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //    Function : GeomSprite::set_ll_uv
00031 //      Access : public
00032 // Description : Sets the UV coordinate of the lower-left corner of
00033 //               all the sprites within this GeomSprite object.
00034 //               Normally this is (0, 0), but it might be set to
00035 //               something else to use only a portion of the texture.
00036 ////////////////////////////////////////////////////////////////////
00037 INLINE void GeomSprite::
00038 set_ll_uv(const TexCoordf &ll_uv) {
00039   _ll_uv = ll_uv;
00040 }
00041 
00042 ////////////////////////////////////////////////////////////////////
00043 //    Function : GeomSprite::get_ll_uv
00044 //      Access : public
00045 // Description : Returns the UV coordinate of the lower-left corner;
00046 //               see set_ll_uv().
00047 ////////////////////////////////////////////////////////////////////
00048 INLINE const TexCoordf &GeomSprite::
00049 get_ll_uv() const {
00050   return _ll_uv;
00051 }
00052 
00053 ////////////////////////////////////////////////////////////////////
00054 //    Function : GeomSprite::set_ur_uv
00055 //      Access : public
00056 // Description : Sets the UV coordinate of the upper-right corner of
00057 //               all the sprites within this GeomSprite object.
00058 //               Normally this is (1, 1), but it might be set to
00059 //               something else to use only a portion of the texture.
00060 ////////////////////////////////////////////////////////////////////
00061 INLINE void GeomSprite::
00062 set_ur_uv(const TexCoordf &ur_uv) {
00063   _ur_uv = ur_uv;
00064 }
00065 
00066 ////////////////////////////////////////////////////////////////////
00067 //    Function : GeomSprite::get_ur_uv
00068 //      Access : public
00069 // Description : Returns the UV coordinate of the upper-right corner;
00070 //               see set_ur_uv().
00071 ////////////////////////////////////////////////////////////////////
00072 INLINE const TexCoordf &GeomSprite::
00073 get_ur_uv() const {
00074   return _ur_uv;
00075 }
00076 
00077 ////////////////////////////////////////////////////////////////////
00078 //    Function : GeomSprite::get_texture
00079 //      Access : public
00080 // Description :
00081 ////////////////////////////////////////////////////////////////////
00082 INLINE Texture *GeomSprite::
00083 get_texture(void) const {
00084   return _texture;
00085 }
00086 
00087 ////////////////////////////////////////////////////////////////////
00088 //    Function : GeomSprite::set_alpha_disable
00089 //      Access : public
00090 // Description :
00091 ////////////////////////////////////////////////////////////////////
00092 INLINE void GeomSprite::
00093 set_alpha_disable(bool a) {
00094   _alpha_disable = a;
00095 }
00096 
00097 ////////////////////////////////////////////////////////////////////
00098 //    Function : GeomSprite::get_alpha_disable
00099 //      Access : public
00100 // Description :
00101 ////////////////////////////////////////////////////////////////////
00102 INLINE bool GeomSprite::
00103 get_alpha_disable(void) const {
00104   return _alpha_disable;
00105 }
00106 
00107 ////////////////////////////////////////////////////////////////////
00108 //    Function : GeomSprite::set_x_texel_ratio
00109 //      Access : public
00110 // Description :
00111 ////////////////////////////////////////////////////////////////////
00112 INLINE void GeomSprite::
00113 set_x_texel_ratio(PTA_float x_texel_ratio, GeomBindType x_bind_type) {
00114   _x_texel_ratio = x_texel_ratio;
00115   _x_bind_type = x_bind_type;
00116 }
00117 
00118 ////////////////////////////////////////////////////////////////////
00119 //    Function : GeomSprite::set_y_texel_ratio
00120 //      Access : public
00121 // Description :
00122 ////////////////////////////////////////////////////////////////////
00123 INLINE void GeomSprite::
00124 set_y_texel_ratio(PTA_float y_texel_ratio, GeomBindType y_bind_type) {
00125   _y_texel_ratio = y_texel_ratio;
00126   _y_bind_type = y_bind_type;
00127 }
00128 
00129 ////////////////////////////////////////////////////////////////////
00130 //    Function : GeomSprite::set_thetas
00131 //      Access : public
00132 // Description :
00133 ////////////////////////////////////////////////////////////////////
00134 INLINE void GeomSprite::
00135 set_thetas(PTA_float theta, GeomBindType theta_bind_type) {
00136   _theta = theta;
00137   _theta_bind_type = theta_bind_type;
00138 }
00139 
00140 ////////////////////////////////////////////////////////////////////
00141 //    Function : GeomSprite::get_x_bind_type
00142 //      Access : public
00143 // Description :
00144 ////////////////////////////////////////////////////////////////////
00145 INLINE GeomBindType GeomSprite::
00146 get_x_bind_type(void) const {
00147   return _x_bind_type;
00148 }
00149 
00150 ////////////////////////////////////////////////////////////////////
00151 //    Function : GeomSprite::get_y_bind_type
00152 //      Access : public
00153 // Description :
00154 ////////////////////////////////////////////////////////////////////
00155 INLINE GeomBindType GeomSprite::
00156 get_y_bind_type(void) const {
00157   return _y_bind_type;
00158 }
00159 
00160 ////////////////////////////////////////////////////////////////////
00161 //    Function : GeomSprite::get_theta_bind_type
00162 //      Access : public
00163 // Description :
00164 ////////////////////////////////////////////////////////////////////
00165 INLINE GeomBindType GeomSprite::
00166 get_theta_bind_type(void) const {
00167   return _theta_bind_type;
00168 }

Generated on Fri May 2 00:39:28 2003 for Panda by doxygen1.3