xref: /aoo4110/main/svx/inc/svx/polygn3d.hxx (revision b1cdbd2c)
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 _E3D_POLYGON3D_HXX
25 #define _E3D_POLYGON3D_HXX
26 
27 #include <svx/obj3d.hxx>
28 #include "svx/svxdllapi.h"
29 
30 class SVX_DLLPUBLIC E3dPolygonObj : public E3dCompoundObject
31 {
32 private:
33 	// Parameter
34 	basegfx::B3DPolyPolygon	aPolyPoly3D;
35 	basegfx::B3DPolyPolygon	aPolyNormals3D;
36 	basegfx::B2DPolyPolygon	aPolyTexture2D;
37 	sal_Bool			bLineOnly;
38 
39 	SVX_DLLPRIVATE void CreateDefaultNormals();
40 	SVX_DLLPRIVATE void CreateDefaultTexture();
41 
42 protected:
43     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
44 
45 public:
46 	void SetPolyPolygon3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D);
47 	void SetPolyNormals3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D);
48 	void SetPolyTexture2D(const basegfx::B2DPolyPolygon& rNewPolyPoly2D);
49 
50 	TYPEINFO();
51 
52 	E3dPolygonObj(
53 		E3dDefaultAttributes& rDefault,
54 		const basegfx::B3DPolyPolygon& rPolyPoly3D,
55 		sal_Bool bLinOnly=sal_False);
56 	E3dPolygonObj(
57 		E3dDefaultAttributes& rDefault,
58 		const basegfx::B3DPolyPolygon& rPolyPoly3D,
59 		const basegfx::B3DPolyPolygon& rPolyNormals3D,
60 		sal_Bool bLinOnly=sal_False);
61 	E3dPolygonObj(
62 		E3dDefaultAttributes& rDefault,
63 		const basegfx::B3DPolyPolygon& rPolyPoly3D,
64 		const basegfx::B3DPolyPolygon& rPolyNormals3D,
65 		const basegfx::B2DPolyPolygon& rPolyTexture2D,
66 		sal_Bool bLinOnly=sal_False);
67 
68 	E3dPolygonObj();
69 	virtual ~E3dPolygonObj();
70 
GetPolyPolygon3D() const71 	const basegfx::B3DPolyPolygon& GetPolyPolygon3D() const { return aPolyPoly3D; }
GetPolyNormals3D() const72 	const basegfx::B3DPolyPolygon& GetPolyNormals3D() const { return aPolyNormals3D; }
GetPolyTexture2D() const73 	const basegfx::B2DPolyPolygon& GetPolyTexture2D() const { return aPolyTexture2D; }
74 
75 	virtual sal_uInt16 GetObjIdentifier() const;
76 	virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
77 
78 	virtual void operator=(const SdrObject&);
79 
80 	// LineOnly?
GetLineOnly()81 	sal_Bool GetLineOnly() { return bLineOnly; }
82 	void SetLineOnly(sal_Bool bNew);
83 };
84 
85 #endif			// _E3D_POLYGON3D_HXX
86