Remove unused stuff

actorid
Chris Robinson 12 years ago
parent 3555476dfd
commit 80d271aeb1

@ -21,62 +21,9 @@
#include "animation.hpp"
using namespace MWRender;
float Objects::lightLinearValue()
{
return mFallback->getFallbackFloat("LightAttenuation_LinearValue");
}
float Objects::lightLinearRadiusMult()
{
return mFallback->getFallbackFloat("LightAttenuation_LinearRadiusMult");
}
float Objects::lightQuadraticValue()
{
return mFallback->getFallbackFloat("LightAttenuation_QuadraticValue");
}
float Objects::lightQuadraticRadiusMult()
{
return mFallback->getFallbackFloat("LightAttenuation_QuadraticRadiusMult");
}
bool Objects::lightOutQuadInLin()
{
return mFallback->getFallbackBool("LightAttenuation_OutQuadInLin");
}
bool Objects::lightQuadratic()
{
return mFallback->getFallbackBool("LightAttenuation_UseQuadratic");
}
int Objects::uniqueID = 0;
void Objects::clearSceneNode (Ogre::SceneNode *node)
{
for (int i=node->numAttachedObjects()-1; i>=0; --i)
{
Ogre::MovableObject *object = node->getAttachedObject (i);
// for entities, destroy any objects attached to bones
if (object->getTypeFlags () == Ogre::SceneManager::ENTITY_TYPE_MASK)
{
Ogre::Entity* ent = static_cast<Ogre::Entity*>(object);
Ogre::Entity::ChildObjectListIterator children = ent->getAttachedObjectIterator ();
while (children.hasMoreElements())
{
mRenderer.getScene ()->destroyMovableObject (children.getNext ());
}
}
node->detachObject (object);
mRenderer.getScene()->destroyMovableObject (object);
}
Ogre::Node::ChildNodeIterator it = node->getChildIterator ();
while (it.hasMoreElements ())
{
clearSceneNode(static_cast<Ogre::SceneNode*>(it.getNext ()));
}
}
void Objects::setRootNode(Ogre::SceneNode* root)
{
mRootNode = root;

@ -5,7 +5,6 @@
#include <OgreAxisAlignedBox.h>
#include <openengine/ogre/renderer.hpp>
#include "../mwworld/fallback.hpp"
namespace MWWorld
{
@ -17,38 +16,6 @@ namespace MWRender{
class ObjectAnimation;
/// information about light needed for rendering
enum LightType
{
// These are all mutually exclusive
LT_Normal=0,
LT_Flicker=1,
LT_FlickerSlow=2,
LT_Pulse=3,
LT_PulseSlow=4
};
struct LightInfo
{
// Constants
std::string name; // ogre handle
Ogre::ColourValue colour;
float radius;
bool interior; // Does this light belong to an interior or exterior cell
LightType type;
// Runtime variables
float dir; // direction time is running...
float time; // current time
float phase; // current phase
LightInfo() :
dir(1.0f), time(0.0f), phase (0.0f),
interior(true), type(LT_Normal), radius(1.0)
{
}
};
class Objects{
typedef std::map<MWWorld::Ptr,ObjectAnimation*> PtrAnimationMap;
@ -64,24 +31,10 @@ class Objects{
bool mIsStatic;
static int uniqueID;
MWWorld::Fallback* mFallback;
float lightLinearValue();
float lightLinearRadiusMult();
bool lightQuadratic();
float lightQuadraticValue();
float lightQuadraticRadiusMult();
bool lightOutQuadInLin();
void clearSceneNode (Ogre::SceneNode *node);
///< Remove all movable objects from \a node.
public:
Objects(OEngine::Render::OgreRenderer& renderer, MWWorld::Fallback* fallback)
: mRenderer (renderer)
Objects(OEngine::Render::OgreRenderer &renderer)
: mRenderer(renderer)
, mIsStatic(false)
, mFallback(fallback)
, mRootNode(NULL)
{}
~Objects(){}

@ -57,7 +57,7 @@ RenderingManager::RenderingManager(OEngine::Render::OgreRenderer& _rend, const b
MWWorld::Fallback* fallback)
: mRendering(_rend)
, mFallback(fallback)
, mObjects(mRendering, mFallback)
, mObjects(mRendering)
, mActors(mRendering, this)
, mPlayerAnimation(NULL)
, mAmbientMode(0)

Loading…
Cancel
Save