A portable, open-source, coherent noise-generating library for C++
Main Page | Modules | Class Hierarchy | Class List | File List | Class Members # rotatepoint.h
    00001 // rotatepoint.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_ROTATEPOINT_H
    00024 #define NOISE_MODULE_ROTATEPOINT_H
    00025
    00026 #include "modulebase.h"
    00027
    00028 namespace noise
    00029 {
    00030
    00031   namespace module
    00032   {
    00033
    00036
    00039
    00042
    00045     const double DEFAULT_ROTATE_X = 0.0;
    00046
    00049     const double DEFAULT_ROTATE_Y = 0.0;
    00050
    00053     const double DEFAULT_ROTATE_Z = 0.0;
    00054
    00072     class RotatePoint: public Module
    00073     {
    00074
    00075       public:
    00076
    00087         RotatePoint ();
    00088
    00089         virtual int GetSourceModuleCount () const
    00090         {
    00091           return 1;
    00092         }
    00093
    00094         virtual double GetValue (double x, double y, double z) const;
    00095
    00100         double GetXAngle () const
    00101         {
    00102           return m_xAngle;
    00103         }
    00104
    00109         double GetYAngle () const
    00110         {
    00111           return m_yAngle;
    00112         }
    00113
    00118         double GetZAngle () const
    00119         {
    00120           return m_zAngle;
    00121         }
    00122
    00133         void SetAngles (double xAngle, double yAngle, double zAngle);
    00134
    00143         void SetXAngle (double xAngle)
    00144         {
    00145           SetAngles (xAngle, m_yAngle, m_zAngle);
    00146         }
    00147
    00156         void SetYAngle (double yAngle)
    00157         {
    00158           SetAngles (m_xAngle, yAngle, m_zAngle);
    00159         }
    00160
    00169         void SetZAngle (double zAngle)
    00170         {
    00171           SetAngles (m_xAngle, m_yAngle, zAngle);
    00172         }
    00173
    00174       protected:
    00175
    00178         double m_x1Matrix;
    00179
    00182         double m_x2Matrix;
    00183
    00186         double m_x3Matrix;
    00187
    00189         double m_xAngle;
    00190
    00193         double m_y1Matrix;
    00194
    00197         double m_y2Matrix;
    00198
    00201         double m_y3Matrix;
    00202
    00204         double m_yAngle;
    00205
    00208         double m_z1Matrix;
    00209
    00212         double m_z2Matrix;
    00213
    00216         double m_z3Matrix;
    00217
    00219         double m_zAngle;
    00220
    00221     };
    00222
    00224
    00226
    00228
    00229   }
    00230
    00231 }
    00232
    00233 #endif