1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYPOLYGONPRIMITIVE3D_HXX 29 #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYPOLYGONPRIMITIVE3D_HXX 30 31 #include <drawinglayer/drawinglayerdllapi.h> 32 #include <drawinglayer/primitive3d/baseprimitive3d.hxx> 33 #include <basegfx/polygon/b3dpolypolygon.hxx> 34 #include <drawinglayer/attribute/materialattribute3d.hxx> 35 36 ////////////////////////////////////////////////////////////////////////////// 37 38 namespace drawinglayer 39 { 40 namespace primitive3d 41 { 42 /** PolyPolygonMaterialPrimitive3D class 43 44 This primitive defines a planar 3D PolyPolygon filled with a single color. 45 This is one of the non-decomposable primitives, so a renderer 46 should proccess it. 47 48 It is assumed here that the PolyPolgon is a single plane in 3D. 49 */ 50 class DRAWINGLAYER_DLLPUBLIC PolyPolygonMaterialPrimitive3D : public BasePrimitive3D 51 { 52 private: 53 /// the PolyPolygon geometry 54 basegfx::B3DPolyPolygon maPolyPolygon; 55 56 /// the fill parameters 57 attribute::MaterialAttribute3D maMaterial; 58 59 /// bitfield 60 unsigned mbDoubleSided : 1; 61 62 public: 63 /// constructor 64 PolyPolygonMaterialPrimitive3D( 65 const basegfx::B3DPolyPolygon& rPolyPolygon, 66 const attribute::MaterialAttribute3D& rMaterial, 67 bool bDoubleSided); 68 69 /// data read access 70 const basegfx::B3DPolyPolygon& getB3DPolyPolygon() const { return maPolyPolygon; } 71 const attribute::MaterialAttribute3D& getMaterial() const { return maMaterial; } 72 bool getDoubleSided() const { return mbDoubleSided; } 73 74 /// compare operator 75 virtual bool operator==(const BasePrimitive3D& rPrimitive) const; 76 77 /// get range 78 virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; 79 80 /// provide unique ID 81 DeclPrimitrive3DIDBlock() 82 }; 83 } // end of namespace primitive3d 84 } // end of namespace drawinglayer 85 86 ////////////////////////////////////////////////////////////////////////////// 87 88 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYPOLYGONPRIMITIVE3D_HXX 89 90 ////////////////////////////////////////////////////////////////////////////// 91 // eof 92