Exemplo n.º 1
0
    void Light::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
    {
        const std::string model = getModel(ptr);

        // Insert even if model is empty, so that the light is added
        renderingInterface.getObjects().insertModel(ptr, model);
    }
Exemplo n.º 2
0
 void Apparatus::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
 {
     const std::string model = getModel(ptr);
     if (!model.empty()) {
         renderingInterface.getObjects().insertModel(ptr, model);
     }
 }
Exemplo n.º 3
0
    void Light::insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const
    {
        MWWorld::LiveCellRef<ESM::Light> *ref =
            ptr.get<ESM::Light>();

        // Insert even if model is empty, so that the light is added
        renderingInterface.getObjects().insertModel(ptr, model, true, !(ref->mBase->mData.mFlags & ESM::Light::OffDefault));
    }
Exemplo n.º 4
0
 void Door::insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const
 {
     if (!model.empty())
     {
         renderingInterface.getObjects().insertModel(ptr, model, true);
         ptr.getRefData().getBaseNode()->setNodeMask(MWRender::Mask_Static);
     }
 }
Exemplo n.º 5
0
 void Activator::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
 {
     const std::string model = getModel(ptr);
     if (!model.empty()) {
         MWRender::Actors& actors = renderingInterface.getActors();
         actors.insertActivator(ptr);
     }
 }
Exemplo n.º 6
0
 void Lockpick::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
 {
     const std::string model = getModel(ptr);
     if (!model.empty()) {
         MWRender::Objects& objects = renderingInterface.getObjects();
         objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
         objects.insertMesh(ptr, model);
     }
 }
Exemplo n.º 7
0
    void Light::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
    {
        MWWorld::LiveCellRef<ESM::Light> *ref =
            ptr.get<ESM::Light>();

        // Insert even if model is empty, so that the light is added
        MWRender::Actors& actors = renderingInterface.getActors();
        actors.insertActivator(ptr, !(ref->mBase->mData.mFlags & ESM::Light::OffDefault));
    }
Exemplo n.º 8
0
    void Static::insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const
    {
        MWWorld::LiveCellRef<ESM::Static> *ref =
            ptr.get<ESM::Static>();

        if (!model.empty()) {
            renderingInterface.getObjects().insertModel(ptr, model, !ref->mBase->mPersistent);
        }
    }
Exemplo n.º 9
0
void Activator::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
    ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
        ptr.get<ESM::Activator>();

    assert (ref->base != NULL);
    const std::string &model = ref->base->model;

    if (!model.empty())
    {
        MWRender::Objects& objects = renderingInterface.getObjects();
        objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
        objects.insertMesh(ptr, "meshes\\" + model);
    }
}
Exemplo n.º 10
0
Arquivo: light.cpp Projeto: 4DA/openmw
    void Light::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
    {
        MWWorld::LiveCellRef<ESM::Light> *ref =
            ptr.get<ESM::Light>();
        assert (ref->mBase != NULL);

        const std::string &model = ref->mBase->mModel;

        MWRender::Objects& objects = renderingInterface.getObjects();
        objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);

        if (!model.empty())
            objects.insertMesh(ptr, "meshes\\" + model, true);
        else
            objects.insertLight(ptr);
    }
Exemplo n.º 11
0
 void Repair::insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const
 {
     if (!model.empty()) {
         renderingInterface.getObjects().insertModel(ptr, model);
     }
 }
Exemplo n.º 12
0
 void Creature::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
 {
     MWRender::Actors& actors = renderingInterface.getActors();
     actors.insertCreature(ptr);
 }
Exemplo n.º 13
0
 void Npc::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
 {
     renderingInterface.getActors().insertNPC(ptr, getInventoryStore(ptr));
 }