Changeset 2006 for code/branches/objecthierarchy/src/orxonox/tools/Mesh.cc
- Timestamp:
- Oct 24, 2008, 2:48:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/tools/Mesh.cc
r1993 r2006 45 45 { 46 46 this->entity_ = 0; 47 this->bCastShadows_ = true; 47 48 } 48 49 … … 59 60 if (this->entity_) 60 61 GraphicsEngine::getInstance().getLevelSceneManager()->destroyEntity(this->entity_); 61 this->entity_ = GraphicsEngine::getInstance().getLevelSceneManager()->createEntity("Mesh" + convertToString(Mesh::meshCounter_s++), meshsource); 62 63 try 64 { 65 this->entity_ = GraphicsEngine::getInstance().getLevelSceneManager()->createEntity("Mesh" + convertToString(Mesh::meshCounter_s++), meshsource); 66 this->entity_->setCastShadows(this->bCastShadows_); 67 } 68 catch (...) 69 { 70 COUT(1) << "Error: Couln't load mesh \"" << meshsource << "\"" << std::endl; 71 } 62 72 } 73 } 74 75 void Mesh::setCastShadows(bool bCastShadows) 76 { 77 this->bCastShadows_ = bCastShadows; 78 if (this->entity_) 79 this->entity_->setCastShadows(this->bCastShadows_); 63 80 } 64 81
Note: See TracChangeset
for help on using the changeset viewer.