Changeset 9402
- Timestamp:
- Oct 16, 2012, 3:32:20 PM (12 years ago)
- Location:
- code/branches/shaders/src/orxonox/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/shaders/src/orxonox/graphics/Model.cc
r8858 r9402 71 71 72 72 XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode); 73 XMLPortParam(Model, "material", setMaterial, getMaterial, xmlelement, mode); 73 74 XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true); 74 75 } … … 109 110 } 110 111 } 112 } 113 114 void Model::changedMaterial() 115 { 116 this->mesh_.setMaterial(this->materialName_); 111 117 } 112 118 -
code/branches/shaders/src/orxonox/graphics/Model.h
r7166 r9402 63 63 { return this->bCastShadows_; } 64 64 65 inline void setMaterial(const std::string& materialname) 66 { this->materialName_ = materialname; this->changedMaterial(); } 67 inline const std::string& getMaterial() const 68 { return this->materialName_; } 69 65 70 protected: 66 71 void registerVariables(); 67 72 void changedMesh(); 73 void changedMaterial(); 68 74 void changedShadows(); 69 75 … … 80 86 Mesh mesh_; 81 87 bool bCastShadows_; 88 std::string materialName_; 82 89 83 90 //LoD
Note: See TracChangeset
for help on using the changeset viewer.