A portable, open-source, coherent noise-generating library for C++
Main Page | Modules | Class Hierarchy | Class List | File List | Class Members # scalepoint.h
    00001 // scalepoint.h
    00002 //
    00003 // Copyright (C) 2003, 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_SCALEPOINT_H
    00024 #define NOISE_MODULE_SCALEPOINT_H
    00025
    00026 #include "modulebase.h"
    00027
    00028 namespace noise
    00029 {
    00030
    00031   namespace module
    00032   {
    00033
    00036
    00039
    00042
    00045     const double DEFAULT_SCALE_POINT_X = 1.0;
    00046
    00049     const double DEFAULT_SCALE_POINT_Y = 1.0;
    00050
    00053     const double DEFAULT_SCALE_POINT_Z = 1.0;
    00054
    00068     class ScalePoint: public Module
    00069     {
    00070
    00071       public:
    00072
    00083         ScalePoint ();
    00084
    00085         virtual int GetSourceModuleCount () const
    00086         {
    00087           return 1;
    00088         }
    00089
    00090         virtual double GetValue (double x, double y, double z) const;
    00091
    00096         double GetXScale () const
    00097         {
    00098           return m_xScale;
    00099         }
    00100
    00105         double GetYScale () const
    00106         {
    00107           return m_yScale;
    00108         }
    00109
    00114         double GetZScale () const
    00115         {
    00116           return m_zScale;
    00117         }
    00118
    00126         void SetScale (double scale)
    00127         {
    00128           m_xScale = scale;
    00129           m_yScale = scale;
    00130           m_zScale = scale;
    00131         }
    00132
    00143         void SetScale (double xScale, double yScale, double zScale)
    00144         {
    00145           m_xScale = xScale;
    00146           m_yScale = yScale;
    00147           m_zScale = zScale;
    00148         }
    00149
    00158         void SetXScale (double xScale)
    00159         {
    00160           m_xScale = xScale;
    00161         }
    00162
    00171         void SetYScale (double yScale)
    00172         {
    00173           m_yScale = yScale;
    00174         }
    00175
    00184         void SetZScale (double zScale)
    00185         {
    00186           m_zScale = zScale;
    00187         }
    00188
    00189       protected:
    00190
    00192         double m_xScale;
    00193
    00195         double m_yScale;
    00196
    00198         double m_zScale;
    00199
    00200     };
    00201
    00203
    00205
    00207
    00208   }
    00209
    00210 }
    00211
    00212 #endif