LibreOffice Module drawinglayer (master) 1
sdrobjectattribute3d.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
22
23
25{
27 {
28 public:
29 // 3D object attribute definitions
30 css::drawing::NormalsKind maNormalsKind; // normals type (0..2)
31 css::drawing::TextureProjectionMode maTextureProjectionX; // texture projection type X (0..2)
32 css::drawing::TextureProjectionMode maTextureProjectionY; // texture projection type Y (0..2)
33 css::drawing::TextureKind2 maTextureKind; // texture kind (see uno API)
34 css::drawing::TextureMode maTextureMode; // texture kind (see uno API)
35 MaterialAttribute3D maMaterial; // object, specular and emissive colors, SpecularIntensity
36
37 bool mbNormalsInvert : 1; // invert normals
38 bool mbDoubleSided : 1; // surfaces are double sided
39 bool mbShadow3D : 1; // display shadow in 3D (if on), params for that are at scene
40 bool mbTextureFilter : 1; // filter texture to make more smooth
41 bool mbReducedLineGeometry : 1; // use reduced line geometry (object specific)
42
44 css::drawing::NormalsKind aNormalsKind,
45 css::drawing::TextureProjectionMode aTextureProjectionX,
46 css::drawing::TextureProjectionMode aTextureProjectionY,
47 css::drawing::TextureKind2 aTextureKind,
48 css::drawing::TextureMode aTextureMode,
49 const MaterialAttribute3D& rMaterial,
50 bool bNormalsInvert,
51 bool bDoubleSided,
52 bool bShadow3D,
53 bool bTextureFilter,
54 bool bReducedLineGeometry)
55 : maNormalsKind(aNormalsKind),
56 maTextureProjectionX(aTextureProjectionX),
57 maTextureProjectionY(aTextureProjectionY),
58 maTextureKind(aTextureKind),
59 maTextureMode(aTextureMode),
60 maMaterial(rMaterial),
61 mbNormalsInvert(bNormalsInvert),
62 mbDoubleSided(bDoubleSided),
63 mbShadow3D(bShadow3D),
64 mbTextureFilter(bTextureFilter),
65 mbReducedLineGeometry(bReducedLineGeometry)
66 {
67 }
68
69 // data read access
70 css::drawing::NormalsKind getNormalsKind() const { return maNormalsKind; }
71 css::drawing::TextureProjectionMode getTextureProjectionX() const { return maTextureProjectionX; }
72 css::drawing::TextureProjectionMode getTextureProjectionY() const { return maTextureProjectionY; }
73 css::drawing::TextureKind2 getTextureKind() const { return maTextureKind; }
74 css::drawing::TextureMode getTextureMode() const { return maTextureMode; }
75 const MaterialAttribute3D& getMaterial() const { return maMaterial; }
76 bool getNormalsInvert() const { return mbNormalsInvert; }
77 bool getDoubleSided() const { return mbDoubleSided; }
78 bool getShadow3D() const { return mbShadow3D; }
79 bool getTextureFilter() const { return mbTextureFilter; }
81
82 bool operator==(const ImpSdr3DObjectAttribute& rCandidate) const
83 {
84 return (getNormalsKind() == rCandidate.getNormalsKind()
87 && getTextureKind() == rCandidate.getTextureKind()
88 && getTextureMode() == rCandidate.getTextureMode()
89 && getMaterial() == rCandidate.getMaterial()
90 && getNormalsInvert() == rCandidate.getNormalsInvert()
91 && getDoubleSided() == rCandidate.getDoubleSided()
92 && getShadow3D() == rCandidate.getShadow3D()
93 && getTextureFilter() == rCandidate.getTextureFilter()
95 }
96 };
97
99 css::drawing::NormalsKind aNormalsKind,
100 css::drawing::TextureProjectionMode aTextureProjectionX,
101 css::drawing::TextureProjectionMode aTextureProjectionY,
102 css::drawing::TextureKind2 aTextureKind,
103 css::drawing::TextureMode aTextureMode,
104 const MaterialAttribute3D& rMaterial,
105 bool bNormalsInvert,
106 bool bDoubleSided,
107 bool bShadow3D,
108 bool bTextureFilter,
109 bool bReducedLineGeometry)
110 : mpSdr3DObjectAttribute(ImpSdr3DObjectAttribute(
111 aNormalsKind, aTextureProjectionX, aTextureProjectionY, aTextureKind, aTextureMode,
112 rMaterial, bNormalsInvert, bDoubleSided, bShadow3D, bTextureFilter, bReducedLineGeometry))
113 {
114 }
115
117
119
121
123 {
125 }
126
127 css::drawing::NormalsKind Sdr3DObjectAttribute::getNormalsKind() const
128 {
129 return mpSdr3DObjectAttribute->getNormalsKind();
130 }
131
132 css::drawing::TextureProjectionMode Sdr3DObjectAttribute::getTextureProjectionX() const
133 {
134 return mpSdr3DObjectAttribute->getTextureProjectionX();
135 }
136
137 css::drawing::TextureProjectionMode Sdr3DObjectAttribute::getTextureProjectionY() const
138 {
139 return mpSdr3DObjectAttribute->getTextureProjectionY();
140 }
141
142 css::drawing::TextureKind2 Sdr3DObjectAttribute::getTextureKind() const
143 {
144 return mpSdr3DObjectAttribute->getTextureKind();
145 }
146
147 css::drawing::TextureMode Sdr3DObjectAttribute::getTextureMode() const
148 {
149 return mpSdr3DObjectAttribute->getTextureMode();
150 }
151
153 {
154 return mpSdr3DObjectAttribute->getMaterial();
155 }
156
158 {
159 return mpSdr3DObjectAttribute->getNormalsInvert();
160 }
161
163 {
164 return mpSdr3DObjectAttribute->getDoubleSided();
165 }
166
168 {
169 return mpSdr3DObjectAttribute->getShadow3D();
170 }
171
173 {
174 return mpSdr3DObjectAttribute->getTextureFilter();
175 }
176
178 {
179 return mpSdr3DObjectAttribute->getReducedLineGeometry();
180 }
181
182} // end of namespace
183
184/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::drawing::TextureKind2 getTextureKind() const
css::drawing::TextureProjectionMode getTextureProjectionX() const
ImpSdr3DObjectAttribute(css::drawing::NormalsKind aNormalsKind, css::drawing::TextureProjectionMode aTextureProjectionX, css::drawing::TextureProjectionMode aTextureProjectionY, css::drawing::TextureKind2 aTextureKind, css::drawing::TextureMode aTextureMode, const MaterialAttribute3D &rMaterial, bool bNormalsInvert, bool bDoubleSided, bool bShadow3D, bool bTextureFilter, bool bReducedLineGeometry)
css::drawing::TextureProjectionMode getTextureProjectionY() const
css::drawing::TextureProjectionMode maTextureProjectionX
bool operator==(const ImpSdr3DObjectAttribute &rCandidate) const
css::drawing::TextureProjectionMode maTextureProjectionY
const MaterialAttribute3D & getMaterial() const
Sdr3DObjectAttribute & operator=(const Sdr3DObjectAttribute &)
css::drawing::TextureMode getTextureMode() const
css::drawing::TextureProjectionMode getTextureProjectionX() const
css::drawing::TextureProjectionMode getTextureProjectionY() const
Sdr3DObjectAttribute(css::drawing::NormalsKind aNormalsKind, css::drawing::TextureProjectionMode aTextureProjectionX, css::drawing::TextureProjectionMode aTextureProjectionY, css::drawing::TextureKind2 aTextureKind, css::drawing::TextureMode aTextureMode, const MaterialAttribute3D &rMaterial, bool bNormalsInvert, bool bDoubleSided, bool bShadow3D, bool bTextureFilter, bool bReducedLineGeometry)
bool operator==(const Sdr3DObjectAttribute &rCandidate) const
css::drawing::TextureKind2 getTextureKind() const
css::drawing::NormalsKind getNormalsKind() const
const MaterialAttribute3D & getMaterial() const