Changeset 10433 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 28, 2007, 12:01:34 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/WorldEntities.am
r10422 r10433 98 98 \ 99 99 world_entities/effects/lightning_bolt.cc \ 100 world_entities/effects/blink.cc \ 100 101 \ 101 102 world_entities/script_trigger.cc \ … … 228 229 \ 229 230 effects/lightning_bolt.h \ 231 effects/blink.h \ 230 232 \ 231 233 script_trigger.h \ -
trunk/src/world_entities/effects/billboard.cc
r10114 r10433 24 24 25 25 26 26 #include "debug.h" 27 27 28 28 … … 66 66 //this->setVisibiliy(true); 67 67 this->setSize(5, 5); 68 69 this->texColor = NULL; 68 70 } 69 71 … … 147 149 //v += this->getAbsCoor(); 148 150 //PRINTF(0)("sizeX: %f sizeY: %f\n", sizeX, sizeY); 151 152 // changes the color of the texture (if any is set) 153 if(this->texColor != NULL) 154 glColor4ub((GLubyte)this->texColor->r()*255, (GLubyte)this->texColor->g()*255, (GLubyte)this->texColor->b()*255, (GLubyte)(this->texColor->a()*255)); 155 149 156 glBegin(GL_QUADS); 150 157 glTexCoord2f(0.0f, 0.0f); … … 171 178 glPopAttrib(); 172 179 } 180 181 182 /** 183 * changes the texture color 184 * @param col color for the texture 185 */ 186 void Billboard::colorTexture(const Color col) 187 { 188 this->texColor = new Color(col.r(), col.g(), col.b(), col.a()); 189 } -
trunk/src/world_entities/effects/billboard.h
r9869 r10433 10 10 class Material; 11 11 class TiXmlElement; 12 class Color; 12 13 13 14 class Billboard : public WorldEntity … … 23 24 void setSize(float sizeX, float sizeY); 24 25 void setTexture(const std::string& textureFile); 26 void colorTexture(const Color col); 25 27 26 28 virtual void tick(float dt); … … 29 31 private: 30 32 Material* material; 33 Color* texColor; 31 34 float sizeX; 32 35 float sizeY;
Note: See TracChangeset
for help on using the changeset viewer.