source: OGRE/trunk/ogrenew/Docs/api/html/OgreVector4_8h-source.html @ 657

Revision 657, 26.6 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1<html>
2<head>
3<title>OgreVector4.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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
10<h1>OgreVector4.h</h1><a href="OgreVector4_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>
1100002 <span class="comment">-----------------------------------------------------------------------------</span>
1200003 <span class="comment">This source file is part of OGRE</span>
1300004 <span class="comment">    (Object-oriented Graphics Rendering Engine)</span>
1400005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span>
1500006 <span class="comment"></span>
1600007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span>
1700008 <span class="comment">Also see acknowledgements in Readme.html</span>
1800009 <span class="comment"></span>
1900010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span>
2000011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span>
2100012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span>
2200013 <span class="comment">version.</span>
2300014 <span class="comment"></span>
2400015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span>
2500016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
2600017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span>
2700018 <span class="comment"></span>
2800019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span>
2900020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span>
3000021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span>
3100022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span>
3200023 <span class="comment">-----------------------------------------------------------------------------</span>
3300024 <span class="comment">*/</span>
3400025 <span class="preprocessor">#ifndef __Vector4_H__</span>
3500026 <span class="preprocessor"></span><span class="preprocessor">#define __Vector4_H__</span>
3600027 <span class="preprocessor"></span>
3700028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span>
3800029 <span class="preprocessor">#include "<a class="code" href="OgreVector3_8h.html">OgreVector3.h</a>"</span>
3900030
4000031 <span class="keyword">namespace </span>Ogre
4100032 {
4200033
43<a name="l00036"></a><a class="code" href="classOgre_1_1Vector4.html">00036</a>     <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> Vector4
4400037     {
4500038     <span class="keyword">public</span>:
4600039         <span class="keyword">union </span>{
4700040             <span class="keyword">struct </span>{
48<a name="l00041"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">00041</a>                 <a class="code" href="namespaceOgre.html#a420">Real</a> x, y, z, w;       
4900042             };
50<a name="l00043"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o4">00043</a>             <a class="code" href="namespaceOgre.html#a420">Real</a> val[4];
5100044         };
5200045
5300046     <span class="keyword">public</span>:
54<a name="l00047"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a0">00047</a>         <span class="keyword">inline</span> Vector4()
5500048         {
5600049         }
5700050
58<a name="l00051"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a1">00051</a>         <span class="keyword">inline</span> Vector4( <a class="code" href="namespaceOgre.html#a420">Real</a> fX, <a class="code" href="namespaceOgre.html#a420">Real</a> fY, <a class="code" href="namespaceOgre.html#a420">Real</a> fZ, <a class="code" href="namespaceOgre.html#a420">Real</a> fW )
5900052             : x( fX ), y( fY ), z( fZ ), w( fW)
6000053         {
6100054         }
6200055
63<a name="l00056"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a2">00056</a>         <span class="keyword">inline</span> Vector4( <a class="code" href="namespaceOgre.html#a420">Real</a> afCoordinate[4] )
6400057             : x( afCoordinate[0] ),
6500058               y( afCoordinate[1] ),
6600059               z( afCoordinate[2] ),
6700060               w (afCoordinate[3] )
6800061         {
6900062         }
7000063
71<a name="l00064"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a3">00064</a>         <span class="keyword">inline</span> Vector4( <span class="keywordtype">int</span> afCoordinate[4] )
7200065         {
7300066             x = (<a class="code" href="namespaceOgre.html#a420">Real</a>)afCoordinate[0];
7400067             y = (<a class="code" href="namespaceOgre.html#a420">Real</a>)afCoordinate[1];
7500068             z = (<a class="code" href="namespaceOgre.html#a420">Real</a>)afCoordinate[2];
7600069             w = (<a class="code" href="namespaceOgre.html#a420">Real</a>)afCoordinate[3];
7700070         }
7800071
79<a name="l00072"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a4">00072</a>         <span class="keyword">inline</span> Vector4( <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a420">Real</a>* <span class="keyword">const</span> r )
8000073             : x( r[0] ), y( r[1] ), z( r[2] ), w( r[3] )
8100074         {
8200075         }
8300076
84<a name="l00077"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a5">00077</a>         <span class="keyword">inline</span> Vector4( <span class="keyword">const</span> Vector4&amp; rkVector )
8500078             : x( rkVector.x ), y( rkVector.y ), z( rkVector.z ), w (rkVector.w)
8600079         {
8700080         }
8800081
89<a name="l00082"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a6">00082</a>         <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a420">Real</a> operator [] ( size_t i )<span class="keyword"> const</span>
9000083 <span class="keyword">        </span>{
9100084             assert( i &lt; 4 );
9200085
9300086             <span class="keywordflow">return</span> *(&amp;x+i);
9400087         }
9500088
96<a name="l00089"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a7">00089</a>         <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a420">Real</a>&amp; operator [] ( size_t i )
9700090         {
9800091             assert( i &lt; 4 );
9900092
10000093             <span class="keywordflow">return</span> *(&amp;x+i);
10100094         }
10200095
103<a name="l00100"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a8">00100</a>         <span class="keyword">inline</span> Vector4&amp; operator = ( <span class="keyword">const</span> Vector4&amp; rkVector )
10400101         {
10500102             x = rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a>;
10600103             y = rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a>;
10700104             z = rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a>;           
10800105             w = rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;           
10900106
11000107             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
11100108         }
11200109
113<a name="l00110"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a9">00110</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a618">operator == </a>( <span class="keyword">const</span> Vector4&amp; rkVector )<span class="keyword"> const</span>
11400111 <span class="keyword">        </span>{
11500112             <span class="keywordflow">return</span> ( x == rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> &amp;&amp;
11600113                 y == rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> &amp;&amp;
11700114                 z == rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> &amp;&amp;
11800115                 w == rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> );
11900116         }
12000117
121<a name="l00118"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a10">00118</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a619">operator != </a>( <span class="keyword">const</span> Vector4&amp; rkVector )<span class="keyword"> const</span>
12200119 <span class="keyword">        </span>{
12300120             <span class="keywordflow">return</span> ( x != rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> ||
12400121                 y != rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> ||
12500122                 z != rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> ||
12600123                 w != rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> );
12700124         }
12800125
129<a name="l00126"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a11">00126</a>         <span class="keyword">inline</span> Vector4&amp; operator = (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>&amp; rhs)
13000127         {
13100128             x = rhs.<a class="code" href="classOgre_1_1Vector3.html#Ogre_1_1Vector3o0">x</a>;
13200129             y = rhs.<a class="code" href="classOgre_1_1Vector3.html#Ogre_1_1Vector3o1">y</a>;
13300130             z = rhs.<a class="code" href="classOgre_1_1Vector3.html#Ogre_1_1Vector3o2">z</a>;
13400131             w = 1.0f;
13500132             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
13600133         }
13700134
13800135         <span class="comment">// arithmetic operations</span>
139<a name="l00136"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a12">00136</a>         <span class="keyword">inline</span> Vector4 operator + ( <span class="keyword">const</span> Vector4&amp; rkVector )<span class="keyword"> const</span>
14000137 <span class="keyword">        </span>{
14100138             Vector4 kSum;
14200139
14300140             kSum.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> = x + rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a>;
14400141             kSum.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> = y + rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a>;
14500142             kSum.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> = z + rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a>;
14600143             kSum.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> = w + rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;
14700144
14800145             <span class="keywordflow">return</span> kSum;
14900146         }
15000147
151<a name="l00148"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a13">00148</a>         <span class="keyword">inline</span> Vector4 operator - ( <span class="keyword">const</span> Vector4&amp; rkVector )<span class="keyword"> const</span>
15200149 <span class="keyword">        </span>{
15300150             Vector4 kDiff;
15400151
15500152             kDiff.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> = x - rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a>;
15600153             kDiff.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> = y - rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a>;
15700154             kDiff.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> = z - rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a>;
15800155             kDiff.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> = w - rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;
15900156
16000157             <span class="keywordflow">return</span> kDiff;
16100158         }
16200159
163<a name="l00160"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a14">00160</a>         <span class="keyword">inline</span> Vector4 <a class="code" href="namespaceOgre.html#a612">operator * </a>( <a class="code" href="namespaceOgre.html#a420">Real</a> fScalar )<span class="keyword"> const</span>
16400161 <span class="keyword">        </span>{
16500162             Vector4 kProd;
16600163
16700164             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> = fScalar*x;
16800165             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> = fScalar*y;
16900166             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> = fScalar*z;
17000167             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> = fScalar*w;
17100168
17200169             <span class="keywordflow">return</span> kProd;
17300170         }
17400171
175<a name="l00172"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a15">00172</a>         <span class="keyword">inline</span> Vector4 <a class="code" href="namespaceOgre.html#a612">operator * </a>( <span class="keyword">const</span> Vector4&amp; rhs)<span class="keyword"> const</span>
17600173 <span class="keyword">        </span>{
17700174             Vector4 kProd;
17800175
17900176             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> = rhs.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> * x;
18000177             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> = rhs.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> * y;
18100178             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> = rhs.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> * z;
18200179             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> = rhs.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> * w;
18300180
18400181             <span class="keywordflow">return</span> kProd;
18500182         }
18600183
187<a name="l00184"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a16">00184</a>         <span class="keyword">inline</span> Vector4 <a class="code" href="namespaceOgre.html#a613">operator / </a>( <a class="code" href="namespaceOgre.html#a420">Real</a> fScalar )<span class="keyword"> const</span>
18800185 <span class="keyword">        </span>{
18900186             assert( fScalar != 0.0 );
19000187
19100188             Vector4 kDiv;
19200189
19300190             <a class="code" href="namespaceOgre.html#a420">Real</a> fInv = 1.0 / fScalar;
19400191             kDiv.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> = x * fInv;
19500192             kDiv.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> = y * fInv;
19600193             kDiv.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> = z * fInv;
19700194             kDiv.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> = w * fInv;
19800195
19900196             <span class="keywordflow">return</span> kDiv;
20000197         }
20100198
202<a name="l00199"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a17">00199</a>         <span class="keyword">inline</span> Vector4 <a class="code" href="namespaceOgre.html#a613">operator / </a>( <span class="keyword">const</span> Vector4&amp; rhs)<span class="keyword"> const</span>
20300200 <span class="keyword">        </span>{
20400201             Vector4 kDiv;
20500202
20600203             kDiv.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> = x / rhs.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a>;
20700204             kDiv.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> = y / rhs.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a>;
20800205             kDiv.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> = z / rhs.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a>;
20900206             kDiv.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> = w / rhs.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;
21000207
21100208             <span class="keywordflow">return</span> kDiv;
21200209         }
21300210
21400211
215<a name="l00212"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a18">00212</a>         <span class="keyword">inline</span> Vector4 operator - ()<span class="keyword"> const</span>
21600213 <span class="keyword">        </span>{
21700214             Vector4 kNeg;
21800215
21900216             kNeg.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> = -x;
22000217             kNeg.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> = -y;
22100218             kNeg.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> = -z;
22200219             kNeg.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> = -w;
22300220
22400221             <span class="keywordflow">return</span> kNeg;
22500222         }
22600223
227<a name="l00224"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4n0">00224</a>         <span class="keyword">inline</span> <span class="keyword">friend</span> Vector4 <a class="code" href="namespaceOgre.html#a612">operator * </a>( <a class="code" href="namespaceOgre.html#a420">Real</a> fScalar, <span class="keyword">const</span> Vector4&amp; rkVector )
22800225         {
22900226             Vector4 kProd;
23000227
23100228             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> = fScalar * rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a>;
23200229             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> = fScalar * rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a>;
23300230             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> = fScalar * rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a>;
23400231             kProd.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a> = fScalar * rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;
23500232
23600233             <span class="keywordflow">return</span> kProd;
23700234         }
23800235
23900236         <span class="comment">// arithmetic updates</span>
240<a name="l00237"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a19">00237</a>         <span class="keyword">inline</span> Vector4&amp; operator += ( <span class="keyword">const</span> Vector4&amp; rkVector )
24100238         {
24200239             x += rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a>;
24300240             y += rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a>;
24400241             z += rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a>;
24500242             w += rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;
24600243
24700244             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
24800245         }
24900246
250<a name="l00247"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a20">00247</a>         <span class="keyword">inline</span> Vector4&amp; operator -= ( <span class="keyword">const</span> Vector4&amp; rkVector )
25100248         {
25200249             x -= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a>;
25300250             y -= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a>;
25400251             z -= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a>;
25500252             w -= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;
25600253
25700254             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
25800255         }
25900256
260<a name="l00257"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a21">00257</a>         <span class="keyword">inline</span> Vector4&amp; operator *= ( <a class="code" href="namespaceOgre.html#a420">Real</a> fScalar )
26100258         {
26200259             x *= fScalar;
26300260             y *= fScalar;
26400261             z *= fScalar;
26500262             w *= fScalar;
26600263             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
26700264         }
26800265
269<a name="l00266"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a22">00266</a>         <span class="keyword">inline</span> Vector4&amp; operator *= ( <span class="keyword">const</span> Vector4&amp; rkVector )
27000267         {
27100268             x *= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a>;
27200269             y *= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a>;
27300270             z *= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a>;
27400271             w *= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;
27500272
27600273             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
27700274         }
27800275
279<a name="l00276"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a23">00276</a>         <span class="keyword">inline</span> Vector4&amp; operator /= ( <a class="code" href="namespaceOgre.html#a420">Real</a> fScalar )
28000277         {
28100278             assert( fScalar != 0.0 );
28200279
28300280             <a class="code" href="namespaceOgre.html#a420">Real</a> fInv = 1.0 / fScalar;
28400281
28500282             x *= fInv;
28600283             y *= fInv;
28700284             z *= fInv;
28800285             w *= fInv;
28900286
29000287             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
29100288         }
29200289
293<a name="l00290"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a24">00290</a>         <span class="keyword">inline</span> Vector4&amp; operator /= ( <span class="keyword">const</span> Vector4&amp; rkVector )
29400291         {
29500292             x /= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a>;
29600293             y /= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a>;
29700294             z /= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a>;
29800295             w /= rkVector.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;
29900296
30000297             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
30100298         }
30200299
303<a name="l00307"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4a25">00307</a>         <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a420">Real</a> dotProduct(<span class="keyword">const</span> Vector4&amp; vec)<span class="keyword"> const</span>
30400308 <span class="keyword">        </span>{
30500309             <span class="keywordflow">return</span> x * vec.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o0">x</a> + y * vec.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o1">y</a> + z * vec.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o2">z</a> + w * vec.<a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4o3">w</a>;
30600310         }
30700313         <span class="keyword">inline</span> <a class="code" href="class__OgreExport.html">_OgreExport</a> <span class="keyword">friend</span> std::ostream&amp; <span class="keyword">operator</span> &lt;&lt;
308<a name="l00314"></a><a class="code" href="classOgre_1_1Vector4.html#Ogre_1_1Vector4n1">00314</a>             ( std::ostream&amp; o, <span class="keyword">const</span> Vector4&amp; v )
30900315         {
31000316             o &lt;&lt; <span class="stringliteral">"Vector4("</span> &lt;&lt; v.x &lt;&lt; <span class="stringliteral">", "</span> &lt;&lt; v.y &lt;&lt; <span class="stringliteral">", "</span> &lt;&lt; v.z &lt;&lt; <span class="stringliteral">", "</span> &lt;&lt; v.w &lt;&lt; <span class="stringliteral">")"</span>;
31100317             <span class="keywordflow">return</span> o;
31200318         }
31300319     };
31400320
31500321 }
31600322 <span class="preprocessor">#endif</span>
317</pre></div><hr>
318<p>
319Copyright &copy; 2000-2005 by The OGRE Team<br />
320<!--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/>
321This 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/>
322                <!--/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#">
323                <Work rdf:about="">
324                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
325        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
326                </Work>
327                <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> -->
328
329Last modified Sun Feb 12 12:59:54 2006
330</p>
331</body>
332</html>
Note: See TracBrowser for help on using the repository browser.