Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
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.
15 : : *
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).
21 : : *
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.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SHADOWPRIMITIVE3D_HXX
30 : : #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SHADOWPRIMITIVE3D_HXX
31 : :
32 : : #include <drawinglayer/drawinglayerdllapi.h>
33 : :
34 : : #include <drawinglayer/primitive3d/groupprimitive3d.hxx>
35 : : #include <basegfx/matrix/b2dhommatrix.hxx>
36 : : #include <basegfx/color/bcolor.hxx>
37 : :
38 : : //////////////////////////////////////////////////////////////////////////////
39 : :
40 : : namespace drawinglayer
41 : : {
42 : : namespace primitive3d
43 : : {
44 : : /** ShadowPrimitive3D class
45 : :
46 : : This 3D grouping primitive is used to define a shadow for
47 : : 3d geometry by embedding it. The shadow of 3D objects are
48 : : 2D polygons, so the shadow transformation is a 2D transformation.
49 : :
50 : : If the Shadow3D flag is set, the shadow definition has to be
51 : : combined with the scene and camera definition to create the correct
52 : : projected shadow 2D-Polygons.
53 : : */
54 [ # # ][ # # ]: 0 : class DRAWINGLAYER_DLLPUBLIC ShadowPrimitive3D : public GroupPrimitive3D
55 : : {
56 : : protected:
57 : : /// 2D shadow definition
58 : : basegfx::B2DHomMatrix maShadowTransform;
59 : : basegfx::BColor maShadowColor;
60 : : double mfShadowTransparence;
61 : :
62 : : /// bitfield
63 : : unsigned mbShadow3D : 1;
64 : :
65 : : public:
66 : : /// constructor
67 : : ShadowPrimitive3D(
68 : : const basegfx::B2DHomMatrix& rShadowTransform,
69 : : const basegfx::BColor& rShadowColor,
70 : : double fShadowTransparence,
71 : : bool bShadow3D,
72 : : const Primitive3DSequence& rChildren);
73 : :
74 : : /// data read access
75 : 0 : const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; }
76 : 0 : const basegfx::BColor& getShadowColor() const { return maShadowColor; }
77 : 0 : double getShadowTransparence() const { return mfShadowTransparence; }
78 : 0 : bool getShadow3D() const { return mbShadow3D; }
79 : :
80 : : /// compare operator
81 : : virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
82 : :
83 : : /// provide unique ID
84 : : DeclPrimitrive3DIDBlock()
85 : : };
86 : : } // end of namespace primitive3d
87 : : } // end of namespace drawinglayer
88 : :
89 : : //////////////////////////////////////////////////////////////////////////////
90 : :
91 : : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SHADOWPRIMITIVE3D_HXX
92 : :
93 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|