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
19 // temporary alias mnX with mfX, mnY with mfY and mnZ with mfZ
38 This parameter is used to initialize the X-coordinate
42 This parameter is used to initialize the Y-coordinate
46 This parameter is used to initialize the Z-coordinate
49 Tuple3D(TYPE x
, TYPE y
, TYPE z
)
56 /// Get X-Coordinate of 3D Tuple
57 TYPE
getX() const { return mnX
; }
59 /// Get Y-Coordinate of 3D Tuple
60 TYPE
getY() const { return mnY
; }
62 /// Get Z-Coordinate of 3D Tuple
63 TYPE
getZ() const { return mnZ
; }
65 /// Set X-Coordinate of 3D Tuple
66 void setX(TYPE fX
) { mnX
= fX
; }
68 /// Set Y-Coordinate of 3D Tuple
69 void setY(TYPE fY
) { mnY
= fY
; }
71 /// Set Z-Coordinate of 3D Tuple
72 void setZ(TYPE fZ
) { mnZ
= fZ
; }
76 Tuple3D
& operator+=(const Tuple3D
& rTup
)
84 Tuple3D
& operator-=(const Tuple3D
& rTup
)
92 Tuple3D
& operator/=(const Tuple3D
& rTup
)
100 Tuple3D
& operator*=(const Tuple3D
& rTup
)
108 Tuple3D
& operator*=(TYPE t
)
116 Tuple3D
& operator/=(TYPE t
)
124 bool operator==(const Tuple3D
& rTup
) const
126 return mfX
== rTup
.mfX
&& mfY
== rTup
.mfY
&& mfZ
== rTup
.mfZ
;
129 bool operator!=(const Tuple3D
& rTup
) const { return !operator==(rTup
); }
132 } // end of namespace basegfx
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */