Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 24, 2008, 2:48:43 AM (16 years ago)
Author:
landauf
Message:

many changes, can't remember everything, but these are the most important:

  • attaching entities to other entities works
  • displaying models, lights and shadows works
  • controlling a spectator works
  • removed an update hack in PositionableEntity because I've found a much better solution

and with "works" I mean: it works on client, server and standalone

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/tools/Mesh.cc

    r1993 r2006  
    4545    {
    4646        this->entity_ = 0;
     47        this->bCastShadows_ = true;
    4748    }
    4849
     
    5960            if (this->entity_)
    6061                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            }
    6272        }
     73    }
     74
     75    void Mesh::setCastShadows(bool bCastShadows)
     76    {
     77        this->bCastShadows_ = bCastShadows;
     78        if (this->entity_)
     79            this->entity_->setCastShadows(this->bCastShadows_);
    6380    }
    6481
Note: See TracChangeset for help on using the changeset viewer.