Bump for 3.6-28
[LibreOffice.git] / drawinglayer / source / primitive3d / polypolygonprimitive3d.cxx
blobc61150ddd87a774691d0e8bed1e4908c02f73c7d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx>
30 #include <basegfx/polygon/b3dpolypolygontools.hxx>
31 #include <basegfx/tools/canvastools.hxx>
32 #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx>
34 //////////////////////////////////////////////////////////////////////////////
36 using namespace com::sun::star;
38 //////////////////////////////////////////////////////////////////////////////
40 namespace drawinglayer
42 namespace primitive3d
44 PolyPolygonMaterialPrimitive3D::PolyPolygonMaterialPrimitive3D(
45 const basegfx::B3DPolyPolygon& rPolyPolygon,
46 const attribute::MaterialAttribute3D& rMaterial,
47 bool bDoubleSided)
48 : BasePrimitive3D(),
49 maPolyPolygon(rPolyPolygon),
50 maMaterial(rMaterial),
51 mbDoubleSided(bDoubleSided)
55 bool PolyPolygonMaterialPrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const
57 if(BasePrimitive3D::operator==(rPrimitive))
59 const PolyPolygonMaterialPrimitive3D& rCompare = (PolyPolygonMaterialPrimitive3D&)rPrimitive;
61 return (getB3DPolyPolygon() == rCompare.getB3DPolyPolygon()
62 && getMaterial() == rCompare.getMaterial()
63 && getDoubleSided() == rCompare.getDoubleSided());
66 return false;
69 basegfx::B3DRange PolyPolygonMaterialPrimitive3D::getB3DRange(const geometry::ViewInformation3D& /*rViewInformation*/) const
71 return basegfx::tools::getRange(getB3DPolyPolygon());
74 // provide unique ID
75 ImplPrimitrive3DIDBlock(PolyPolygonMaterialPrimitive3D, PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D)
77 } // end of namespace primitive3d
78 } // end of namespace drawinglayer
80 //////////////////////////////////////////////////////////////////////////////
81 // eof
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */