mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 10:23:51 +00:00
Made buildStaticGeometry function
This commit is contained in:
parent
8edcd4d15b
commit
c11b3a57c1
2 changed files with 10 additions and 1 deletions
|
@ -93,7 +93,7 @@ void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh){
|
||||||
sg->addEntity(ent,insert->_getDerivedPosition(),insert->_getDerivedOrientation(),insert->_getDerivedScale());
|
sg->addEntity(ent,insert->_getDerivedPosition(),insert->_getDerivedOrientation(),insert->_getDerivedScale());
|
||||||
sg->setRegionDimensions(Ogre::Vector3(100000,10000,100000));
|
sg->setRegionDimensions(Ogre::Vector3(100000,10000,100000));
|
||||||
|
|
||||||
sg->build(); //Is this the right place for building?
|
|
||||||
mRend.getScene()->destroyEntity(ent);
|
mRend.getScene()->destroyEntity(ent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,4 +159,11 @@ void Objects::removeCell(const MWWorld::Ptr& ptr){
|
||||||
sg = 0;
|
sg = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void Objects::buildStaticGeometry(const MWWorld::Ptr& ptr){
|
||||||
|
if(mSG.find(ptr.getCell()) != mSG.end())
|
||||||
|
{
|
||||||
|
Ogre::StaticGeometry* sg = mSG[ptr.getCell()];
|
||||||
|
sg->build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,8 @@ public:
|
||||||
void insertLight (const MWWorld::Ptr& ptr, float r, float g, float b, float radius);
|
void insertLight (const MWWorld::Ptr& ptr, float r, float g, float b, float radius);
|
||||||
void deleteObject (const std::string& handle);
|
void deleteObject (const std::string& handle);
|
||||||
void removeCell(const MWWorld::Ptr& ptr);
|
void removeCell(const MWWorld::Ptr& ptr);
|
||||||
|
void buildStaticGeometry(const MWWorld::Ptr& ptr);
|
||||||
|
|
||||||
|
|
||||||
/// insert a light related to the most recent insertBegin call.
|
/// insert a light related to the most recent insertBegin call.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue