Changeset 11534
- Timestamp:
- Nov 6, 2017, 2:51:31 PM (7 years ago)
- Location:
- code/branches/SOBv2_HS17/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SOBv2_HS17/src/libraries/tools/Mesh.cc
r11080 r11534 79 79 } 80 80 81 82 81 83 void Mesh::setCastShadows(bool bCastShadows) 82 84 { … … 98 100 if (this->entity_) 99 101 this->entity_->setMaterialName(name); 102 } 103 104 // PRE: a valid Ogre::Entity* entity with a valid subentity at index 105 // POST: changed material of subentity at index to name 106 void Mesh::setSubMaterial(const std::string& name, const int index){ 107 if (this->entity_ && this->entity_->getSubEntity(index)) 108 { 109 this->entity_->getSubEntity(index)->setMaterialName(name); 110 } 111 else 112 orxout() << "ERROR at Index " << index << endl; 100 113 } 101 114 -
code/branches/SOBv2_HS17/src/libraries/tools/Mesh.h
r11080 r11534 50 50 void setMaterial(const std::string& name); 51 51 const std::string& getMaterial() const; 52 52 void setSubMaterial(const std::string& name, const int index); 53 53 void setVisible(bool bVisible); 54 54 bool isVisible() const; -
code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc
r11531 r11534 121 121 { 122 122 std::string name = "orxo_material_gross"; 123 FiguresModel->set Material(name);123 FiguresModel->setSubMaterial(name, 0); 124 124 } 125 125 } -
code/branches/SOBv2_HS17/src/orxonox/graphics/Model.cc
r11517 r11534 1 1 2 /* 2 3 * ORXONOX - the hottest 3D action shooter ever to exist … … 155 156 { 156 157 this->mesh_.setMaterial(this->materialName_); 158 } 159 160 // PRE: a valid Ogre::Entity* entity with a valid subentity at index 161 // POST: changed material of subentity at index to name 162 void Model::setSubMaterial(const std::string& name, const int index){ 163 this->mesh_.setSubMaterial(name, index); 157 164 } 158 165 -
code/branches/SOBv2_HS17/src/orxonox/graphics/Model.h
r11080 r11534 86 86 { return this->materialName_; } 87 87 88 void setSubMaterial(const std::string& name, const int index); 89 90 88 91 protected: 89 92 /**
Note: See TracChangeset
for help on using the changeset viewer.