From d05fa6168acbfc66686fd54418dce8f55f5a79b7 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 16 Jan 2010 09:55:19 +0000 Subject: [PATCH] Add stub LTree implementation --- include/IScenery.hpp | 1 + src/LTree.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/LTree.cpp diff --git a/include/IScenery.hpp b/include/IScenery.hpp index 13dee6c..d9c2c1d 100644 --- a/include/IScenery.hpp +++ b/include/IScenery.hpp @@ -31,5 +31,6 @@ struct IScenery { typedef shared_ptr ISceneryPtr; ISceneryPtr makeTree(); +ISceneryPtr makeLTree(); #endif diff --git a/src/LTree.cpp b/src/LTree.cpp new file mode 100644 index 0000000..d54ad02 --- /dev/null +++ b/src/LTree.cpp @@ -0,0 +1,51 @@ +// +// Copyright (C) 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 . +// + +#include "IScenery.hpp" + +// Trees generated by L-systems +class LTree : public IScenery { +public: + LTree(); + + // IScenery interface + void render() const; + void setPosition(float x, float y, float z); +private: +}; + +LTree::LTree() +{ + +} + +void LTree::render() const +{ + +} + +void LTree::setPosition(float x, float y, float z) +{ + +} + +ISceneryPtr makeLTree() +{ + return ISceneryPtr(new LTree); +} + + -- 2.39.2