1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: b3dvolum.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _B3D_VOLUM_HXX
32 #define _B3D_VOLUM_HXX
34 #ifndef _SVX_VECTOR3D_HXX
35 #include "vector3d.hxx"
43 #include <tools/stream.hxx>
46 /*************************************************************************
48 |* dreidimensionales Volumen, symmetrisch zu den Koordinatenachsen
50 \************************************************************************/
53 class Vol3DPointIterator
;
57 // friend class binfilter::Vol3DPointIterator; //STRIP008
58 friend class Vol3DPointIterator
;
64 B3dVolume(const Vector3D
& rPos
, const Vector3D
& r3DSize
,
65 BOOL bPosIsCenter
= TRUE
);
71 B3dVolume
& Union(const B3dVolume
& rVol2
);
72 B3dVolume
& Union(const Vector3D
& rVec
);
74 const Vector3D
& MinVec() const { return aMinVec
; }
75 Vector3D
& MinVec() { return aMinVec
; }
77 const Vector3D
& MaxVec() const { return aMaxVec
; }
78 Vector3D
& MaxVec() { return aMaxVec
; }
80 double GetWidth() const { return aMaxVec
.X() - aMinVec
.X(); }
81 double GetHeight() const { return aMaxVec
.Y() - aMinVec
.Y(); }
82 double GetDepth() const { return aMaxVec
.Z() - aMinVec
.Z(); }
84 friend SvStream
& operator>>(SvStream
& rIStream
, B3dVolume
&);
85 friend SvStream
& operator<<(SvStream
& rOStream
, const B3dVolume
&);
87 }//end of namespace binfilter
90 #endif // _B3D_VOLUM_HXX