1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreMath.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
4 | <link type="text/css" rel="stylesheet" href="style.css"> |
---|
5 | </head> |
---|
6 | |
---|
7 | <body> |
---|
8 | <!-- Generated by Doxygen 1.3.6 --> |
---|
9 | <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
---|
10 | <h1>OgreMath.h</h1><a href="OgreMath_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span> |
---|
11 | 00002 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
12 | 00003 <span class="comment">This source file is part of OGRE</span> |
---|
13 | 00004 <span class="comment"> (Object-oriented Graphics Rendering Engine)</span> |
---|
14 | 00005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span> |
---|
15 | 00006 <span class="comment"></span> |
---|
16 | 00007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span> |
---|
17 | 00008 <span class="comment">Also see acknowledgements in Readme.html</span> |
---|
18 | 00009 <span class="comment"></span> |
---|
19 | 00010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span> |
---|
20 | 00011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span> |
---|
21 | 00012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span> |
---|
22 | 00013 <span class="comment">version.</span> |
---|
23 | 00014 <span class="comment"></span> |
---|
24 | 00015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span> |
---|
25 | 00016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span> |
---|
26 | 00017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span> |
---|
27 | 00018 <span class="comment"></span> |
---|
28 | 00019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span> |
---|
29 | 00020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span> |
---|
30 | 00021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span> |
---|
31 | 00022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span> |
---|
32 | 00023 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
33 | 00024 <span class="comment">*/</span> |
---|
34 | 00025 <span class="preprocessor">#ifndef __Math_H__</span> |
---|
35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define __Math_H__</span> |
---|
36 | 00027 <span class="preprocessor"></span> |
---|
37 | 00028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> |
---|
38 | 00029 |
---|
39 | 00030 <span class="keyword">namespace </span>Ogre |
---|
40 | 00031 { |
---|
41 | <a name="l00037"></a><a class="code" href="classOgre_1_1Radian.html">00037</a> <span class="keyword">class </span><a class="code" href="classOgre_1_1Radian.html">Radian</a> |
---|
42 | 00038 { |
---|
43 | <a name="l00039"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">00039</a> <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; |
---|
44 | 00040 |
---|
45 | 00041 <span class="keyword">public</span>: |
---|
46 | <a name="l00042"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">00042</a> <span class="keyword">explicit</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a> ( <a class="code" href="namespaceOgre.html#a465">Real</a> r=0 ) : <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>(r) {} |
---|
47 | 00043 <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a> ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ); |
---|
48 | <a name="l00044"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana2">00044</a> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana2">operator = </a>( <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a>& f ) { <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> = f; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
49 | <a name="l00045"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana3">00045</a> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana2">operator = </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r ) { <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> = r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
50 | 00046 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana2">operator = </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ); |
---|
51 | 00047 |
---|
52 | 00048 <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana5">valueDegrees</a>() <span class="keyword">const</span>; <span class="comment">// see bottom of this file</span> |
---|
53 | <a name="l00049"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">00049</a> <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; } |
---|
54 | 00050 <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana7">valueAngleUnits</a>() <span class="keyword">const</span>; |
---|
55 | 00051 |
---|
56 | <a name="l00052"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana8">00052</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana8">operator + </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a> ( <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> + r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> ); } |
---|
57 | 00053 <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana8">operator + </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ) <span class="keyword">const</span>; |
---|
58 | <a name="l00054"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana10">00054</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana10">operator += </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r ) { <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> += r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
59 | 00055 <a class="code" href="classOgre_1_1Radian.html">Radian</a>& <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana10">operator += </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ); |
---|
60 | <a name="l00056"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana12">00056</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana12">operator - </a>() { <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a>(-<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>); } |
---|
61 | <a name="l00057"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana13">00057</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana12">operator - </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a> ( <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> - r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> ); } |
---|
62 | 00058 <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana12">operator - </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ) <span class="keyword">const</span>; |
---|
63 | <a name="l00059"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana15">00059</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana15">operator -= </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r ) { <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> -= r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
64 | 00060 <a class="code" href="classOgre_1_1Radian.html">Radian</a>& <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana15">operator -= </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ); |
---|
65 | <a name="l00061"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana17">00061</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana17">operator * </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> f )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a> ( <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> * f ); } |
---|
66 | <a name="l00062"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana18">00062</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana17">operator * </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& f )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a> ( <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> * f.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> ); } |
---|
67 | <a name="l00063"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana19">00063</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana19">operator *= </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> f ) { <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> *= f; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
68 | <a name="l00064"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana20">00064</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana20">operator / </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> f )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a> ( <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> / f ); } |
---|
69 | <a name="l00065"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana21">00065</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana21">operator /= </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> f ) { <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> /= f; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
70 | 00066 |
---|
71 | <a name="l00067"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana22">00067</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana22">operator < </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> < r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; } |
---|
72 | <a name="l00068"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana23">00068</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana23">operator <= </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> <= r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; } |
---|
73 | <a name="l00069"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana24">00069</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana24">operator == </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> == r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; } |
---|
74 | <a name="l00070"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana25">00070</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana25">operator != </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> != r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; } |
---|
75 | <a name="l00071"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana26">00071</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana26">operator >= </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> >= r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; } |
---|
76 | <a name="l00072"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana27">00072</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana27">operator > </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> > r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a>; } |
---|
77 | 00073 }; |
---|
78 | 00074 |
---|
79 | <a name="l00080"></a><a class="code" href="classOgre_1_1Degree.html">00080</a> <span class="keyword">class </span><a class="code" href="classOgre_1_1Degree.html">Degree</a> |
---|
80 | 00081 { |
---|
81 | <a name="l00082"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">00082</a> <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; <span class="comment">// if you get an error here - make sure to define/typedef 'Real' first</span> |
---|
82 | 00083 |
---|
83 | 00084 <span class="keyword">public</span>: |
---|
84 | <a name="l00085"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">00085</a> <span class="keyword">explicit</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a> ( <a class="code" href="namespaceOgre.html#a465">Real</a> d=0 ) : <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>(d) {} |
---|
85 | <a name="l00086"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea1">00086</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a> ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r ) : <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>(r.valueDegrees()) {} |
---|
86 | <a name="l00087"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea2">00087</a> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea2">operator = </a>( <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a>& f ) { <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> = f; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
87 | <a name="l00088"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea3">00088</a> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea2">operator = </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ) { <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> = d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
88 | <a name="l00089"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea4">00089</a> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea2">operator = </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r ) { <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> = r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana5">valueDegrees</a>(); <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
89 | 00090 |
---|
90 | <a name="l00091"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea5">00091</a> <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea5">valueDegrees</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; } |
---|
91 | 00092 <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea6">valueRadians</a>() <span class="keyword">const</span>; <span class="comment">// see bottom of this file</span> |
---|
92 | 00093 <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea7">valueAngleUnits</a>() <span class="keyword">const</span>; |
---|
93 | 00094 |
---|
94 | <a name="l00095"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea8">00095</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea8">operator + </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a> ( <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> + d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> ); } |
---|
95 | <a name="l00096"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea9">00096</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea8">operator + </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a> ( <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> + r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana5">valueDegrees</a>() ); } |
---|
96 | <a name="l00097"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea10">00097</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea10">operator += </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ) { <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> += d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
97 | <a name="l00098"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea11">00098</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea10">operator += </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r ) { <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> += r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana5">valueDegrees</a>(); <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
98 | <a name="l00099"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea12">00099</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea12">operator - </a>() { <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a>(-<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>); } |
---|
99 | <a name="l00100"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea13">00100</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea12">operator - </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a> ( <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> - d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> ); } |
---|
100 | <a name="l00101"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea14">00101</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea12">operator - </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a> ( <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> - r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana5">valueDegrees</a>() ); } |
---|
101 | <a name="l00102"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea15">00102</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea15">operator -= </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ) { <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> -= d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
102 | <a name="l00103"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea16">00103</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea15">operator -= </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& r ) { <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> -= r.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana5">valueDegrees</a>(); <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
103 | <a name="l00104"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea17">00104</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea17">operator * </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> f )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a> ( <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> * f ); } |
---|
104 | <a name="l00105"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea18">00105</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea17">operator * </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& f )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a> ( <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> * f.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> ); } |
---|
105 | <a name="l00106"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea19">00106</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea19">operator *= </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> f ) { <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> *= f; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
106 | <a name="l00107"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea20">00107</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea20">operator / </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> f )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea0">Degree</a> ( <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> / f ); } |
---|
107 | <a name="l00108"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea21">00108</a> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea21">operator /= </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> f ) { <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> /= f; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
108 | 00109 |
---|
109 | <a name="l00110"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea22">00110</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea22">operator < </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> < d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; } |
---|
110 | <a name="l00111"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea23">00111</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea23">operator <= </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> <= d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; } |
---|
111 | <a name="l00112"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea24">00112</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea24">operator == </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> == d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; } |
---|
112 | <a name="l00113"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea25">00113</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea25">operator != </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> != d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; } |
---|
113 | <a name="l00114"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea26">00114</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea26">operator >= </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> >= d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; } |
---|
114 | <a name="l00115"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea27">00115</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea27">operator > </a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> > d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a>; } |
---|
115 | 00116 }; |
---|
116 | 00117 |
---|
117 | <a name="l00124"></a><a class="code" href="classOgre_1_1Angle.html">00124</a> <span class="keyword">class </span><a class="code" href="classOgre_1_1Angle.html">Angle</a> |
---|
118 | 00125 { |
---|
119 | <a name="l00126"></a><a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Angler0">00126</a> <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Angler0">mAngle</a>; |
---|
120 | 00127 <span class="keyword">public</span>: |
---|
121 | <a name="l00128"></a><a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Anglea0">00128</a> <span class="keyword">explicit</span> <a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Anglea0">Angle</a> ( <a class="code" href="namespaceOgre.html#a465">Real</a> angle ) : <a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Angler0">mAngle</a>(angle) {} |
---|
122 | 00129 <a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Anglea1">operator Radian</a>(); |
---|
123 | 00130 <a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Anglea2">operator Degree</a>(); |
---|
124 | 00131 }; |
---|
125 | 00132 |
---|
126 | 00133 <span class="comment">// these functions could not be defined within the class definition of class</span> |
---|
127 | 00134 <span class="comment">// Radian because they required class Degree to be defined</span> |
---|
128 | <a name="l00135"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana1">00135</a> <span class="keyword">inline</span> Radian::Radian ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ) : mRad(d.valueRadians()) { |
---|
129 | 00136 } |
---|
130 | <a name="l00137"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana4">00137</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& Radian::operator = ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ) { |
---|
131 | 00138 <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> = d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea6">valueRadians</a>(); <span class="keywordflow">return</span> *<span class="keyword">this</span>; |
---|
132 | 00139 } |
---|
133 | <a name="l00140"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana9">00140</a> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> Radian::operator + ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ |
---|
134 | 00141 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a> ( <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> + d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea6">valueRadians</a>() ); |
---|
135 | 00142 } |
---|
136 | <a name="l00143"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana11">00143</a> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& Radian::operator += ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ) { |
---|
137 | 00144 <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> += d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea6">valueRadians</a>(); |
---|
138 | 00145 <span class="keywordflow">return</span> *<span class="keyword">this</span>; |
---|
139 | 00146 } |
---|
140 | <a name="l00147"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana14">00147</a> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> Radian::operator - ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d )<span class="keyword"> const </span>{ |
---|
141 | 00148 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana0">Radian</a> ( <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> - d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea6">valueRadians</a>() ); |
---|
142 | 00149 } |
---|
143 | <a name="l00150"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana16">00150</a> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& Radian::operator -= ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& d ) { |
---|
144 | 00151 <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> -= d.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea6">valueRadians</a>(); |
---|
145 | 00152 <span class="keywordflow">return</span> *<span class="keyword">this</span>; |
---|
146 | 00153 } |
---|
147 | 00154 |
---|
148 | <a name="l00165"></a><a class="code" href="classOgre_1_1Math.html">00165</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> Math |
---|
149 | 00166 { |
---|
150 | 00167 <span class="keyword">public</span>: |
---|
151 | <a name="l00173"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathw2">00173</a> <span class="keyword">enum</span> AngleUnit |
---|
152 | 00174 { |
---|
153 | 00175 AU_DEGREE, |
---|
154 | 00176 AU_RADIAN |
---|
155 | 00177 }; |
---|
156 | 00178 |
---|
157 | 00179 <span class="keyword">protected</span>: |
---|
158 | 00180 <span class="comment">// angle units used by the api</span> |
---|
159 | <a name="l00181"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Matht0">00181</a> <span class="keyword">static</span> AngleUnit msAngleUnit; |
---|
160 | 00182 |
---|
161 | <a name="l00184"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Matht1">00184</a> <span class="keyword">static</span> <span class="keywordtype">int</span> mTrigTableSize; |
---|
162 | 00185 |
---|
163 | <a name="l00187"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Matht2">00187</a> <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> mTrigTableFactor; |
---|
164 | <a name="l00188"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Matht3">00188</a> <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a>* mSinTable; |
---|
165 | <a name="l00189"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Matht4">00189</a> <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a>* mTanTable; |
---|
166 | 00190 |
---|
167 | 00193 <span class="keywordtype">void</span> buildTrigTables(); |
---|
168 | 00194 |
---|
169 | 00195 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> SinTable (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue); |
---|
170 | 00196 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> TanTable (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue); |
---|
171 | 00197 <span class="keyword">public</span>: |
---|
172 | 00203 Math(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> trigTableSize = 4096); |
---|
173 | 00204 |
---|
174 | 00207 ~Math(); |
---|
175 | 00208 |
---|
176 | <a name="l00209"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe0">00209</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> IAbs (<span class="keywordtype">int</span> iValue) { <span class="keywordflow">return</span> ( iValue >= 0 ? iValue : -iValue ); } |
---|
177 | <a name="l00210"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe1">00210</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> ICeil (<span class="keywordtype">float</span> fValue) { <span class="keywordflow">return</span> int(ceil(fValue)); } |
---|
178 | <a name="l00211"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe2">00211</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> IFloor (<span class="keywordtype">float</span> fValue) { <span class="keywordflow">return</span> int(floor(fValue)); } |
---|
179 | 00212 <span class="keyword">static</span> <span class="keywordtype">int</span> ISign (<span class="keywordtype">int</span> iValue); |
---|
180 | 00213 |
---|
181 | <a name="l00214"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe4">00214</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Abs (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue) { <span class="keywordflow">return</span> <a class="code" href="namespaceOgre.html#a465">Real</a>(fabs(fValue)); } |
---|
182 | <a name="l00215"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe5">00215</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a> Abs (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& dValue) { <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>(fabs(dValue.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea5">valueDegrees</a>())); } |
---|
183 | <a name="l00216"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe6">00216</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> Abs (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& rValue) { <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>(fabs(rValue.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>())); } |
---|
184 | 00217 <span class="keyword">static</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> ACos (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue); |
---|
185 | 00218 <span class="keyword">static</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> ASin (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue); |
---|
186 | <a name="l00219"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe9">00219</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> ATan (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue) { <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>(atan(fValue)); } |
---|
187 | <a name="l00220"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe10">00220</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> ATan2 (<a class="code" href="namespaceOgre.html#a465">Real</a> fY, <a class="code" href="namespaceOgre.html#a465">Real</a> fX) { <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>(atan2(fY,fX)); } |
---|
188 | <a name="l00221"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe11">00221</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Ceil (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue) { <span class="keywordflow">return</span> <a class="code" href="namespaceOgre.html#a465">Real</a>(ceil(fValue)); } |
---|
189 | 00222 |
---|
190 | <a name="l00230"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe12">00230</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Cos (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& fValue, <span class="keywordtype">bool</span> useTables = <span class="keyword">false</span>) { |
---|
191 | 00231 <span class="keywordflow">return</span> (!useTables) ? <a class="code" href="namespaceOgre.html#a465">Real</a>(cos(fValue.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>())) : SinTable(fValue.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>() + HALF_PI); |
---|
192 | 00232 } |
---|
193 | <a name="l00240"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe13">00240</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Cos (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue, <span class="keywordtype">bool</span> useTables = <span class="keyword">false</span>) { |
---|
194 | 00241 <span class="keywordflow">return</span> (!useTables) ? <a class="code" href="namespaceOgre.html#a465">Real</a>(cos(fValue)) : SinTable(fValue + HALF_PI); |
---|
195 | 00242 } |
---|
196 | 00243 |
---|
197 | <a name="l00244"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe14">00244</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Exp (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue) { <span class="keywordflow">return</span> <a class="code" href="namespaceOgre.html#a465">Real</a>(exp(fValue)); } |
---|
198 | 00245 |
---|
199 | <a name="l00246"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe15">00246</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Floor (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue) { <span class="keywordflow">return</span> <a class="code" href="namespaceOgre.html#a465">Real</a>(floor(fValue)); } |
---|
200 | 00247 |
---|
201 | <a name="l00248"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe16">00248</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> <a class="code" href="classOgre_1_1Log.html">Log</a> (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue) { <span class="keywordflow">return</span> <a class="code" href="namespaceOgre.html#a465">Real</a>(log(fValue)); } |
---|
202 | 00249 |
---|
203 | <a name="l00250"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe17">00250</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Pow (<a class="code" href="namespaceOgre.html#a465">Real</a> fBase, <a class="code" href="namespaceOgre.html#a465">Real</a> fExponent) { <span class="keywordflow">return</span> <a class="code" href="namespaceOgre.html#a465">Real</a>(pow(fBase,fExponent)); } |
---|
204 | 00251 |
---|
205 | 00252 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Sign (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue); |
---|
206 | <a name="l00253"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe19">00253</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> Sign ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& rValue ) |
---|
207 | 00254 { |
---|
208 | 00255 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>(Sign(rValue.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>())); |
---|
209 | 00256 } |
---|
210 | <a name="l00257"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe20">00257</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a> Sign ( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& dValue ) |
---|
211 | 00258 { |
---|
212 | 00259 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>(Sign(dValue.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea5">valueDegrees</a>())); |
---|
213 | 00260 } |
---|
214 | 00261 |
---|
215 | <a name="l00269"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe21">00269</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Sin (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& fValue, <span class="keywordtype">bool</span> useTables = <span class="keyword">false</span>) { |
---|
216 | 00270 <span class="keywordflow">return</span> (!useTables) ? <a class="code" href="namespaceOgre.html#a465">Real</a>(sin(fValue.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>())) : SinTable(fValue.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>()); |
---|
217 | 00271 } |
---|
218 | <a name="l00279"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe22">00279</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Sin (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue, <span class="keywordtype">bool</span> useTables = <span class="keyword">false</span>) { |
---|
219 | 00280 <span class="keywordflow">return</span> (!useTables) ? <a class="code" href="namespaceOgre.html#a465">Real</a>(sin(fValue)) : SinTable(fValue); |
---|
220 | 00281 } |
---|
221 | 00282 |
---|
222 | <a name="l00283"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe23">00283</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Sqr (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue) { <span class="keywordflow">return</span> fValue*fValue; } |
---|
223 | 00284 |
---|
224 | <a name="l00285"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe24">00285</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Sqrt (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue) { <span class="keywordflow">return</span> <a class="code" href="namespaceOgre.html#a465">Real</a>(sqrt(fValue)); } |
---|
225 | 00286 |
---|
226 | <a name="l00287"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe25">00287</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> Sqrt (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& fValue) { <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>(sqrt(fValue.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>())); } |
---|
227 | 00288 |
---|
228 | <a name="l00289"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe26">00289</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a> Sqrt (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& fValue) { <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>(sqrt(fValue.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea5">valueDegrees</a>())); } |
---|
229 | 00290 |
---|
230 | 00294 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> InvSqrt(<a class="code" href="namespaceOgre.html#a465">Real</a> fValue); |
---|
231 | 00295 |
---|
232 | 00296 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> UnitRandom (); <span class="comment">// in [0,1]</span> |
---|
233 | 00297 |
---|
234 | 00298 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> RangeRandom (<a class="code" href="namespaceOgre.html#a465">Real</a> fLow, <a class="code" href="namespaceOgre.html#a465">Real</a> fHigh); <span class="comment">// in [fLow,fHigh]</span> |
---|
235 | 00299 |
---|
236 | 00300 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> SymmetricRandom (); <span class="comment">// in [-1,1]</span> |
---|
237 | 00301 |
---|
238 | <a name="l00309"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe31">00309</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Tan (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& fValue, <span class="keywordtype">bool</span> useTables = <span class="keyword">false</span>) { |
---|
239 | 00310 <span class="keywordflow">return</span> (!useTables) ? <a class="code" href="namespaceOgre.html#a465">Real</a>(tan(fValue.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>())) : TanTable(fValue.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>()); |
---|
240 | 00311 } |
---|
241 | <a name="l00319"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe32">00319</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Tan (<a class="code" href="namespaceOgre.html#a465">Real</a> fValue, <span class="keywordtype">bool</span> useTables = <span class="keyword">false</span>) { |
---|
242 | 00320 <span class="keywordflow">return</span> (!useTables) ? <a class="code" href="namespaceOgre.html#a465">Real</a>(tan(fValue)) : TanTable(fValue); |
---|
243 | 00321 } |
---|
244 | 00322 |
---|
245 | <a name="l00323"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe33">00323</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> DegreesToRadians(<a class="code" href="namespaceOgre.html#a465">Real</a> degrees) { <span class="keywordflow">return</span> degrees * fDeg2Rad; } |
---|
246 | <a name="l00324"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Mathe34">00324</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> RadiansToDegrees(<a class="code" href="namespaceOgre.html#a465">Real</a> radians) { <span class="keywordflow">return</span> radians * fRad2Deg; } |
---|
247 | 00325 |
---|
248 | 00332 <span class="keyword">static</span> <span class="keywordtype">void</span> setAngleUnit(AngleUnit unit); |
---|
249 | 00334 <span class="keyword">static</span> AngleUnit getAngleUnit(<span class="keywordtype">void</span>); |
---|
250 | 00335 |
---|
251 | 00337 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> AngleUnitsToRadians(<a class="code" href="namespaceOgre.html#a465">Real</a> units); |
---|
252 | 00339 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> RadiansToAngleUnits(<a class="code" href="namespaceOgre.html#a465">Real</a> radians); |
---|
253 | 00341 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> AngleUnitsToDegrees(<a class="code" href="namespaceOgre.html#a465">Real</a> units); |
---|
254 | 00343 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a465">Real</a> DegreesToAngleUnits(<a class="code" href="namespaceOgre.html#a465">Real</a> degrees); |
---|
255 | 00344 |
---|
256 | 00366 <span class="keyword">static</span> <span class="keywordtype">bool</span> pointInTri2D(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector2.html">Vector2</a>& p, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector2.html">Vector2</a>& a, |
---|
257 | 00367 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector2.html">Vector2</a>& b, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector2.html">Vector2</a>& c); |
---|
258 | 00368 |
---|
259 | 00393 <span class="keyword">static</span> <span class="keywordtype">bool</span> pointInTri3D(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& p, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& a, |
---|
260 | 00394 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& b, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& c, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& normal); |
---|
261 | 00396 <span class="keyword">static</span> std::pair<bool, Real> intersects(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& ray, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Plane.html">Plane</a>& plane); |
---|
262 | 00397 |
---|
263 | 00399 <span class="keyword">static</span> std::pair<bool, Real> intersects(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& ray, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Sphere.html">Sphere</a>& sphere, |
---|
264 | 00400 <span class="keywordtype">bool</span> discardInside = <span class="keyword">true</span>); |
---|
265 | 00401 |
---|
266 | 00403 <span class="keyword">static</span> std::pair<bool, Real> intersects(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& ray, <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& box); |
---|
267 | 00404 |
---|
268 | 00427 <span class="keyword">static</span> <span class="keywordtype">bool</span> intersects(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& ray, <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& box, |
---|
269 | 00428 <a class="code" href="namespaceOgre.html#a465">Real</a>* d1, <a class="code" href="namespaceOgre.html#a465">Real</a>* d2); |
---|
270 | 00429 |
---|
271 | 00454 <span class="keyword">static</span> std::pair<bool, Real> intersects(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& ray, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& a, |
---|
272 | 00455 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& b, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& c, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& normal, |
---|
273 | 00456 <span class="keywordtype">bool</span> positiveSide = <span class="keyword">true</span>, <span class="keywordtype">bool</span> negativeSide = <span class="keyword">true</span>); |
---|
274 | 00457 |
---|
275 | 00478 <span class="keyword">static</span> std::pair<bool, Real> intersects(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& ray, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& a, |
---|
276 | 00479 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& b, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& c, |
---|
277 | 00480 <span class="keywordtype">bool</span> positiveSide = <span class="keyword">true</span>, <span class="keywordtype">bool</span> negativeSide = <span class="keyword">true</span>); |
---|
278 | 00481 |
---|
279 | 00483 <span class="keyword">static</span> <span class="keywordtype">bool</span> intersects(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Sphere.html">Sphere</a>& sphere, <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& box); |
---|
280 | 00484 |
---|
281 | 00486 <span class="keyword">static</span> <span class="keywordtype">bool</span> intersects(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Plane.html">Plane</a>& plane, <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& box); |
---|
282 | 00487 |
---|
283 | 00493 <span class="keyword">static</span> std::pair<bool, Real> intersects( |
---|
284 | 00494 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& ray, <span class="keyword">const</span> std::vector<Plane>& planeList, |
---|
285 | 00495 <span class="keywordtype">bool</span> normalIsOutside); |
---|
286 | 00501 <span class="keyword">static</span> std::pair<bool, Real> intersects( |
---|
287 | 00502 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& ray, <span class="keyword">const</span> std::list<Plane>& planeList, |
---|
288 | 00503 <span class="keywordtype">bool</span> normalIsOutside); |
---|
289 | 00504 |
---|
290 | 00508 <span class="keyword">static</span> <span class="keywordtype">bool</span> intersects(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Sphere.html">Sphere</a>& sphere, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Plane.html">Plane</a>& plane); |
---|
291 | 00509 |
---|
292 | 00512 <span class="keyword">static</span> <span class="keywordtype">bool</span> RealEqual(<a class="code" href="namespaceOgre.html#a465">Real</a> a, <a class="code" href="namespaceOgre.html#a465">Real</a> b, |
---|
293 | 00513 <a class="code" href="namespaceOgre.html#a465">Real</a> tolerance = std::numeric_limits<Real>::epsilon()); |
---|
294 | 00514 |
---|
295 | 00516 <span class="keyword">static</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> calculateTangentSpaceVector( |
---|
296 | 00517 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& position1, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& position2, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& position3, |
---|
297 | 00518 <a class="code" href="namespaceOgre.html#a465">Real</a> u1, <a class="code" href="namespaceOgre.html#a465">Real</a> v1, <a class="code" href="namespaceOgre.html#a465">Real</a> u2, <a class="code" href="namespaceOgre.html#a465">Real</a> v2, <a class="code" href="namespaceOgre.html#a465">Real</a> u3, <a class="code" href="namespaceOgre.html#a465">Real</a> v3); |
---|
298 | 00519 |
---|
299 | 00521 <span class="keyword">static</span> <a class="code" href="classOgre_1_1Matrix4.html">Matrix4</a> buildReflectionMatrix(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Plane.html">Plane</a>& p); |
---|
300 | 00523 <span class="keyword">static</span> <a class="code" href="classOgre_1_1Vector4.html">Vector4</a> calculateFaceNormal(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v1, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v2, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v3); |
---|
301 | 00525 <span class="keyword">static</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> calculateBasicFaceNormal(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v1, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v2, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v3); |
---|
302 | 00527 <span class="keyword">static</span> <a class="code" href="classOgre_1_1Vector4.html">Vector4</a> calculateFaceNormalWithoutNormalize(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v1, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v2, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v3); |
---|
303 | 00529 <span class="keyword">static</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> calculateBasicFaceNormalWithoutNormalize(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v1, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v2, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& v3); |
---|
304 | 00530 |
---|
305 | <a name="l00531"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Maths0">00531</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a> POS_INFINITY; |
---|
306 | <a name="l00532"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Maths1">00532</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a> NEG_INFINITY; |
---|
307 | <a name="l00533"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Maths2">00533</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a> PI; |
---|
308 | <a name="l00534"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Maths3">00534</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a> TWO_PI; |
---|
309 | <a name="l00535"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Maths4">00535</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a> HALF_PI; |
---|
310 | <a name="l00536"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Maths5">00536</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a> fDeg2Rad; |
---|
311 | <a name="l00537"></a><a class="code" href="classOgre_1_1Math.html#Ogre_1_1Maths6">00537</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a> fRad2Deg; |
---|
312 | 00538 |
---|
313 | 00539 }; |
---|
314 | 00540 |
---|
315 | 00541 <span class="comment">// these functions must be defined down here, because they rely on the</span> |
---|
316 | 00542 <span class="comment">// angle unit conversion functions in class Math:</span> |
---|
317 | 00543 |
---|
318 | <a name="l00544"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana5">00544</a> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Radian::valueDegrees()<span class="keyword"> const</span> |
---|
319 | 00545 <span class="keyword"> </span>{ |
---|
320 | 00546 <span class="keywordflow">return</span> Math::RadiansToDegrees ( <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> ); |
---|
321 | 00547 } |
---|
322 | 00548 |
---|
323 | <a name="l00549"></a><a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana7">00549</a> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Radian::valueAngleUnits()<span class="keyword"> const</span> |
---|
324 | 00550 <span class="keyword"> </span>{ |
---|
325 | 00551 <span class="keywordflow">return</span> Math::RadiansToAngleUnits ( <a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radianr0">mRad</a> ); |
---|
326 | 00552 } |
---|
327 | 00553 |
---|
328 | <a name="l00554"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea6">00554</a> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Degree::valueRadians()<span class="keyword"> const</span> |
---|
329 | 00555 <span class="keyword"> </span>{ |
---|
330 | 00556 <span class="keywordflow">return</span> Math::DegreesToRadians ( <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> ); |
---|
331 | 00557 } |
---|
332 | 00558 |
---|
333 | <a name="l00559"></a><a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea7">00559</a> <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a465">Real</a> Degree::valueAngleUnits()<span class="keyword"> const</span> |
---|
334 | 00560 <span class="keyword"> </span>{ |
---|
335 | 00561 <span class="keywordflow">return</span> Math::DegreesToAngleUnits ( <a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreer0">mDeg</a> ); |
---|
336 | 00562 } |
---|
337 | 00563 |
---|
338 | <a name="l00564"></a><a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Anglea1">00564</a> <span class="keyword">inline</span> Angle::operator Radian() |
---|
339 | 00565 { |
---|
340 | 00566 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>(Math::AngleUnitsToRadians(<a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Angler0">mAngle</a>)); |
---|
341 | 00567 } |
---|
342 | 00568 |
---|
343 | <a name="l00569"></a><a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Anglea2">00569</a> <span class="keyword">inline</span> Angle::operator Degree() |
---|
344 | 00570 { |
---|
345 | 00571 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>(Math::AngleUnitsToDegrees(<a class="code" href="classOgre_1_1Angle.html#Ogre_1_1Angler0">mAngle</a>)); |
---|
346 | 00572 } |
---|
347 | 00573 |
---|
348 | <a name="l00574"></a><a class="code" href="namespaceOgre.html#a617">00574</a> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="namespaceOgre.html#a617">operator * </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> a, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& b ) |
---|
349 | 00575 { |
---|
350 | 00576 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> ( a * b.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>() ); |
---|
351 | 00577 } |
---|
352 | 00578 |
---|
353 | <a name="l00579"></a><a class="code" href="namespaceOgre.html#a618">00579</a> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> <a class="code" href="namespaceOgre.html#a618">operator / </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> a, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& b ) |
---|
354 | 00580 { |
---|
355 | 00581 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> ( a / b.<a class="code" href="classOgre_1_1Radian.html#Ogre_1_1Radiana6">valueRadians</a>() ); |
---|
356 | 00582 } |
---|
357 | 00583 |
---|
358 | <a name="l00584"></a><a class="code" href="namespaceOgre.html#a619">00584</a> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="namespaceOgre.html#a617">operator * </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> a, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& b ) |
---|
359 | 00585 { |
---|
360 | 00586 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a> ( a * b.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea5">valueDegrees</a>() ); |
---|
361 | 00587 } |
---|
362 | 00588 |
---|
363 | <a name="l00589"></a><a class="code" href="namespaceOgre.html#a620">00589</a> <span class="keyword">inline</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a> <a class="code" href="namespaceOgre.html#a618">operator / </a>( <a class="code" href="namespaceOgre.html#a465">Real</a> a, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a>& b ) |
---|
364 | 00590 { |
---|
365 | 00591 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1Degree.html">Degree</a> ( a / b.<a class="code" href="classOgre_1_1Degree.html#Ogre_1_1Degreea5">valueDegrees</a>() ); |
---|
366 | 00592 } |
---|
367 | 00593 |
---|
368 | 00594 } |
---|
369 | 00595 <span class="preprocessor">#endif</span> |
---|
370 | </pre></div><hr> |
---|
371 | <p> |
---|
372 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
373 | <!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/> |
---|
374 | This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/> |
---|
375 | <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> |
---|
376 | <Work rdf:about=""> |
---|
377 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
378 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
379 | </Work> |
---|
380 | <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> --> |
---|
381 | |
---|
382 | Last modified Sun Mar 12 14:37:44 2006 |
---|
383 | </p> |
---|
384 | </body> |
---|
385 | </html> |
---|