- Timestamp:
- Oct 24, 2008, 2:48:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Model.cc
r1993 r2006 55 55 56 56 XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode); 57 XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true); 57 58 } 58 59 59 60 void Model::registerVariables() 60 61 { 61 REGISTERSTRING(this->meshSrc_, network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedMesh)); 62 REGISTERSTRING(this->meshSrc_, network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedMesh)); 63 REGISTERDATA(this->bCastShadows_, network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedShadows)); 62 64 } 63 65 … … 68 70 69 71 this->mesh_.setMeshSource(this->meshSrc_); 72 70 73 if (this->mesh_.getEntity()) 74 { 71 75 this->getNode()->attachObject(this->mesh_.getEntity()); 76 this->mesh_.getEntity()->setCastShadows(this->bCastShadows_); 77 } 78 } 79 80 void Model::changedShadows() 81 { 82 this->mesh_.setCastShadows(this->bCastShadows_); 72 83 } 73 84
Note: See TracChangeset
for help on using the changeset viewer.