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_SDRPOLYPOLYGONPRIMITIVE3D_HXX
25 #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRPOLYPOLYGONPRIMITIVE3D_HXX
26 
27 #include <drawinglayer/drawinglayerdllapi.h>
28 #include <drawinglayer/primitive3d/sdrprimitive3d.hxx>
29 
30 //////////////////////////////////////////////////////////////////////////////
31 
32 namespace drawinglayer
33 {
34 	namespace primitive3d
35 	{
36         /** SdrPolyPolygonPrimitive3D class
37 
38             This 3D primitive defines a PolyPolgon in space which may have
39             Line- and FillStyles and extra 3D surface attributes. It is assumed
40             that the given 3D PolyPolgon (which may contain texture and normal
41             information) is planar in 3D.
42 
43             The decomposition will include all needed 3D data for visualisation,
44             including FatLines and fill styles.
45          */
46 		class DRAWINGLAYER_DLLPUBLIC SdrPolyPolygonPrimitive3D : public SdrPrimitive3D
47 		{
48 		private:
49 			/// the planar polyPolygon evtl with normals and texture coordinates
50 			basegfx::B3DPolyPolygon					maPolyPolygon3D;
51 
52 		protected:
53 			/// local decomposition.
54 			virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
55 
56 		public:
57             /// constructor
58 			SdrPolyPolygonPrimitive3D(
59 				const basegfx::B3DPolyPolygon& rPolyPolygon3D,
60 				const basegfx::B3DHomMatrix& rTransform,
61 				const basegfx::B2DVector& rTextureSize,
62 				const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
63 				const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
64 
65 			/// data access
getPolyPolygon3D() const66 			const basegfx::B3DPolyPolygon& getPolyPolygon3D() const { return maPolyPolygon3D; }
67 
68 			/// compare operator
69 			virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
70 
71 			/// get range
72 			virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
73 
74 			/// provide unique ID
75 			DeclPrimitrive3DIDBlock()
76 		};
77 	} // end of namespace primitive3d
78 } // end of namespace drawinglayer
79 
80 //////////////////////////////////////////////////////////////////////////////
81 
82 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRPOLYPOLYGONPRIMITIVE3D_HXX
83 
84 //////////////////////////////////////////////////////////////////////////////
85 // eof
86