Remove old way of doing displacing, turn into a flag in STKMesh. Does not compile, vlj will do the rest

This commit is contained in:
Marianne Gagnon 2014-07-13 18:50:12 -04:00 committed by vlj
parent b456205b56
commit f00c55850a
3 changed files with 10 additions and 16 deletions

View File

@ -353,8 +353,6 @@ private:
std::vector<BloomData> m_forcedbloom;
std::vector<scene::ISceneNode *> m_displacing;
std::vector<scene::ISceneNode *> m_background;
STKRenderingPass m_phase;
@ -668,12 +666,6 @@ public:
// ------------------------------------------------------------------------
const std::vector<BloomData> &getForcedBloom() const { return m_forcedbloom; }
// ------------------------------------------------------------------------
void clearDisplacingNodes() { m_displacing.clear(); }
// ------------------------------------------------------------------------
const std::vector<scene::ISceneNode *> &getDisplacingNodes() const { return m_displacing; }
// ------------------------------------------------------------------------
void addDisplacingNode(scene::ISceneNode * const n) { m_displacing.push_back(n); }
// ------------------------------------------------------------------------
void clearBackgroundNodes() { m_background.clear(); }
// ------------------------------------------------------------------------
void addBackgroundNode(scene::ISceneNode * const n) { m_background.push_back(n); }

View File

@ -215,14 +215,6 @@ void TrackObject::init(const XMLNode &xml_node, scene::ISceneNode* parent,
irr_driver->addForcedBloomNode(glownode, power);
}
bool displacing = false;
if (xml_node.get("displacing", &displacing) && displacing && glownode)
{
irr_driver->addDisplacingNode(glownode);
glownode->setVisible(false);
glownode->updateAbsolutePosition();
}
}

View File

@ -27,6 +27,7 @@
#include "graphics/mesh_tools.hpp"
#include "graphics/particle_emitter.hpp"
#include "graphics/particle_kind_manager.hpp"
#include "graphics/stkmeshscenenode.hpp"
#include "graphics/stkinstancedscenenode.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
@ -373,7 +374,16 @@ void TrackObjectPresentationMesh::init(const XMLNode* xml_node, scene::ISceneNod
}
else
{
bool displacing = false;
if (xml_node)
xml_node->get("displacing", &displacing);
m_node = irr_driver->addMesh(m_mesh, parent);
STKMeshSceneNode* stkmesh = dynamic_cast<STKMeshSceneNode*>(m_node);
if (displacing && stkmesh != NULL)
stkmesh->setIsDisplacement(displacing);
m_frame_start = 0;
m_frame_end = 0;