bump product version to 4.1.6.2
[LibreOffice.git] / include / basegfx / point / b3ipoint.hxx
blobe80514c13de2808db46e7dd9f98b94816dd287bb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _BGFX_POINT_B3IPOINT_HXX
21 #define _BGFX_POINT_B3IPOINT_HXX
23 #include <basegfx/tuple/b3ituple.hxx>
24 #include <basegfx/basegfxdllapi.h>
26 namespace basegfx
28 // predeclaration
29 class B3DHomMatrix;
31 /** Base Point class with three sal_Int32 values
33 This class derives all operators and common handling for
34 a 3D data class from B3ITuple. All necessary extensions
35 which are special for points will be added here.
37 @see B3ITuple
39 class BASEGFX_DLLPUBLIC SAL_WARN_UNUSED B3IPoint : public ::basegfx::B3ITuple
41 public:
42 /** Create a 3D Point
44 The point is initialized to (0, 0, 0)
46 B3IPoint()
47 : B3ITuple()
50 /** Create a 3D Point
52 @param nX
53 This parameter is used to initialize the X-coordinate
54 of the 3D Point.
56 @param nY
57 This parameter is used to initialize the Y-coordinate
58 of the 3D Point.
60 @param nZ
61 This parameter is used to initialize the Z-coordinate
62 of the 3D Point.
64 B3IPoint(sal_Int32 nX, sal_Int32 nY, sal_Int32 nZ)
65 : B3ITuple(nX, nY, nZ)
68 /** Create a copy of a 3D Point
70 @param rVec
71 The 3D Point which will be copied.
73 B3IPoint(const B3IPoint& rVec)
74 : B3ITuple(rVec)
77 /** constructor with tuple to allow copy-constructing
78 from B3ITuple-based classes
80 B3IPoint(const ::basegfx::B3ITuple& rTuple)
81 : B3ITuple(rTuple)
84 ~B3IPoint()
87 /** *=operator to allow usage from B3IPoint, too
89 B3IPoint& operator*=( const B3IPoint& rPnt )
91 mnX *= rPnt.mnX;
92 mnY *= rPnt.mnY;
93 mnZ *= rPnt.mnZ;
94 return *this;
97 /** *=operator to allow usage from B3IPoint, too
99 B3IPoint& operator*=(sal_Int32 t)
101 mnX *= t;
102 mnY *= t;
103 mnZ *= t;
104 return *this;
107 /** assignment operator to allow assigning the results
108 of B3ITuple calculations
110 B3IPoint& operator=( const ::basegfx::B3ITuple& rVec )
112 mnX = rVec.getX();
113 mnY = rVec.getY();
114 mnZ = rVec.getZ();
115 return *this;
118 /** Transform point by given transformation matrix.
120 The translational components of the matrix are, in
121 contrast to B3DVector, applied.
123 B3IPoint& operator*=( const ::basegfx::B3DHomMatrix& rMat );
125 } // end of namespace basegfx
127 #endif /* _BGFX_POINT_B3IPOINT_HXX */
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */