1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

inserted TagBase between ObjectTag and osg::Referenced

This commit is contained in:
Marc Zinnschlag 2015-09-26 12:18:18 +02:00
parent 748b13b45b
commit 71247a0186
5 changed files with 45 additions and 10 deletions

View File

@ -90,7 +90,7 @@ opencs_units (view/render
opencs_units_noqt (view/render
lighting lightingday lightingnight
lightingbright object cell terrainstorage
lightingbright object cell terrainstorage tagbase
)
opencs_hdrs_noqt (view/render

View File

@ -38,6 +38,11 @@ namespace
}
CSVRender::ObjectTag::ObjectTag (Object* object)
: TagBase (Element_Reference), mObject (object)
{}
void CSVRender::Object::clear()
{
}

View File

@ -8,8 +8,9 @@
#include <osg/ref_ptr>
#include <osg/Referenced>
class QModelIndex;
#include "tagbase.hpp"
class QModelIndex;
namespace osg
{
@ -35,21 +36,19 @@ namespace CSMWorld
namespace CSVRender
{
class Object;
// An object to attach as user data to the osg::Node, allows us to get an Object back from a Node when we are doing a ray query
class ObjectTag : public osg::Referenced
class ObjectTag : public TagBase
{
public:
ObjectTag (Object* obj)
: mObject(obj)
{
}
public:
Object* mObject;
ObjectTag (Object* object);
Object* mObject;
};
class Object
{
const CSMWorld::Data& mData;

View File

@ -0,0 +1,9 @@
#include "tagbase.hpp"
CSVRender::TagBase::TagBase (Elements element) : mElement (element) {}
CSVRender::Elements CSVRender::TagBase::getElement() const
{
return mElement;
}

View File

@ -0,0 +1,22 @@
#ifndef OPENCS_VIEW_TAGBASE_H
#define OPENCS_VIEW_TAGBASE_H
#include <osg/Referenced>
#include "elements.hpp"
namespace CSVRender
{
class TagBase : public osg::Referenced
{
Elements mElement;
public:
TagBase (Elements element);
Elements getElement() const;
};
}
#endif