renamed ObjectHolder into ObjectTag

sceneinput
Marc Zinnschlag 9 years ago
parent d46eeb04cd
commit 748b13b45b

@ -124,7 +124,7 @@ CSVRender::Object::Object (CSMWorld::Data& data, osg::Group* parentNode,
mOutline = new osgFX::Scribe;
mOutline->addChild(mBaseNode);
mBaseNode->setUserData(new ObjectHolder(this));
mBaseNode->setUserData(new ObjectTag(this));
parentNode->addChild(mBaseNode);

@ -39,10 +39,10 @@ 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 ObjectHolder : public osg::Referenced
class ObjectTag : public osg::Referenced
{
public:
ObjectHolder(Object* obj)
ObjectTag (Object* obj)
: mObject(obj)
{
}

@ -463,7 +463,7 @@ void CSVRender::WorldspaceWidget::mousePressEvent (QMouseEvent *event)
for (std::vector<osg::Node*>::iterator it = intersection.nodePath.begin(); it != intersection.nodePath.end(); ++it)
{
osg::Node* node = *it;
if (CSVRender::ObjectHolder* holder = dynamic_cast<CSVRender::ObjectHolder*>(node->getUserData()))
if (CSVRender::ObjectTag* holder = dynamic_cast<CSVRender::ObjectTag *>(node->getUserData()))
{
// hit an Object, toggle its selection state
CSVRender::Object* obj = holder->mObject;

Loading…
Cancel
Save