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_SHADOWPRIMITIVE3D_HXX 29 #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SHADOWPRIMITIVE3D_HXX 30 31 #include <drawinglayer/primitive3d/groupprimitive3d.hxx> 32 #include <basegfx/matrix/b2dhommatrix.hxx> 33 #include <basegfx/color/bcolor.hxx> 34 35 ////////////////////////////////////////////////////////////////////////////// 36 37 namespace drawinglayer 38 { 39 namespace primitive3d 40 { 41 /** ShadowPrimitive3D class 42 43 This 3D grouping primitive is used to define a shadow for 44 3d geometry by embedding it. The shadow of 3D objects are 45 2D polygons, so the shadow transformation is a 2D transformation. 46 47 If the Shadow3D flag is set, the shadow definition has to be 48 combined with the scene and camera definition to create the correct 49 projected shadow 2D-Polygons. 50 */ 51 class ShadowPrimitive3D : public GroupPrimitive3D 52 { 53 protected: 54 /// 2D shadow definition 55 basegfx::B2DHomMatrix maShadowTransform; 56 basegfx::BColor maShadowColor; 57 double mfShadowTransparence; 58 59 /// bitfield 60 unsigned mbShadow3D : 1; 61 62 public: 63 /// constructor 64 ShadowPrimitive3D( 65 const basegfx::B2DHomMatrix& rShadowTransform, 66 const basegfx::BColor& rShadowColor, 67 double fShadowTransparence, 68 bool bShadow3D, 69 const Primitive3DSequence& rChildren); 70 71 /// data read access 72 const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; } 73 const basegfx::BColor& getShadowColor() const { return maShadowColor; } 74 double getShadowTransparence() const { return mfShadowTransparence; } 75 bool getShadow3D() const { return mbShadow3D; } 76 77 /// compare operator 78 virtual bool operator==(const BasePrimitive3D& rPrimitive) 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_SHADOWPRIMITIVE3D_HXX 89 90 ////////////////////////////////////////////////////////////////////////////// 91 // eof 92