libnoise logo

A portable, open-source, coherent noise-generating library for C++


translatepoint.h

00001 // translatepoint.h
00002 //
00003 // Copyright (C) 2004 Jason Bevins
00004 //
00005 // This library is free software; you can redistribute it and/or modify it
00006 // under the terms of the GNU Lesser General Public License as published by
00007 // the Free Software Foundation; either version 2.1 of the License, or (at
00008 // your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful, but WITHOUT
00011 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00013 // License (COPYING.txt) for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public License
00016 // along with this library; if not, write to the Free Software Foundation,
00017 // Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //
00019 // The developer's email is jlbezigvins@gmzigail.com (for great email, take
00020 // off every 'zig'.)
00021 //
00022 
00023 #ifndef NOISE_MODULE_TRANSLATEPOINT_H
00024 #define NOISE_MODULE_TRANSLATEPOINT_H
00025 
00026 #include "modulebase.h"
00027 
00028 namespace noise
00029 {
00030 
00031   namespace module
00032   {
00033 
00036 
00039 
00042 
00045     const double DEFAULT_TRANSLATE_POINT_X = 0.0;
00046 
00049     const double DEFAULT_TRANSLATE_POINT_Y = 0.0;
00050 
00053     const double DEFAULT_TRANSLATE_POINT_Z = 0.0;
00054 
00069     class TranslatePoint: public Module
00070     {
00071 
00072       public:
00073 
00084         TranslatePoint ();
00085 
00086         virtual int GetSourceModuleCount () const
00087         {
00088           return 1;
00089         }
00090 
00091         virtual double GetValue (double x, double y, double z) const;
00092 
00097         double GetXTranslation () const
00098         {
00099           return m_xTranslation;
00100         }
00101 
00106         double GetYTranslation () const
00107         {
00108           return m_yTranslation;
00109         }
00110 
00115         double GetZTranslation () const
00116         {
00117           return m_zTranslation;
00118         }
00119 
00127         void SetTranslation (double translation)
00128         {
00129           m_xTranslation = translation;
00130           m_yTranslation = translation;
00131           m_zTranslation = translation;
00132         }
00133 
00147         void SetTranslation (double xTranslation, double yTranslation,
00148           double zTranslation)
00149         {
00150           m_xTranslation = xTranslation;
00151           m_yTranslation = yTranslation;
00152           m_zTranslation = zTranslation;
00153         }
00154 
00164         void SetXTranslation (double xTranslation)
00165         {
00166           m_xTranslation = xTranslation;
00167         }
00168 
00178         void SetYTranslation (double yTranslation)
00179         {
00180           m_yTranslation = yTranslation;
00181         }
00182 
00192         void SetZTranslation (double zTranslation)
00193         {
00194           m_zTranslation = zTranslation;
00195         }
00196 
00197       protected:
00198 
00201         double m_xTranslation;
00202 
00205         double m_yTranslation;
00206 
00209         double m_zTranslation;
00210 
00211     };
00212 
00214 
00216 
00218 
00219   }
00220 
00221 }
00222 
00223 #endif