Changeset 8710 for code/branches/presentation/src/orxonox/graphics
- Timestamp:
- Jun 18, 2011, 1:11:04 PM (14 years ago)
- Location:
- code/branches/presentation/src/orxonox/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/graphics/Billboard.cc
r8614 r8710 145 145 } 146 146 } 147 148 void Billboard::setCommonDirection(Vector3 vec)149 {150 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();151 if( bSet != NULL )152 {153 bSet->setCommonDirection( vec );154 }155 }156 157 void Billboard::setCommonUpVector(Vector3 vec)158 {159 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();160 if( bSet != NULL )161 {162 bSet->setCommonUpVector( vec );163 }164 }165 166 void Billboard::setDefaultDimensions(float width, float height)167 {168 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();169 if( bSet != NULL )170 {171 bSet->setDefaultDimensions(width, height);172 }173 }174 147 } -
code/branches/presentation/src/orxonox/graphics/Billboard.h
r8614 r8710 65 65 { return this->colour_; } 66 66 67 68 67 inline void setRotation(const Radian& rotation) 69 68 { this->rotation_ = rotation; this->changedRotation(); } … … 71 70 { return this->rotation_; } 72 71 72 /// use normalised vector as argument 73 inline void setCommonDirection(const Vector3 vec) 74 { if(this->billboard_.getBillboardSet()) 75 this->billboard_.getBillboardSet()->setCommonDirection(vec); } 76 inline const Vector3 getCommonDirection() 77 { if(this->billboard_.getBillboardSet()) 78 return this->billboard_.getBillboardSet()->getCommonDirection(); } 79 80 /// use normalised vector as argument 81 inline void setCommonUpVector(const Vector3 vec) 82 { if(this->billboard_.getBillboardSet()) 83 this->billboard_.getBillboardSet()->setCommonUpVector( vec ); } 84 inline const Vector3 getCommonUpVector() 85 { if(this->billboard_.getBillboardSet()) 86 return this->billboard_.getBillboardSet()->getCommonUpVector(); } 73 87 74 88 virtual void setTeamColour(const ColourValue& colour) … … 77 91 void setBillboardType(Ogre::BillboardType bbt); 78 92 79 void setCommonDirection(Vector3 vec); //!< normalised Vector vec as argument 80 81 void setCommonUpVector(Vector3 vec); //!< normalised Vector vec as argument 82 83 void setDefaultDimensions(float width, float height); 93 inline void setDefaultDimensions(float width, float height) 94 { if(this->billboard_.getBillboardSet()) 95 this->billboard_.getBillboardSet()->setDefaultDimensions(width, height); } 84 96 97 inline void setTextureCoords(const Ogre::FloatRect* coords, unsigned int numCoords) 98 { if(this->billboard_.getBillboardSet()) 99 this->billboard_.getBillboardSet()->setTextureCoords(coords, numCoords); } 85 100 86 101 protected:
Note: See TracChangeset
for help on using the changeset viewer.