HyperspaceExplorer 0.7.1
Rotope.h
00001 /*
00002 Hyperspace Explorer - visualizing higher-dimensional geometry
00003 Copyright (C) 2009-2010  Lene Preuss <lene.preuss@gmail.com>
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2 of the License, or
00008 (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License along
00016 with this program; if not, write to the Free Software Foundation, Inc.,
00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018 
00019 */
00020 
00021 #ifndef ROTOPE_H
00022 #define ROTOPE_H
00023 
00024 #include "Object.h"
00025 #include "VertexData.h"
00026 
00028 
00031 struct BadRotopeOperation: public std::logic_error {
00033   BadRotopeOperation(const std::string &caller, const std::string &op);
00034 };
00035 
00037 
00040 class Rotope : public Object {
00041 
00042   const static unsigned DIM = 6;      
00043 
00044   public:
00045 
00047     Rotope();
00049     Rotope(const std::string &);
00050 
00051     virtual ~Rotope();
00052 
00053     virtual std::string getFunctionName() const;
00054 
00056     virtual void Initialize();
00057 
00059     virtual void Transform (const VecMath::Rotation<4> &,
00060                                 const VecMath::Vector<4> &);
00062     virtual void Draw (UI::View *view);
00063 
00065     virtual void SetParameters(const ParameterMap &parms);
00066 
00067   private:
00068 
00070     void drawRealm(const Realm &realm, UI::View *view) const;
00072     void drawPoint(const Realm &realm, UI::View *view) const;
00074     void drawLine(const Realm &realm, UI::View *view) const;
00076     void drawSurface(const Realm &realm, UI::View *view) const;
00078     void drawVolume(const Realm &realm, UI::View *view) const;
00079 
00080     class Impl;
00081     Impl *pImpl_;
00082 
00083 };
00084 
00085 namespace {
00086   Displayable *createRotope() { return new Rotope; }
00087   const bool registeredRotope = TheFunctionFactory::Instance().registerFunction(createRotope, "Object");
00088 }
00089 
00090 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:15 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo