1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRDECOMPOSITIONTOOLS3D_HXX
25 #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRDECOMPOSITIONTOOLS3D_HXX
26 
27 #include <drawinglayer/drawinglayerdllapi.h>
28 #include <drawinglayer/primitive3d/baseprimitive3d.hxx>
29 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
30 #include <vector>
31 
32 //////////////////////////////////////////////////////////////////////////////
33 // predefines
34 
35 namespace basegfx {
36 	class B3DPolygon;
37 	class B3DPolyPolygon;
38 	class B3DHomMatrix;
39 	class B2DVector;
40 }
41 
42 namespace drawinglayer { namespace attribute {
43 	class SdrLineAttribute;
44 	class SdrFillAttribute;
45 	class Sdr3DObjectAttribute;
46 	class FillGradientAttribute;
47 	class SdrShadowAttribute;
48 }}
49 
50 //////////////////////////////////////////////////////////////////////////////
51 
52 namespace drawinglayer
53 {
54 	namespace primitive3d
55 	{
56 		// #i98295#
57 		basegfx::B3DRange getRangeFrom3DGeometry(::std::vector< basegfx::B3DPolyPolygon >& rFill);
58 		void applyNormalsKindSphereTo3DGeometry(::std::vector< basegfx::B3DPolyPolygon >& rFill, const basegfx::B3DRange& rRange);
59 		void applyNormalsKindFlatTo3DGeometry(::std::vector< basegfx::B3DPolyPolygon >& rFill);
60 		void applyNormalsInvertTo3DGeometry(::std::vector< basegfx::B3DPolyPolygon >& rFill);
61 
62 		// #i98314#
63 		void applyTextureTo3DGeometry(
64 			::com::sun::star::drawing::TextureProjectionMode eModeX,
65 			::com::sun::star::drawing::TextureProjectionMode eModeY,
66 			::std::vector< basegfx::B3DPolyPolygon >& rFill,
67 			const basegfx::B3DRange& rRange,
68 			const basegfx::B2DVector& rTextureSize);
69 
70 		Primitive3DSequence create3DPolyPolygonLinePrimitives(
71 			const basegfx::B3DPolyPolygon& rUnitPolyPolygon,
72 			const basegfx::B3DHomMatrix& rObjectTransform,
73 			const attribute::SdrLineAttribute& rLine);
74 
75 		Primitive3DSequence create3DPolyPolygonFillPrimitives(
76 			const ::std::vector< basegfx::B3DPolyPolygon >& r3DPolyPolygonVector,
77 			const basegfx::B3DHomMatrix& rObjectTransform,
78 			const basegfx::B2DVector& rTextureSize,
79 			const attribute::Sdr3DObjectAttribute& aSdr3DObjectAttribute,
80 			const attribute::SdrFillAttribute& rFill,
81 			const attribute::FillGradientAttribute& rFillGradient);
82 
83 		Primitive3DSequence createShadowPrimitive3D(
84 			const Primitive3DSequence& rSource,
85 			const attribute::SdrShadowAttribute& rShadow,
86 			bool bShadow3D);
87 
88         Primitive3DSequence createHiddenGeometryPrimitives3D(
89 			const ::std::vector< basegfx::B3DPolyPolygon >& r3DPolyPolygonVector,
90 			const basegfx::B3DHomMatrix& rObjectTransform,
91 			const basegfx::B2DVector& rTextureSize,
92 			const attribute::Sdr3DObjectAttribute& aSdr3DObjectAttribute);
93 
94 	} // end of namespace primitive3d
95 } // end of namespace drawinglayer
96 
97 //////////////////////////////////////////////////////////////////////////////
98 
99 #endif //_DRAWINGLAYER_PRIMITIVE3D_SDRDECOMPOSITIONTOOLS3D_HXX
100 
101 // eof
102