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: dlight3d.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 _E3D_DLIGHT3D_HXX
32 #define _E3D_DLIGHT3D_HXX
34 #ifndef _E3D_LIGHT3D_HXX
35 #include <bf_svx/light3d.hxx>
39 /*************************************************************************
41 |* gerichtete Lichtquelle, aDirection zeigt ZUR Lichtquelle (also den
42 |* Lichtstrahlen entgegensetzt); die Position (geerbt von E3dLight) hat
43 |* auf die Lichtberechnung keinen Einfluss, sondern dient nur der
44 |* Anordnung in der Szene (fuer evtl. spaetere interaktive Bearbeitung)
46 \************************************************************************/
48 class E3dDistantLight
: public E3dLight
53 virtual void CreateLightObj();
57 E3dDistantLight(const Vector3D
& rPos
,
58 const Vector3D
& rDirection
,
60 double fLightIntensity
= 1.0);
63 aDirection(Vector3D(0, 1, 0))
67 virtual ~E3dDistantLight();
69 virtual UINT16
GetObjIdentifier() const;
71 virtual FASTBOOL
CalcLighting(Color
& rNewColor
,
73 const Vector3D
& rPntNormal
,
74 const Color
& rPntColor
);
76 const Vector3D
& GetDirection() const { return aDirection
; }
77 void SetDirection(const Vector3D
& rNewDir
);
79 virtual void WriteData(SvStream
& rOut
) const;
80 virtual void ReadData(const SdrObjIOHeader
& rHead
, SvStream
& rIn
);
84 }//end of namespace binfilter
85 #endif // _E3D_DLIGHT3D_HXX