Changeset 9401 for code/branches/shaders/src/libraries/tools/Mesh.cc
- Timestamp:
- Oct 16, 2012, 3:30:20 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/shaders/src/libraries/tools/Mesh.cc
r8858 r9401 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 {
Note: See TracChangeset
for help on using the changeset viewer.