Kig Python Scripting API Documentation
Overview
Class Hierarchy
Classes
Classes (annotated)
Members
kig
misc
coordinate.h
1
22
#ifndef KIG_MISC_COORDINATE_H
23
#define KIG_MISC_COORDINATE_H
24
25
class
TQPoint;
26
class
kdbgstream;
27
33
class
Coordinate
34
{
35
public
:
36
static
Coordinate
fromTQPoint(
const
TQPoint& p );
37
41
Coordinate
(
double
x
,
double
y
);
45
Coordinate
(
const
Coordinate
& p );
53
Coordinate
();
54
~
Coordinate
() {}
55
67
static
Coordinate
invalidCoord
();
71
bool
valid
()
const
;
72
75
double
distance
(
const
Coordinate
& p )
const
;
80
double
length
()
const
;
85
inline
double
squareLength
()
const
;
88
const
Coordinate
operator-
()
const
;
96
const
Coordinate
orthogonal
()
const
;
100
const
Coordinate
round
()
const
;
104
const
Coordinate
normalize
(
double
length = 1 )
const
;
105
TQPoint toTQPoint()
const
;
106
107
Coordinate
& operator= (
const
Coordinate
& c );
110
Coordinate
&
operator+=
(
const
Coordinate
& c );
113
Coordinate
&
operator-=
(
const
Coordinate
& c );
116
Coordinate
&
operator*=
(
double
r );
119
Coordinate
&
operator*=
(
int
r );
122
Coordinate
&
operator/=
(
double
r );
123
public
:
126
double
x
;
129
double
y
;
130
131
friend
kdbgstream& operator<<( kdbgstream& s,
const
Coordinate
& t );
134
friend
const
Coordinate
operator+
(
const
Coordinate
& a,
const
Coordinate
& b );
137
friend
const
Coordinate
operator-
(
const
Coordinate
& a,
const
Coordinate
& b );
140
friend
const
Coordinate
operator*
(
const
Coordinate
& a,
double
r );
143
friend
const
Coordinate
operator/
(
const
Coordinate
& a,
double
r );
146
friend
double
operator*
(
const
Coordinate
& a,
const
Coordinate
& b );
149
friend
bool
operator==
(
const
Coordinate
&,
const
Coordinate
& );
152
friend
bool
operator!=
(
const
Coordinate
&,
const
Coordinate
& );
153
};
154
155
const
Coordinate
operator/ (
const
Coordinate
& a,
double
r );
156
kdbgstream& operator<<( kdbgstream& s,
const
Coordinate
& t );
157
const
Coordinate
operator+ (
const
Coordinate
& a,
const
Coordinate
& b );
158
const
Coordinate
operator- (
const
Coordinate
& a,
const
Coordinate
& b );
159
const
Coordinate
operator* (
const
Coordinate
& a,
double
r );
160
const
Coordinate
operator* (
double
r,
const
Coordinate
& a );
161
double
operator*(
const
Coordinate
& a,
const
Coordinate
& b );
162
163
double
Coordinate::squareLength
()
const
164
{
165
return
x
*
x
+
y
*
y
;
166
}
167
168
#endif
169
This file is part of the documentation for kdelibs 0.10.7.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Thu Jun 13 2013 08:08:48 by
doxygen
1.8.1.2 written by
Dimitri van Heesch
, © 1997-2001