Changeset 8706 for code/trunk/src/orxonox/graphics
- Timestamp:
- Jun 14, 2011, 8:53:28 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/graphics/Billboard.cc
r7492 r8706 23 23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * ...25 * Maurus Kaufmann 26 26 * 27 27 */ … … 30 30 31 31 #include "OgreBillboard.h" 32 #include "OgreBillboardSet.h"33 32 34 33 #include "core/CoreIncludes.h" … … 46 45 47 46 this->colour_ = ColourValue::White; 48 //this->rotation_ = 0;47 this->rotation_ = 0; 49 48 50 49 this->registerVariables(); … … 66 65 XMLPortParam(Billboard, "material", setMaterial, getMaterial, xmlelement, mode); 67 66 XMLPortParam(Billboard, "colour", setColour, getColour, xmlelement, mode).defaultValues(ColourValue::White); 68 //XMLPortParam(Billboard, "rotation", setRotation, getRotation, xmlelement, mode).defaultValues(0);67 XMLPortParam(Billboard, "rotation", setRotation, getRotation, xmlelement, mode).defaultValues(0); 69 68 } 70 69 … … 73 72 registerVariable(this->material_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial)); 74 73 registerVariable(this->colour_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedColour)); 75 //registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));74 registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation)); 76 75 } 77 76 … … 89 88 this->attachOgreObject(this->billboard_.getBillboardSet()); 90 89 this->billboard_.setVisible(this->isVisible()); 91 //this->changedRotation();90 this->changedRotation(); 92 91 } 93 92 } … … 114 113 } 115 114 116 /* 115 117 116 void Billboard::changedRotation() 118 117 { … … 128 127 } 129 128 } 130 */ 129 131 130 132 131 void Billboard::changedVisibility() … … 136 135 this->billboard_.setVisible(this->isVisible()); 137 136 } 137 138 void Billboard::setBillboardType(Ogre::BillboardType bbt) 139 { 140 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet(); 141 if( bSet != NULL ) 142 { 143 bSet->setBillboardType(bbt); 144 } 145 } 146 147 void Billboard::setCommonDirection(Vector3 vec) 148 { 149 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet(); 150 if( bSet != NULL ) 151 { 152 bSet->setCommonDirection( vec ); 153 } 154 } 155 156 void Billboard::setCommonUpVector(Vector3 vec) 157 { 158 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet(); 159 if( bSet != NULL ) 160 { 161 bSet->setCommonUpVector( vec ); 162 } 163 } 164 165 void Billboard::setDefaultDimensions(float width, float height) 166 { 167 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet(); 168 if( bSet != NULL ) 169 { 170 bSet->setDefaultDimensions(width, height); 171 } 172 } 138 173 } -
code/trunk/src/orxonox/graphics/Billboard.h
r7492 r8706 23 23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * ...25 * Maurus Kaufmann 26 26 * 27 27 */ … … 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "OgreBillboardSet.h" 33 35 34 36 #include "util/Math.h" … … 62 64 { return this->colour_; } 63 65 64 /* 66 65 67 inline void setRotation(const Radian& rotation) 66 68 { this->rotation_ = rotation; this->changedRotation(); } 67 69 inline const Radian& getRotation() const 68 70 { return this->rotation_; } 69 */ 71 70 72 71 73 virtual void setTeamColour(const ColourValue& colour) 72 74 { this->setColour(colour); } 75 76 void setBillboardType(Ogre::BillboardType bbt); 77 78 void setCommonDirection(Vector3 vec); //!< normalised Vector vec as argument 79 80 void setCommonUpVector(Vector3 vec); //!< normalised Vector vec as argument 81 82 void setDefaultDimensions(float width, float height); 83 73 84 74 85 protected: … … 81 92 void registerVariables(); 82 93 void changedMaterial(); 83 //void changedRotation();94 void changedRotation(); 84 95 85 96 BillboardSet billboard_; 86 97 std::string material_; 87 98 ColourValue colour_; 88 //Radian rotation_;99 Radian rotation_; 89 100 }; 90 101 } -
code/trunk/src/orxonox/graphics/Camera.cc
r8079 r8706 71 71 this->lastDtLagged_ = false; 72 72 73 this->setSyncMode( 0x0);73 this->setSyncMode(ObjectDirection::None); 74 74 75 75 this->setConfigValues(); -
code/trunk/src/orxonox/graphics/Camera.h
r8079 r8706 40 40 namespace orxonox 41 41 { 42 class _OrxonoxExport Camera : public StaticEntity, public Tickable, public TimeFactorListener, public WindowEventListener 42 43 class _OrxonoxExport Camera : public StaticEntity, public Tickable, public TimeFactorListener, public WindowEventListener 43 44 { 44 45 friend class CameraManager;
Note: See TracChangeset
for help on using the changeset viewer.