Changeset 11080 for code/trunk/src/libraries/tools
- Timestamp:
- Jan 19, 2016, 11:27:40 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/tools/Mesh.cc
r11071 r11080 33 33 #include <string> 34 34 #include <OgreEntity.h> 35 #include <OgreSubEntity.h> 35 36 #include <OgreSceneManager.h> 36 37 … … 93 94 } 94 95 96 void Mesh::setMaterial(const std::string& name) 97 { 98 if (this->entity_) 99 this->entity_->setMaterialName(name); 100 } 101 102 const std::string& Mesh::getMaterial() const 103 { 104 if (this->entity_) 105 { 106 if(this->entity_->getSubEntity(0)) 107 return this->entity_->getSubEntity(0)->getMaterialName(); //return the Material of the first SubEntity, should be enough for now 108 else 109 return BLANKSTRING; 110 } 111 else 112 return BLANKSTRING; 113 } 114 95 115 void Mesh::setVisible(bool bVisible) 96 116 { -
code/trunk/src/libraries/tools/Mesh.h
r5781 r11080 48 48 const std::string& getName() const; 49 49 50 void setMaterial(const std::string& name); 51 const std::string& getMaterial() const; 52 50 53 void setVisible(bool bVisible); 51 54 bool isVisible() const;
Note: See TracChangeset
for help on using the changeset viewer.