Some naming changes

actorid
Jason Hooks 13 years ago
parent 0f4adc39b3
commit 0d3338f867

@ -24,10 +24,10 @@ bool Objects::lightOutQuadInLin = false;
int Objects::uniqueID = 0;
void Objects::setMwRoot(Ogre::SceneNode* root){
mwRoot = root;
mMwRoot = root;
}
void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_){
Ogre::SceneNode* root = mwRoot;
Ogre::SceneNode* root = mMwRoot;
Ogre::SceneNode* cellnode;
if(mCellSceneNodes.find(ptr.getCell()) == mCellSceneNodes.end())
{

@ -13,7 +13,7 @@ class Objects{
OEngine::Render::OgreRenderer &mRend;
std::map<MWWorld::Ptr::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
std::map<MWWorld::Ptr::CellStore *, Ogre::StaticGeometry*> mSG;
Ogre::SceneNode* mwRoot;
Ogre::SceneNode* mMwRoot;
bool isStatic;
static int uniqueID;
static bool lightConst;

@ -22,10 +22,10 @@ namespace MWRender {
RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const boost::filesystem::path& resDir, OEngine::Physic::PhysicEngine* engine)
:rend(_rend), objects(rend), mDebugging(engine)
:mRendering(_rend), mObjects(mRendering), mDebugging(engine)
{
rend.createScene("PlayerCam", 55, 5);
mSkyManager = MWRender::SkyManager::create(rend.getWindow(), rend.getCamera(), resDir);
mRendering.createScene("PlayerCam", 55, 5);
mSkyManager = MWRender::SkyManager::create(mRendering.getWindow(), mRendering.getCamera(), resDir);
// Set default mipmap level (NB some APIs ignore this)
TextureManager::getSingleton().setDefaultNumMipmaps(5);
@ -38,21 +38,21 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
// the screen (when x is to the right.) This is the orientation that
// Morrowind uses, and it automagically makes everything work as it
// should.
SceneNode *rt = rend.getScene()->getRootSceneNode();
mwRoot = rt->createChildSceneNode();
mwRoot->pitch(Degree(-90));
objects.setMwRoot(mwRoot);
SceneNode *rt = mRendering.getScene()->getRootSceneNode();
mMwRoot = rt->createChildSceneNode();
mMwRoot->pitch(Degree(-90));
mObjects.setMwRoot(mMwRoot);
//used to obtain ingame information of ogre objects (which are faced or selected)
mRaySceneQuery = rend.getScene()->createRayQuery(Ray());
mRaySceneQuery = mRendering.getScene()->createRayQuery(Ray());
Ogre::SceneNode *playerNode = mwRoot->createChildSceneNode ("player");
Ogre::SceneNode *playerNode = mMwRoot->createChildSceneNode ("player");
playerNode->pitch(Degree(90));
Ogre::SceneNode *cameraYawNode = playerNode->createChildSceneNode();
Ogre::SceneNode *cameraPitchNode = cameraYawNode->createChildSceneNode();
cameraPitchNode->attachObject(rend.getCamera());
cameraPitchNode->attachObject(mRendering.getCamera());
mPlayer = new MWRender::Player (rend.getCamera(), playerNode);
mPlayer = new MWRender::Player (mRendering.getCamera(), playerNode);
}
RenderingManager::~RenderingManager ()
@ -62,25 +62,25 @@ RenderingManager::~RenderingManager ()
}
MWRender::Npcs& RenderingManager::getNPCs(){
return npcs;
return mNpcs;
}
MWRender::Objects& RenderingManager::getObjects(){
return objects;
return mObjects;
}
MWRender::Creatures& RenderingManager::getCreatures(){
return creatures;
return mCreatures;
}
MWRender::Player& RenderingManager::getPlayer(){
return (*mPlayer);
}
void RenderingManager::removeCell (MWWorld::Ptr::CellStore *store){
objects.removeCell(store);
mObjects.removeCell(store);
}
void RenderingManager::cellAdded (MWWorld::Ptr::CellStore *store)
{
objects.buildStaticGeometry (*store);
mObjects.buildStaticGeometry (*store);
}
void RenderingManager::addObject (const MWWorld::Ptr& ptr){
@ -91,7 +91,7 @@ void RenderingManager::addObject (const MWWorld::Ptr& ptr){
}
void RenderingManager::removeObject (const MWWorld::Ptr& ptr)
{
if (!objects.deleteObject (ptr))
if (!mObjects.deleteObject (ptr))
{
/// \todo delete non-object MW-references
}
@ -100,7 +100,7 @@ void RenderingManager::removeObject (const MWWorld::Ptr& ptr)
void RenderingManager::moveObject (const MWWorld::Ptr& ptr, const Ogre::Vector3& position)
{
/// \todo move this to the rendering-subsystems
rend.getScene()->getSceneNode (ptr.getRefData().getHandle())->
mRendering.getScene()->getSceneNode (ptr.getRefData().getHandle())->
setPosition (position);
}
@ -166,9 +166,9 @@ void RenderingManager::configureFog(ESMS::CellStore<MWWorld::RefData> &mCell)
float high = 4500 + 9000 * (1-mCell.cell->ambi.fogDensity);
float low = 200;
rend.getScene()->setFog (FOG_LINEAR, color, 0, low, high);
rend.getCamera()->setFarClipDistance (high + 10);
rend.getViewport()->setBackgroundColour (color);
mRendering.getScene()->setFog (FOG_LINEAR, color, 0, low, high);
mRendering.getCamera()->setFarClipDistance (high + 10);
mRendering.getViewport()->setBackgroundColour (color);
}
void RenderingManager::setAmbientMode()
@ -177,17 +177,17 @@ void RenderingManager::setAmbientMode()
{
case 0:
rend.getScene()->setAmbientLight(mAmbientColor);
mRendering.getScene()->setAmbientLight(mAmbientColor);
break;
case 1:
rend.getScene()->setAmbientLight(0.7f*mAmbientColor + 0.3f*ColourValue(1,1,1));
mRendering.getScene()->setAmbientLight(0.7f*mAmbientColor + 0.3f*ColourValue(1,1,1));
break;
case 2:
rend.getScene()->setAmbientLight(ColourValue(1,1,1));
mRendering.getScene()->setAmbientLight(ColourValue(1,1,1));
break;
}
}
@ -199,7 +199,7 @@ void RenderingManager::configureAmbient(ESMS::CellStore<MWWorld::RefData> &mCell
// Create a "sun" that shines light downwards. It doesn't look
// completely right, but leave it for now.
Ogre::Light *light = rend.getScene()->createLight();
Ogre::Light *light = mRendering.getScene()->createLight();
Ogre::ColourValue colour;
colour.setAsABGR (mCell.cell->ambi.sunlight);
light->setDiffuseColour (colour);

@ -109,11 +109,10 @@ class RenderingManager: private RenderingInterface {
void setAmbientMode();
SkyManager* mSkyManager;
OEngine::Render::OgreRenderer &rend;
Ogre::Camera* camera;
MWRender::Npcs npcs;
MWRender::Creatures creatures;
MWRender::Objects objects;
OEngine::Render::OgreRenderer &mRendering;
MWRender::Npcs mNpcs;
MWRender::Creatures mCreatures;
MWRender::Objects mObjects;
// 0 normal, 1 more bright, 2 max
int mAmbientMode;
@ -123,10 +122,10 @@ class RenderingManager: private RenderingInterface {
/// Root node for all objects added to the scene. This is rotated so
/// that the OGRE coordinate system matches that used internally in
/// Morrowind.
Ogre::SceneNode *mwRoot;
Ogre::SceneNode *mMwRoot;
Ogre::RaySceneQuery *mRaySceneQuery;
OEngine::Physic::PhysicEngine* eng;
OEngine::Physic::PhysicEngine* mPhysicsEngine;
MWRender::Player *mPlayer;
MWRender::Debugging mDebugging;

Loading…
Cancel
Save