xref: /AOO41X/main/svx/inc/svx/deflt3d.hxx (revision 3334a7e6acdae9820fa1a6f556bb10129a8de6b2)
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_DEFLT3D_HXX
25 #define _E3D_DEFLT3D_HXX
26 
27 #include <basegfx/point/b3dpoint.hxx>
28 #include <basegfx/vector/b3dvector.hxx>
29 #include "svx/svxdllapi.h"
30 #include <tools/color.hxx>
31 
32 /*************************************************************************
33 |*
34 |* Klasse zum verwalten der 3D-Default Attribute
35 |*
36 \************************************************************************/
37 
38 class SVX_DLLPUBLIC E3dDefaultAttributes
39 {
40 private:
41     // Compound-Objekt
42     Color               aDefaultAmbientColor;
43     sal_Bool                bDefaultCreateNormals;
44     sal_Bool                bDefaultCreateTexture;
45 
46     // Cube-Objekt
47     basegfx::B3DPoint   aDefaultCubePos;
48     basegfx::B3DVector  aDefaultCubeSize;
49     sal_uInt16              nDefaultCubeSideFlags;
50     sal_Bool                bDefaultCubePosIsCenter;
51 
52     // Sphere-Objekt
53     basegfx::B3DPoint   aDefaultSphereCenter;
54     basegfx::B3DVector  aDefaultSphereSize;
55 
56     // Lathe-Objekt
57     long                nDefaultLatheEndAngle;
58     sal_Bool                bDefaultLatheSmoothed;
59     sal_Bool                bDefaultLatheSmoothFrontBack;
60     sal_Bool                bDefaultLatheCharacterMode;
61     sal_Bool                bDefaultLatheCloseFront;
62     sal_Bool                bDefaultLatheCloseBack;
63 
64     // Extrude-Objekt
65     sal_Bool                bDefaultExtrudeSmoothed;
66     sal_Bool                bDefaultExtrudeSmoothFrontBack;
67     sal_Bool                bDefaultExtrudeCharacterMode;
68     sal_Bool                bDefaultExtrudeCloseFront;
69     sal_Bool                bDefaultExtrudeCloseBack;
70 
71 public:
72     // Konstruktor
73     E3dDefaultAttributes();
74 
75     // Defaults zuruecksetzen
76     void Reset();
77 
78     // Getter/Setter fuer Default-Werte aller 3D-Objekte
79     // Compound-Objekt
GetDefaultAmbientColor()80     const Color& GetDefaultAmbientColor() { return aDefaultAmbientColor; }
SetDefaultAmbientColor(const Color & rNew)81     void SetDefaultAmbientColor(const Color& rNew) { aDefaultAmbientColor = rNew; }
82 
GetDefaultCreateNormals() const83     sal_Bool GetDefaultCreateNormals() const { return bDefaultCreateNormals; }
SetDefaultCreateNormals(const sal_Bool bNew)84     void SetDefaultCreateNormals(const sal_Bool bNew) { bDefaultCreateNormals = bNew; }
GetDefaultCreateTexture() const85     sal_Bool GetDefaultCreateTexture() const { return bDefaultCreateTexture; }
SetDefaultCreateTexture(const sal_Bool bNew)86     void SetDefaultCreateTexture(const sal_Bool bNew) { bDefaultCreateTexture = bNew; }
87 
88     // Cube-Objekt
GetDefaultCubePos()89     const basegfx::B3DPoint& GetDefaultCubePos() { return aDefaultCubePos; }
SetDefaultCubePos(const basegfx::B3DPoint & rNew)90     void SetDefaultCubePos(const basegfx::B3DPoint& rNew) { aDefaultCubePos = rNew; }
GetDefaultCubeSize()91     const basegfx::B3DVector& GetDefaultCubeSize() { return aDefaultCubeSize; }
SetDefaultCubeSize(const basegfx::B3DVector & rNew)92     void SetDefaultCubeSize(const basegfx::B3DVector& rNew) { aDefaultCubeSize = rNew; }
GetDefaultCubeSideFlags() const93     sal_uInt16 GetDefaultCubeSideFlags() const { return nDefaultCubeSideFlags; }
SetDefaultCubeSideFlags(const sal_uInt16 nNew)94     void SetDefaultCubeSideFlags(const sal_uInt16 nNew) { nDefaultCubeSideFlags = nNew; }
GetDefaultCubePosIsCenter() const95     sal_Bool GetDefaultCubePosIsCenter() const { return bDefaultCubePosIsCenter; }
SetDefaultCubePosIsCenter(const sal_Bool bNew)96     void SetDefaultCubePosIsCenter(const sal_Bool bNew) { bDefaultCubePosIsCenter = bNew; }
97 
98     // Sphere-Objekt
GetDefaultSphereCenter()99     const basegfx::B3DPoint& GetDefaultSphereCenter() { return aDefaultSphereCenter; }
SetDefaultSphereCenter(const basegfx::B3DPoint & rNew)100     void SetDefaultSphereCenter(const basegfx::B3DPoint& rNew) { aDefaultSphereCenter = rNew; }
GetDefaultSphereSize()101     const basegfx::B3DVector& GetDefaultSphereSize() { return aDefaultSphereSize; }
SetDefaultSphereSize(const basegfx::B3DPoint & rNew)102     void SetDefaultSphereSize(const basegfx::B3DPoint& rNew) { aDefaultSphereSize = rNew; }
103 
104     // Lathe-Objekt
GetDefaultLatheEndAngle() const105     long GetDefaultLatheEndAngle() const { return nDefaultLatheEndAngle; }
SetDefaultLatheEndAngle(const long nNew)106     void SetDefaultLatheEndAngle(const long nNew) { nDefaultLatheEndAngle = nNew; }
GetDefaultLatheSmoothed() const107     sal_Bool GetDefaultLatheSmoothed() const { return bDefaultLatheSmoothed; }
SetDefaultLatheSmoothed(const sal_Bool bNew)108     void SetDefaultLatheSmoothed(const sal_Bool bNew) { bDefaultLatheSmoothed = bNew; }
GetDefaultLatheSmoothFrontBack() const109     sal_Bool GetDefaultLatheSmoothFrontBack() const { return bDefaultLatheSmoothFrontBack; }
SetDefaultLatheSmoothFrontBack(const sal_Bool bNew)110     void SetDefaultLatheSmoothFrontBack(const sal_Bool bNew) { bDefaultLatheSmoothFrontBack = bNew; }
GetDefaultLatheCharacterMode() const111     sal_Bool GetDefaultLatheCharacterMode() const { return bDefaultLatheCharacterMode; }
SetDefaultLatheCharacterMode(const sal_Bool bNew)112     void SetDefaultLatheCharacterMode(const sal_Bool bNew) { bDefaultLatheCharacterMode = bNew; }
GetDefaultLatheCloseFront() const113     sal_Bool GetDefaultLatheCloseFront() const { return bDefaultLatheCloseFront; }
SetDefaultLatheCloseFront(const sal_Bool bNew)114     void SetDefaultLatheCloseFront(const sal_Bool bNew) { bDefaultLatheCloseFront = bNew; }
GetDefaultLatheCloseBack() const115     sal_Bool GetDefaultLatheCloseBack() const { return bDefaultLatheCloseBack; }
SetDefaultLatheCloseBack(const sal_Bool bNew)116     void SetDefaultLatheCloseBack(const sal_Bool bNew) { bDefaultLatheCloseBack = bNew; }
117 
118     // Extrude-Objekt
GetDefaultExtrudeSmoothed() const119     sal_Bool GetDefaultExtrudeSmoothed() const { return bDefaultExtrudeSmoothed; }
SetDefaultExtrudeSmoothed(const sal_Bool bNew)120     void SetDefaultExtrudeSmoothed(const sal_Bool bNew) { bDefaultExtrudeSmoothed = bNew; }
GetDefaultExtrudeSmoothFrontBack() const121     sal_Bool GetDefaultExtrudeSmoothFrontBack() const { return bDefaultExtrudeSmoothFrontBack; }
SetDefaultExtrudeSmoothFrontBack(const sal_Bool bNew)122     void SetDefaultExtrudeSmoothFrontBack(const sal_Bool bNew) { bDefaultExtrudeSmoothFrontBack = bNew; }
GetDefaultExtrudeCharacterMode() const123     sal_Bool GetDefaultExtrudeCharacterMode() const { return bDefaultExtrudeCharacterMode; }
SetDefaultExtrudeCharacterMode(const sal_Bool bNew)124     void SetDefaultExtrudeCharacterMode(const sal_Bool bNew) { bDefaultExtrudeCharacterMode = bNew; }
GetDefaultExtrudeCloseFront() const125     sal_Bool GetDefaultExtrudeCloseFront() const { return bDefaultExtrudeCloseFront; }
SetDefaultExtrudeCloseFront(const sal_Bool bNew)126     void SetDefaultExtrudeCloseFront(const sal_Bool bNew) { bDefaultExtrudeCloseFront = bNew; }
GetDefaultExtrudeCloseBack() const127     sal_Bool GetDefaultExtrudeCloseBack() const { return bDefaultExtrudeCloseBack; }
SetDefaultExtrudeCloseBack(const sal_Bool bNew)128     void SetDefaultExtrudeCloseBack(const sal_Bool bNew) { bDefaultExtrudeCloseBack = bNew; }
129 };
130 
131 #endif          // _E3D_DEFLT3D_HXX
132