mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-26 14:36:40 -04:00
Remove unused stuff
This commit is contained in:
parent
3555476dfd
commit
80d271aeb1
@ -21,62 +21,9 @@
|
|||||||
#include "animation.hpp"
|
#include "animation.hpp"
|
||||||
|
|
||||||
using namespace MWRender;
|
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;
|
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)
|
void Objects::setRootNode(Ogre::SceneNode* root)
|
||||||
{
|
{
|
||||||
mRootNode = root;
|
mRootNode = root;
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#include <OgreAxisAlignedBox.h>
|
#include <OgreAxisAlignedBox.h>
|
||||||
|
|
||||||
#include <openengine/ogre/renderer.hpp>
|
#include <openengine/ogre/renderer.hpp>
|
||||||
#include "../mwworld/fallback.hpp"
|
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
{
|
{
|
||||||
@ -17,38 +16,6 @@ namespace MWRender{
|
|||||||
|
|
||||||
class ObjectAnimation;
|
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{
|
class Objects{
|
||||||
typedef std::map<MWWorld::Ptr,ObjectAnimation*> PtrAnimationMap;
|
typedef std::map<MWWorld::Ptr,ObjectAnimation*> PtrAnimationMap;
|
||||||
|
|
||||||
@ -64,24 +31,10 @@ class Objects{
|
|||||||
bool mIsStatic;
|
bool mIsStatic;
|
||||||
static int uniqueID;
|
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:
|
public:
|
||||||
Objects(OEngine::Render::OgreRenderer& renderer, MWWorld::Fallback* fallback)
|
Objects(OEngine::Render::OgreRenderer &renderer)
|
||||||
: mRenderer (renderer)
|
: mRenderer(renderer)
|
||||||
, mIsStatic(false)
|
, mIsStatic(false)
|
||||||
, mFallback(fallback)
|
|
||||||
, mRootNode(NULL)
|
, mRootNode(NULL)
|
||||||
{}
|
{}
|
||||||
~Objects(){}
|
~Objects(){}
|
||||||
|
@ -57,7 +57,7 @@ RenderingManager::RenderingManager(OEngine::Render::OgreRenderer& _rend, const b
|
|||||||
MWWorld::Fallback* fallback)
|
MWWorld::Fallback* fallback)
|
||||||
: mRendering(_rend)
|
: mRendering(_rend)
|
||||||
, mFallback(fallback)
|
, mFallback(fallback)
|
||||||
, mObjects(mRendering, mFallback)
|
, mObjects(mRendering)
|
||||||
, mActors(mRendering, this)
|
, mActors(mRendering, this)
|
||||||
, mPlayerAnimation(NULL)
|
, mPlayerAnimation(NULL)
|
||||||
, mAmbientMode(0)
|
, mAmbientMode(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user