Changeset 9401 for code/branches/shaders/src/libraries/tools
- Timestamp:
- Oct 16, 2012, 3:30:20 PM (12 years ago)
- Location:
- code/branches/shaders/src/libraries/tools
- Files:
-
- 2 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 { -
code/branches/shaders/src/libraries/tools/Mesh.h
r5781 r9401 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.