|
70 | 70 | fac = 1/(length(cMap)-1); |
71 | 71 | colorScale = {}; |
72 | 72 |
|
73 | | - for c = 1: length(cMap) |
| 73 | + for c = 1:length(cMap) |
74 | 74 | colorScale{c} = {(c-1)*fac, getStringColor(round(255*cMap(c, :)))}; |
75 | 75 | end |
76 | 76 | %-get edge color-% |
|
96 | 96 |
|
97 | 97 | [cDataSurface, cMapSurface] = rgb2ind(cDataSurface, 256); |
98 | 98 |
|
99 | | - for c = 1: size(cMapSurface, 1) |
100 | | - colorScale{c} = { (c-1)*fac , getStringColor(round(255*cMapSurface(c, :)), 1)}; |
| 99 | + for c = 1:size(cMapSurface, 1) |
| 100 | + colorScale{c} = {(c-1)*fac, getStringColor(round(255*cMapSurface(c, :)), 1)}; |
101 | 101 | end |
102 | 102 |
|
103 | 103 | obj.data{surfaceIndex}.cmin = 0; |
|
121 | 121 | end |
122 | 122 | end |
123 | 123 |
|
124 | | - %-set face color-% |
125 | 124 | obj.data{surfaceIndex}.colorscale = colorScale; |
126 | 125 | obj.data{surfaceIndex}.surfacecolor = cDataSurface; |
127 | 126 |
|
128 | | - %-lighting settings-% |
129 | | - |
130 | 127 | if isnumeric(meshData.FaceColor) && all(meshData.FaceColor == [1, 1, 1]) |
131 | 128 | obj.data{surfaceIndex}.lighting.diffuse = 0.5; |
132 | 129 | obj.data{surfaceIndex}.lighting.ambient = 0.725; |
133 | | - else |
134 | | - % obj.data{surfaceIndex}.lighting.diffuse = 1.0; |
135 | | - % obj.data{surfaceIndex}.lighting.ambient = 0.9; |
136 | 130 | end |
137 | 131 |
|
138 | 132 | if meshData.FaceAlpha ~= 1 |
|
145 | 139 | obj.data{surfaceIndex}.lighting.ambient = 0.3; |
146 | 140 | end |
147 | 141 |
|
148 | | - %-opacity-% |
149 | 142 | obj.data{surfaceIndex}.opacity = meshData.FaceAlpha; |
150 | 143 |
|
151 | | - %-line style-% |
152 | | - |
153 | 144 | obj.data{contourIndex}.line.width = 3*meshData.LineWidth; |
| 145 | + obj.data{contourIndex}.line.dash = getLineDash(meshData.LineStyle); |
154 | 146 |
|
155 | | - switch meshData.LineStyle |
156 | | - case '-' |
157 | | - obj.data{contourIndex}.line.dash = 'solid'; |
158 | | - case '--' |
159 | | - obj.data{contourIndex}.line.dash = 'dash'; |
160 | | - case '-.' |
161 | | - obj.data{contourIndex}.line.dash = 'dashdot'; |
162 | | - case ':' |
163 | | - obj.data{contourIndex}.line.dash = 'dot'; |
164 | | - end |
165 | | - |
166 | | - %-show contours-% |
167 | 147 |
|
168 | 148 | if strcmpi(meshData.ShowContours, 'on') |
169 | 149 | obj.PlotOptions.nPlots = obj.PlotOptions.nPlots + 1; |
|
188 | 168 | end |
189 | 169 |
|
190 | 170 | %-SCENE CONFIGURATION-% |
191 | | - |
192 | | - %-aspect ratio-% |
193 | 171 | asr = obj.PlotOptions.AspectRatio; |
194 | 172 |
|
195 | 173 | if ~isempty(asr) |
|
0 commit comments