qwt__point__3d_8h_source.html
17.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Qwt User's Guide: qwt_point_3d.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Qwt User's Guide <span id="projectnumber">6.0.1</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>qwt_point_3d.h</h1> </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************</span>
<a name="l00002"></a>00002 <span class="comment"> * Qwt Widget Library</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1997 Josef Wilgen</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002 Uwe Rathmann</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00007"></a>00007 <span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span>
<a name="l00008"></a>00008 <span class="comment"> *****************************************************************************/</span>
<a name="l00009"></a>00009
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef QWT_POINT_3D_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define QWT_POINT_3D_H 1</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="preprocessor">#include "qwt_global.h"</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include <qpoint.h></span>
<a name="l00016"></a>00016 <span class="preprocessor">#ifndef QT_NO_DEBUG_STREAM</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#include <qdebug.h></span>
<a name="l00018"></a>00018 <span class="preprocessor">#endif</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00024"></a><a class="code" href="class_qwt_point3_d.html">00024</a> <span class="keyword">class </span>QWT_EXPORT <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a>
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026 <span class="keyword">public</span>:
<a name="l00027"></a>00027 <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a>();
<a name="l00028"></a>00028 <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a>( <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z );
<a name="l00029"></a>00029 <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a> & );
<a name="l00030"></a>00030 <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a>( <span class="keyword">const</span> QPointF & );
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="keywordtype">bool</span> isNull() <span class="keyword">const</span>;
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <span class="keywordtype">double</span> x() <span class="keyword">const</span>;
<a name="l00035"></a>00035 <span class="keywordtype">double</span> y() <span class="keyword">const</span>;
<a name="l00036"></a>00036 <span class="keywordtype">double</span> z() <span class="keyword">const</span>;
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="keywordtype">double</span> &rx();
<a name="l00039"></a>00039 <span class="keywordtype">double</span> &ry();
<a name="l00040"></a>00040 <span class="keywordtype">double</span> &rz();
<a name="l00041"></a>00041
<a name="l00042"></a>00042 <span class="keywordtype">void</span> setX( <span class="keywordtype">double</span> x );
<a name="l00043"></a>00043 <span class="keywordtype">void</span> setY( <span class="keywordtype">double</span> y );
<a name="l00044"></a>00044 <span class="keywordtype">void</span> setZ( <span class="keywordtype">double</span> y );
<a name="l00045"></a>00045
<a name="l00046"></a>00046 QPointF toPoint() <span class="keyword">const</span>;
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a> & ) <span class="keyword">const</span>;
<a name="l00049"></a>00049 <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a> & ) <span class="keyword">const</span>;
<a name="l00050"></a>00050
<a name="l00051"></a>00051 <span class="keyword">private</span>:
<a name="l00052"></a>00052 <span class="keywordtype">double</span> d_x;
<a name="l00053"></a>00053 <span class="keywordtype">double</span> d_y;
<a name="l00054"></a>00054 <span class="keywordtype">double</span> d_z;
<a name="l00055"></a>00055 };
<a name="l00056"></a>00056
<a name="l00057"></a>00057 Q_DECLARE_TYPEINFO(<a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a>, Q_MOVABLE_TYPE);
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <span class="preprocessor">#ifndef QT_NO_DEBUG_STREAM</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>QWT_EXPORT QDebug operator<<( QDebug, <span class="keyword">const</span> <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a> & );
<a name="l00061"></a>00061 <span class="preprocessor">#endif</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>
<a name="l00067"></a><a class="code" href="class_qwt_point3_d.html#acd7ec5a157397ce719225592b32cc510">00067</a> <span class="keyword">inline</span> <a class="code" href="class_qwt_point3_d.html#acd7ec5a157397ce719225592b32cc510">QwtPoint3D::QwtPoint3D</a>():
<a name="l00068"></a>00068 d_x( 0.0 ),
<a name="l00069"></a>00069 d_y( 0.0 ),
<a name="l00070"></a>00070 d_z( 0.0 )
<a name="l00071"></a>00071 {
<a name="l00072"></a>00072 }
<a name="l00073"></a>00073
<a name="l00075"></a><a class="code" href="class_qwt_point3_d.html#a33b9fa088b750e1f4ded65c23fb62868">00075</a> <span class="keyword">inline</span> <a class="code" href="class_qwt_point3_d.html#acd7ec5a157397ce719225592b32cc510">QwtPoint3D::QwtPoint3D</a>( <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z = 0.0 ):
<a name="l00076"></a>00076 d_x( x ),
<a name="l00077"></a>00077 d_y( y ),
<a name="l00078"></a>00078 d_z( z )
<a name="l00079"></a>00079 {
<a name="l00080"></a>00080 }
<a name="l00081"></a>00081
<a name="l00086"></a><a class="code" href="class_qwt_point3_d.html#a3847545c69e11d4c33891c5d9218afee">00086</a> <span class="keyword">inline</span> <a class="code" href="class_qwt_point3_d.html#acd7ec5a157397ce719225592b32cc510">QwtPoint3D::QwtPoint3D</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a> &other ):
<a name="l00087"></a>00087 d_x( other.d_x ),
<a name="l00088"></a>00088 d_y( other.d_y ),
<a name="l00089"></a>00089 d_z( other.d_z )
<a name="l00090"></a>00090 {
<a name="l00091"></a>00091 }
<a name="l00092"></a>00092
<a name="l00097"></a><a class="code" href="class_qwt_point3_d.html#a6747ac88e709543e57fc285e84181f49">00097</a> <span class="keyword">inline</span> <a class="code" href="class_qwt_point3_d.html#acd7ec5a157397ce719225592b32cc510">QwtPoint3D::QwtPoint3D</a>( <span class="keyword">const</span> QPointF &other ):
<a name="l00098"></a>00098 d_x( other.x() ),
<a name="l00099"></a>00099 d_y( other.y() ),
<a name="l00100"></a>00100 d_z( 0.0 )
<a name="l00101"></a>00101 {
<a name="l00102"></a>00102 }
<a name="l00103"></a>00103
<a name="l00110"></a><a class="code" href="class_qwt_point3_d.html#a4542223c75e50afac7124cd44ca9c900">00110</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="class_qwt_point3_d.html#a4542223c75e50afac7124cd44ca9c900">QwtPoint3D::isNull</a>()<span class="keyword"> const</span>
<a name="l00111"></a>00111 <span class="keyword"></span>{
<a name="l00112"></a>00112 <span class="keywordflow">return</span> d_x == 0.0 && d_y == 0.0 && d_z == 0;
<a name="l00113"></a>00113 }
<a name="l00114"></a>00114
<a name="l00116"></a><a class="code" href="class_qwt_point3_d.html#a055a9d12fbdc279452ee6c056bd3ba8f">00116</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="class_qwt_point3_d.html#a055a9d12fbdc279452ee6c056bd3ba8f" title="Returns the x-coordinate of the point.">QwtPoint3D::x</a>()<span class="keyword"> const</span>
<a name="l00117"></a>00117 <span class="keyword"></span>{
<a name="l00118"></a>00118 <span class="keywordflow">return</span> d_x;
<a name="l00119"></a>00119 }
<a name="l00120"></a>00120
<a name="l00122"></a><a class="code" href="class_qwt_point3_d.html#ac2c90240ee705f3422202aeb6d5e0654">00122</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="class_qwt_point3_d.html#ac2c90240ee705f3422202aeb6d5e0654" title="Returns the y-coordinate of the point.">QwtPoint3D::y</a>()<span class="keyword"> const</span>
<a name="l00123"></a>00123 <span class="keyword"></span>{
<a name="l00124"></a>00124 <span class="keywordflow">return</span> d_y;
<a name="l00125"></a>00125 }
<a name="l00126"></a>00126
<a name="l00128"></a><a class="code" href="class_qwt_point3_d.html#afd56ba68ce1cfad4a4e477f45f0c85d4">00128</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="class_qwt_point3_d.html#afd56ba68ce1cfad4a4e477f45f0c85d4" title="Returns the z-coordinate of the point.">QwtPoint3D::z</a>()<span class="keyword"> const</span>
<a name="l00129"></a>00129 <span class="keyword"></span>{
<a name="l00130"></a>00130 <span class="keywordflow">return</span> d_z;
<a name="l00131"></a>00131 }
<a name="l00132"></a>00132
<a name="l00134"></a><a class="code" href="class_qwt_point3_d.html#a99ae15c21e43fac2c4b8755111b03ad0">00134</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> &<a class="code" href="class_qwt_point3_d.html#a99ae15c21e43fac2c4b8755111b03ad0" title="Returns a reference to the x-coordinate of the point.">QwtPoint3D::rx</a>()
<a name="l00135"></a>00135 {
<a name="l00136"></a>00136 <span class="keywordflow">return</span> d_x;
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138
<a name="l00140"></a><a class="code" href="class_qwt_point3_d.html#ab0894c41fdb85dcc7affe38acf33f48d">00140</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> &<a class="code" href="class_qwt_point3_d.html#ab0894c41fdb85dcc7affe38acf33f48d" title="Returns a reference to the y-coordinate of the point.">QwtPoint3D::ry</a>()
<a name="l00141"></a>00141 {
<a name="l00142"></a>00142 <span class="keywordflow">return</span> d_y;
<a name="l00143"></a>00143 }
<a name="l00144"></a>00144
<a name="l00146"></a><a class="code" href="class_qwt_point3_d.html#af76eb9c617ea48ab1050a79bac1d90eb">00146</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> &<a class="code" href="class_qwt_point3_d.html#af76eb9c617ea48ab1050a79bac1d90eb" title="Returns a reference to the z-coordinate of the point.">QwtPoint3D::rz</a>()
<a name="l00147"></a>00147 {
<a name="l00148"></a>00148 <span class="keywordflow">return</span> d_z;
<a name="l00149"></a>00149 }
<a name="l00150"></a>00150
<a name="l00152"></a><a class="code" href="class_qwt_point3_d.html#afe85919187fd62bc3db082d1e2b17bac">00152</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_qwt_point3_d.html#afe85919187fd62bc3db082d1e2b17bac" title="Sets the x-coordinate of the point to the value specified by x.">QwtPoint3D::setX</a>( <span class="keywordtype">double</span> x )
<a name="l00153"></a>00153 {
<a name="l00154"></a>00154 d_x = <a class="code" href="class_qwt_point3_d.html#a055a9d12fbdc279452ee6c056bd3ba8f" title="Returns the x-coordinate of the point.">x</a>;
<a name="l00155"></a>00155 }
<a name="l00156"></a>00156
<a name="l00158"></a><a class="code" href="class_qwt_point3_d.html#a986ba13d44e6960b4fb72795be4ff66a">00158</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_qwt_point3_d.html#a986ba13d44e6960b4fb72795be4ff66a" title="Sets the y-coordinate of the point to the value specified by y.">QwtPoint3D::setY</a>( <span class="keywordtype">double</span> y )
<a name="l00159"></a>00159 {
<a name="l00160"></a>00160 d_y = <a class="code" href="class_qwt_point3_d.html#ac2c90240ee705f3422202aeb6d5e0654" title="Returns the y-coordinate of the point.">y</a>;
<a name="l00161"></a>00161 }
<a name="l00162"></a>00162
<a name="l00164"></a><a class="code" href="class_qwt_point3_d.html#ae4bed4f5b955843dcf92302b16799e8b">00164</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_qwt_point3_d.html#ae4bed4f5b955843dcf92302b16799e8b" title="Sets the z-coordinate of the point to the value specified by z.">QwtPoint3D::setZ</a>( <span class="keywordtype">double</span> z )
<a name="l00165"></a>00165 {
<a name="l00166"></a>00166 d_z = <a class="code" href="class_qwt_point3_d.html#afd56ba68ce1cfad4a4e477f45f0c85d4" title="Returns the z-coordinate of the point.">z</a>;
<a name="l00167"></a>00167 }
<a name="l00168"></a>00168
<a name="l00172"></a><a class="code" href="class_qwt_point3_d.html#a611b2608fdbe8099ae987870a10b38a6">00172</a> <span class="keyword">inline</span> QPointF <a class="code" href="class_qwt_point3_d.html#a611b2608fdbe8099ae987870a10b38a6">QwtPoint3D::toPoint</a>()<span class="keyword"> const</span>
<a name="l00173"></a>00173 <span class="keyword"></span>{
<a name="l00174"></a>00174 <span class="keywordflow">return</span> QPointF( d_x, d_y );
<a name="l00175"></a>00175 }
<a name="l00176"></a>00176
<a name="l00178"></a><a class="code" href="class_qwt_point3_d.html#aaafd119aea020d1e7e44360fd1172c22">00178</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="class_qwt_point3_d.html#aaafd119aea020d1e7e44360fd1172c22" title="Returns true if this point and other are equal; otherwise returns false.">QwtPoint3D::operator==</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a> &other )<span class="keyword"> const</span>
<a name="l00179"></a>00179 <span class="keyword"></span>{
<a name="l00180"></a>00180 <span class="keywordflow">return</span> ( d_x == other.d_x ) && ( d_y == other.d_y ) && ( d_z == other.d_z );
<a name="l00181"></a>00181 }
<a name="l00182"></a>00182
<a name="l00184"></a><a class="code" href="class_qwt_point3_d.html#a38b3c81b7dfce567dfc2993db1aa6d74">00184</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="class_qwt_point3_d.html#a38b3c81b7dfce567dfc2993db1aa6d74" title="Returns true if this rect and other are different; otherwise returns false.">QwtPoint3D::operator!=</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_point3_d.html" title="QwtPoint3D class defines a 3D point in double coordinates.">QwtPoint3D</a> &other )<span class="keyword"> const</span>
<a name="l00185"></a>00185 <span class="keyword"></span>{
<a name="l00186"></a>00186 <span class="keywordflow">return</span> !<a class="code" href="class_qwt_point3_d.html#aaafd119aea020d1e7e44360fd1172c22" title="Returns true if this point and other are equal; otherwise returns false.">operator==</a>( other );
<a name="l00187"></a>00187 }
<a name="l00188"></a>00188
<a name="l00189"></a>00189 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>