1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
15 template <typename TYPE
> class Tuple3D
26 This parameter is used to initialize the X-coordinate
30 This parameter is used to initialize the Y-coordinate
34 This parameter is used to initialize the Z-coordinate
37 Tuple3D(TYPE x
, TYPE y
, TYPE z
)
44 /// Get X-Coordinate of 3D Tuple
45 TYPE
getX() const { return mnX
; }
47 /// Get Y-Coordinate of 3D Tuple
48 TYPE
getY() const { return mnY
; }
50 /// Get Z-Coordinate of 3D Tuple
51 TYPE
getZ() const { return mnZ
; }
53 /// Set X-Coordinate of 3D Tuple
54 void setX(TYPE fX
) { mnX
= fX
; }
56 /// Set Y-Coordinate of 3D Tuple
57 void setY(TYPE fY
) { mnY
= fY
; }
59 /// Set Z-Coordinate of 3D Tuple
60 void setZ(TYPE fZ
) { mnZ
= fZ
; }
64 Tuple3D
& operator+=(const Tuple3D
& rTup
)
72 Tuple3D
& operator-=(const Tuple3D
& rTup
)
80 Tuple3D
& operator/=(const Tuple3D
& rTup
)
88 Tuple3D
& operator*=(const Tuple3D
& rTup
)
96 Tuple3D
& operator*=(TYPE t
)
104 Tuple3D
& operator/=(TYPE t
)
112 bool operator==(const Tuple3D
& rTup
) const
114 return mnX
== rTup
.mnX
&& mnY
== rTup
.mnY
&& mnZ
== rTup
.mnZ
;
117 bool operator!=(const Tuple3D
& rTup
) const { return !operator==(rTup
); }
120 } // end of namespace basegfx
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */