Skip to content

Commit

Permalink
#6009: Move getNodeType() to base
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Oct 29, 2022
1 parent 1ed747d commit ab8adcd
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
5 changes: 5 additions & 0 deletions radiantcore/model/ModelNodeBase.cpp
Expand Up @@ -7,6 +7,11 @@ ModelNodeBase::ModelNodeBase() :
_attachedToShaders(false)
{}

scene::INode::Type ModelNodeBase::getNodeType() const
{
return Type::Model;
}

void ModelNodeBase::renderHighlights(IRenderableCollector& collector, const VolumeTest& volume)
{
auto identity = Matrix4::getIdentity();
Expand Down
2 changes: 2 additions & 0 deletions radiantcore/model/ModelNodeBase.h
Expand Up @@ -23,6 +23,8 @@ class ModelNodeBase :
ModelNodeBase();

public:
scene::INode::Type getNodeType() const override;

void renderHighlights(IRenderableCollector& collector, const VolumeTest& volume) override;
std::size_t getHighlightFlags() override;

Expand Down
5 changes: 0 additions & 5 deletions radiantcore/model/StaticModelNode.cpp
Expand Up @@ -85,11 +85,6 @@ std::string StaticModelNode::name() const {
return _model->getFilename();
}

scene::INode::Type StaticModelNode::getNodeType() const
{
return Type::Model;
}

const StaticModelPtr& StaticModelNode::getModel() const {
return _model;
}
Expand Down
1 change: 0 additions & 1 deletion radiantcore/model/StaticModelNode.h
Expand Up @@ -66,7 +66,6 @@ class StaticModelNode final :
void testSelect(Selector& selector, SelectionTest& test) override;

std::string name() const override;
Type getNodeType() const override;

const StaticModelPtr& getModel() const;
void setModel(const StaticModelPtr& model);
Expand Down
5 changes: 0 additions & 5 deletions radiantcore/model/md5/MD5ModelNode.cpp
Expand Up @@ -67,11 +67,6 @@ std::string MD5ModelNode::name() const
return _model->getFilename();
}

scene::INode::Type MD5ModelNode::getNodeType() const
{
return Type::Model;
}

void MD5ModelNode::createRenderableSurfaces()
{
_model->foreachSurface([&](const MD5Surface& surface)
Expand Down
1 change: 0 additions & 1 deletion radiantcore/model/md5/MD5ModelNode.h
Expand Up @@ -55,7 +55,6 @@ class MD5ModelNode :
virtual const AABB& localAABB() const override;

virtual std::string name() const override;
Type getNodeType() const override;

// SelectionTestable implementation
void testSelect(Selector& selector, SelectionTest& test) override;
Expand Down

0 comments on commit ab8adcd

Please sign in to comment.