Changeset 8614 for code/branches/presentation/src/orxonox/graphics
- Timestamp:
- May 26, 2011, 5:40:16 PM (14 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
- Property svn:mergeinfo changed
/code/branches/spaceboundaries2 (added) merged: 8468,8506,8513,8604,8609,8613
- Property svn:mergeinfo changed
-
code/branches/presentation/src/orxonox/graphics/Billboard.cc
r7492 r8614 23 23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * Maurus Kaufmann 25 26 * ... 26 27 * … … 30 31 31 32 #include "OgreBillboard.h" 32 #include "OgreBillboardSet.h"33 33 34 34 #include "core/CoreIncludes.h" … … 46 46 47 47 this->colour_ = ColourValue::White; 48 //this->rotation_ = 0;48 this->rotation_ = 0; 49 49 50 50 this->registerVariables(); … … 66 66 XMLPortParam(Billboard, "material", setMaterial, getMaterial, xmlelement, mode); 67 67 XMLPortParam(Billboard, "colour", setColour, getColour, xmlelement, mode).defaultValues(ColourValue::White); 68 //XMLPortParam(Billboard, "rotation", setRotation, getRotation, xmlelement, mode).defaultValues(0);68 XMLPortParam(Billboard, "rotation", setRotation, getRotation, xmlelement, mode).defaultValues(0); 69 69 } 70 70 … … 73 73 registerVariable(this->material_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial)); 74 74 registerVariable(this->colour_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedColour)); 75 //registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));75 registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation)); 76 76 } 77 77 … … 89 89 this->attachOgreObject(this->billboard_.getBillboardSet()); 90 90 this->billboard_.setVisible(this->isVisible()); 91 //this->changedRotation();91 this->changedRotation(); 92 92 } 93 93 } … … 114 114 } 115 115 116 /* 116 117 117 void Billboard::changedRotation() 118 118 { … … 128 128 } 129 129 } 130 */ 130 131 131 132 132 void Billboard::changedVisibility() … … 136 136 this->billboard_.setVisible(this->isVisible()); 137 137 } 138 139 void Billboard::setBillboardType(Ogre::BillboardType bbt) 140 { 141 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet(); 142 if( bSet != NULL ) 143 { 144 bSet->setBillboardType(bbt); 145 } 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 } 138 174 } -
code/branches/presentation/src/orxonox/graphics/Billboard.h
r7492 r8614 23 23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * Maurus Kaufmann 25 26 * ... 26 27 * … … 31 32 32 33 #include "OrxonoxPrereqs.h" 34 35 #include "OgreBillboardSet.h" 33 36 34 37 #include "util/Math.h" … … 62 65 { return this->colour_; } 63 66 64 /* 67 65 68 inline void setRotation(const Radian& rotation) 66 69 { this->rotation_ = rotation; this->changedRotation(); } 67 70 inline const Radian& getRotation() const 68 71 { return this->rotation_; } 69 */ 72 70 73 71 74 virtual void setTeamColour(const ColourValue& colour) 72 75 { this->setColour(colour); } 76 77 void setBillboardType(Ogre::BillboardType bbt); 78 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); 84 73 85 74 86 protected: … … 81 93 void registerVariables(); 82 94 void changedMaterial(); 83 //void changedRotation();95 void changedRotation(); 84 96 85 97 BillboardSet billboard_; 86 98 std::string material_; 87 99 ColourValue colour_; 88 //Radian rotation_;100 Radian rotation_; 89 101 }; 90 102 }
Note: See TracChangeset
for help on using the changeset viewer.