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/objects/worldentities/Model.cc

    r1993 r2006  
    5555
    5656        XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
     57        XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
    5758    }
    5859
    5960    void Model::registerVariables()
    6061    {
    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));
    6264    }
    6365
     
    6870
    6971        this->mesh_.setMeshSource(this->meshSrc_);
     72
    7073        if (this->mesh_.getEntity())
     74        {
    7175            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_);
    7283    }
    7384
Note: See TracChangeset for help on using the changeset viewer.