From e957408cb8cd200696a081b4f5c749c5294110ec Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 1 Jul 2009 04:44:51 +0000 Subject: Sphere and cube C++ wrappers. --- libdimensionxx/dimensionxx/cube.hpp | 30 +++++++++++++++++++++++ libdimensionxx/dimensionxx/object.hpp | 2 +- libdimensionxx/dimensionxx/objects.hpp | 45 ++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 libdimensionxx/dimensionxx/cube.hpp create mode 100644 libdimensionxx/dimensionxx/objects.hpp (limited to 'libdimensionxx/dimensionxx') diff --git a/libdimensionxx/dimensionxx/cube.hpp b/libdimensionxx/dimensionxx/cube.hpp new file mode 100644 index 0000000..9452c88 --- /dev/null +++ b/libdimensionxx/dimensionxx/cube.hpp @@ -0,0 +1,30 @@ +/************************************************************************* + * Copyright (C) 2008 Tavian Barnes * + * * + * This file is part of The Dimension Library. * + * * + * The Dimension Library is free software; you can redistribute it and/ * + * or modify it under the terms of the GNU Lesser General Public License * + * as published by the Free Software Foundation; either version 3 of the * + * License, or (at your option) any later version. * + * * + * The Dimension Library 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 * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this program. If not, see * + * . * + *************************************************************************/ + +// Cube wrapper + +#ifndef DIMENSIONXX_CUBE_HPP +#define DIMENSIONXX_CUBE_HPP + +namespace Dimension +{ +} + +#endif /* DIMENSIONXX_CUBE_HPP */ diff --git a/libdimensionxx/dimensionxx/object.hpp b/libdimensionxx/dimensionxx/object.hpp index 40dcb25..6eaca83 100644 --- a/libdimensionxx/dimensionxx/object.hpp +++ b/libdimensionxx/dimensionxx/object.hpp @@ -43,7 +43,7 @@ namespace Dimension // No-op Object(); // Wrap an existing object. - explicit Object(dmnsn_object* object) : m_object(object) { } + explicit Object(dmnsn_object* object); dmnsn_object* m_object; diff --git a/libdimensionxx/dimensionxx/objects.hpp b/libdimensionxx/dimensionxx/objects.hpp new file mode 100644 index 0000000..5d5fe46 --- /dev/null +++ b/libdimensionxx/dimensionxx/objects.hpp @@ -0,0 +1,45 @@ +/************************************************************************* + * Copyright (C) 2008 Tavian Barnes * + * * + * This file is part of The Dimension Library. * + * * + * The Dimension Library is free software; you can redistribute it and/ * + * or modify it under the terms of the GNU Lesser General Public License * + * as published by the Free Software Foundation; either version 3 of the * + * License, or (at your option) any later version. * + * * + * The Dimension Library 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 * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this program. If not, see * + * . * + *************************************************************************/ + +// Object wrappers. + +#ifndef DIMENSIONXX_OBJECTS_HPP +#define DIMENSIONXX_OBJECTS_HPP + +namespace Dimension +{ + // Sphere object + class Sphere : public Object + { + public: + Sphere(); + virtual ~Sphere(); + }; + + // A cube + class Cube : public Object + { + public: + Cube(); + virtual ~Cube(); + }; +} + +#endif /* DIMENSIONXX_OBJECTS_HPP */ -- cgit v1.2.3