cstool/noise/module/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 CS { 00029 namespace Math { 00030 namespace Noise { 00031 namespace Module { 00032 00035 00038 00041 00044 const double DEFAULT_ROTATE_X = 0.0; 00045 00048 const double DEFAULT_ROTATE_Y = 0.0; 00049 00052 const double DEFAULT_ROTATE_Z = 0.0; 00053 00071 class CS_CRYSTALSPACE_EXPORT RotatePoint: public Module 00072 { 00073 00074 public: 00075 00086 RotatePoint (); 00087 00088 virtual int GetSourceModuleCount () const 00089 { 00090 return 1; 00091 } 00092 00093 virtual double GetValue (double x, double y, double z) const; 00094 00099 double GetXAngle () const 00100 { 00101 return m_xAngle; 00102 } 00103 00108 double GetYAngle () const 00109 { 00110 return m_yAngle; 00111 } 00112 00117 double GetZAngle () const 00118 { 00119 return m_zAngle; 00120 } 00121 00132 void SetAngles (double xAngle, double yAngle, double zAngle); 00133 00142 void SetXAngle (double xAngle) 00143 { 00144 SetAngles (xAngle, m_yAngle, m_zAngle); 00145 } 00146 00155 void SetYAngle (double yAngle) 00156 { 00157 SetAngles (m_xAngle, yAngle, m_zAngle); 00158 } 00159 00168 void SetZAngle (double zAngle) 00169 { 00170 SetAngles (m_xAngle, m_yAngle, zAngle); 00171 } 00172 00173 protected: 00174 00177 double m_x1Matrix; 00178 00181 double m_x2Matrix; 00182 00185 double m_x3Matrix; 00186 00188 double m_xAngle; 00189 00192 double m_y1Matrix; 00193 00196 double m_y2Matrix; 00197 00200 double m_y3Matrix; 00201 00203 double m_yAngle; 00204 00207 double m_z1Matrix; 00208 00211 double m_z2Matrix; 00212 00215 double m_z3Matrix; 00216 00218 double m_zAngle; 00219 00220 }; 00221 00223 00225 00227 00228 } // namespace Module 00229 } // namespace Noise 00230 } // namespace Math 00231 } // namespace CS 00232 00233 #endif
Generated for Crystal Space 2.0 by doxygen 1.6.1