CrystalSpace

Public API Reference

cstool/noise/module/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 CS {
00029 namespace Math {
00030 namespace Noise {
00031 namespace Module {
00032 
00035 
00038 
00041 
00044     const double DEFAULT_TRANSLATE_POINT_X = 0.0;
00045 
00048     const double DEFAULT_TRANSLATE_POINT_Y = 0.0;
00049 
00052     const double DEFAULT_TRANSLATE_POINT_Z = 0.0;
00053 
00068     class CS_CRYSTALSPACE_EXPORT TranslatePoint: public Module
00069     {
00070 
00071       public:
00072 
00083         TranslatePoint ();
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 GetXTranslation () const
00097         {
00098           return m_xTranslation;
00099         }
00100 
00105         double GetYTranslation () const
00106         {
00107           return m_yTranslation;
00108         }
00109 
00114         double GetZTranslation () const
00115         {
00116           return m_zTranslation;
00117         }
00118 
00126         void SetTranslation (double translation)
00127         {
00128           m_xTranslation = translation;
00129           m_yTranslation = translation;
00130           m_zTranslation = translation;
00131         }
00132 
00146         void SetTranslation (double xTranslation, double yTranslation,
00147           double zTranslation)
00148         {
00149           m_xTranslation = xTranslation;
00150           m_yTranslation = yTranslation;
00151           m_zTranslation = zTranslation;
00152         }
00153 
00163         void SetXTranslation (double xTranslation)
00164         {
00165           m_xTranslation = xTranslation;
00166         }
00167 
00177         void SetYTranslation (double yTranslation)
00178         {
00179           m_yTranslation = yTranslation;
00180         }
00181 
00191         void SetZTranslation (double zTranslation)
00192         {
00193           m_zTranslation = zTranslation;
00194         }
00195 
00196       protected:
00197 
00200         double m_xTranslation;
00201 
00204         double m_yTranslation;
00205 
00208         double m_zTranslation;
00209 
00210     };
00211 
00213 
00215 
00217 
00218 } // namespace Module
00219 } // namespace Noise
00220 } // namespace Math
00221 } // namespace CS
00222 
00223 #endif

Generated for Crystal Space 2.0 by doxygen 1.7.6.1