blob: 5c6190cd53cab3299a469b6300bccc21889a4741 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>FTGL: FTPoint.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>FTPoint.h</h1><a href="FTPoint_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef __FTPoint__</span>
00002 <span class="preprocessor"></span><span class="preprocessor">#define __FTPoint__</span>
00003 <span class="preprocessor"></span>
00004 <span class="preprocessor">#include &lt;ft2build.h&gt;</span>
00005 <span class="preprocessor">#include FT_FREETYPE_H</span>
00006 <span class="preprocessor"></span><span class="preprocessor">#include FT_GLYPH_H</span>
00007 <span class="preprocessor"></span>
00008 <span class="preprocessor">#include "<a class="code" href="FTGL_8h.html">FTGL.h</a>"</span>
00009
<a name="l00013"></a><a class="code" href="classFTPoint.html">00013</a> <span class="keyword">class </span><a class="code" href="FTGL_8h.html#a3">FTGL_EXPORT</a> FTPoint
00014 {
00015 <span class="keyword">public</span>:
<a name="l00019"></a><a class="code" href="classFTPoint.html#a0">00019</a> FTPoint()
00020 {
00021 values[0] = 0;
00022 values[1] = 0;
00023 values[2] = 0;
00024 }
00025
<a name="l00033"></a><a class="code" href="classFTPoint.html#a1">00033</a> FTPoint( <span class="keyword">const</span> <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> x, <span class="keyword">const</span> <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> y, <span class="keyword">const</span> <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> z)
00034 {
00035 values[0] = x;
00036 values[1] = y;
00037 values[2] = z;
00038 }
00039
<a name="l00045"></a><a class="code" href="classFTPoint.html#a2">00045</a> FTPoint( <span class="keyword">const</span> FT_Vector&amp; ft_vector)
00046 {
00047 values[0] = ft_vector.x;
00048 values[1] = ft_vector.y;
00049 values[2] = 0;
00050 }
00051
<a name="l00058"></a><a class="code" href="classFTPoint.html#a3">00058</a> FTPoint&amp; operator += ( <span class="keyword">const</span> FTPoint&amp; point)
00059 {
00060 values[0] += point.<a class="code" href="classFTPoint.html#r0">values</a>[0];
00061 values[1] += point.<a class="code" href="classFTPoint.html#r0">values</a>[1];
00062 values[2] += point.<a class="code" href="classFTPoint.html#r0">values</a>[2];
00063
00064 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
00065 }
00066
<a name="l00073"></a><a class="code" href="classFTPoint.html#a4">00073</a> FTPoint operator + ( <span class="keyword">const</span> FTPoint&amp; point)
00074 {
00075 FTPoint temp;
00076 temp.<a class="code" href="classFTPoint.html#r0">values</a>[0] = values[0] + point.<a class="code" href="classFTPoint.html#r0">values</a>[0];
00077 temp.<a class="code" href="classFTPoint.html#r0">values</a>[1] = values[1] + point.<a class="code" href="classFTPoint.html#r0">values</a>[1];
00078 temp.<a class="code" href="classFTPoint.html#r0">values</a>[2] = values[2] + point.<a class="code" href="classFTPoint.html#r0">values</a>[2];
00079
00080 <span class="keywordflow">return</span> temp;
00081 }
00082
00083
<a name="l00090"></a><a class="code" href="classFTPoint.html#a5">00090</a> FTPoint <a class="code" href="FTPoint_8cpp.html#a2">operator * </a>( <span class="keywordtype">double</span> multiplier)
00091 {
00092 FTPoint temp;
00093 temp.<a class="code" href="classFTPoint.html#r0">values</a>[0] = values[0] * multiplier;
00094 temp.<a class="code" href="classFTPoint.html#r0">values</a>[1] = values[1] * multiplier;
00095 temp.<a class="code" href="classFTPoint.html#r0">values</a>[2] = values[2] * multiplier;
00096
00097 <span class="keywordflow">return</span> temp;
00098 }
00099
00100
00108 <span class="keyword">friend</span> FTPoint <a class="code" href="FTPoint_8cpp.html#a2">operator*</a>( <span class="keywordtype">double</span> multiplier, FTPoint&amp; point);
00109
00110
00118 <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="FTPoint_8cpp.html#a0">operator == </a>( <span class="keyword">const</span> FTPoint &amp;a, <span class="keyword">const</span> FTPoint &amp;b);
00119
00127 <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="FTPoint_8cpp.html#a1">operator != </a>( <span class="keyword">const</span> FTPoint &amp;a, <span class="keyword">const</span> FTPoint &amp;b);
00128
00129
<a name="l00133"></a><a class="code" href="classFTPoint.html#a6">00133</a> operator FTGL_DOUBLE*()
00134 {
00135 <span class="keywordflow">return</span> values;
00136 }
00137
00138
<a name="l00142"></a><a class="code" href="classFTPoint.html#a7">00142</a> <span class="keywordtype">void</span> X( <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> x) { values[0] = x;};
<a name="l00143"></a><a class="code" href="classFTPoint.html#a8">00143</a> <span class="keywordtype">void</span> Y( <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> y) { values[1] = y;};
<a name="l00144"></a><a class="code" href="classFTPoint.html#a9">00144</a> <span class="keywordtype">void</span> Z( <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> z) { values[2] = z;};
00145
00146
<a name="l00150"></a><a class="code" href="classFTPoint.html#a10">00150</a> <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> X()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> values[0];};
<a name="l00151"></a><a class="code" href="classFTPoint.html#a11">00151</a> <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> Y()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> values[1];};
<a name="l00152"></a><a class="code" href="classFTPoint.html#a12">00152</a> <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> Z()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> values[2];};
00153
00154 <span class="keyword">private</span>:
00158 <a class="code" href="FTGL_8h.html#a4">FTGL_DOUBLE</a> values[3];
00159 };
00160
00161 <span class="preprocessor">#endif // __FTPoint__</span>
00162 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Dec 5 22:24:06 2004 for FTGL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.6 </small></address>
</body>
</html>