From 1013883e210a0c556e760f7189c3540b6a09e6d4 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 1 Aug 2010 21:12:07 +0100 Subject: [PATCH] IRenderable is no longer needed --- include/IRenderable.hpp | 33 --------------------------------- include/IScenery.hpp | 6 +++--- include/ITrackSegment.hpp | 6 ++++-- 3 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 include/IRenderable.hpp diff --git a/include/IRenderable.hpp b/include/IRenderable.hpp deleted file mode 100644 index 754274a..0000000 --- a/include/IRenderable.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (C) 2009-2010 Nick Gasson -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// - -#ifndef INC_IRENDERABLE_HPP -#define INC_IRENDERABLE_HPP - -#include "Platform.hpp" - -// Anything that can be rendered, but mostly used for objects on -// the map -struct IRenderable { - virtual ~IRenderable() {} - - virtual void render() const = 0; -}; - -typedef shared_ptr IRenderablePtr; - -#endif diff --git a/include/IScenery.hpp b/include/IScenery.hpp index 88331ee..ff6cc62 100644 --- a/include/IScenery.hpp +++ b/include/IScenery.hpp @@ -21,12 +21,12 @@ #include "Platform.hpp" #include "IXMLSerialisable.hpp" #include "IMesh.hpp" -#include "IRenderable.hpp" // Static scenery such as trees -struct IScenery : IXMLSerialisable, IRenderable { +struct IScenery : IXMLSerialisable { virtual ~IScenery() {} - + + virtual void render() const = 0; virtual void set_position(float x, float y, float z) = 0; virtual void set_angle(float angle) = 0; virtual void merge(IMeshBufferPtr buf) = 0; diff --git a/include/ITrackSegment.hpp b/include/ITrackSegment.hpp index 7d70471..f9351d4 100644 --- a/include/ITrackSegment.hpp +++ b/include/ITrackSegment.hpp @@ -22,7 +22,6 @@ #include "Maths.hpp" #include "IXMLSerialisable.hpp" #include "IMesh.hpp" -#include "IRenderable.hpp" #include #include @@ -94,8 +93,11 @@ typedef shared_ptr ITrackSegmentPtr; // A segment of track which fits over a number of tiles // Each track segment has an origin and one or more exits -struct ITrackSegment : IXMLSerialisable, IRenderable { +struct ITrackSegment : IXMLSerialisable { virtual ~ITrackSegment() {} + + // Render the track with the origin in the centre + virtual void render() const = 0; // Merge this track segment's mesh into a scenery mesh buffer virtual void merge(IMeshBufferPtr buf) const = 0; -- 2.39.2