scenepic 1.1.0
3D Visualization Made Easy
layer_settings.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#ifndef _SCENEPIC_LAYER_SETTINGS_H_
5#define _SCENEPIC_LAYER_SETTINGS_H_
6
7#include "json_value.h"
8
9#include <limits>
10#include <string>
11
12namespace scenepic
13{
16 {
17 public:
27 bool filled = true,
28 bool wireframe = false,
29 double opacity = 1.0,
31
33 bool filled() const;
34
36 LayerSettings& filled(bool value);
37
39 bool wireframe() const;
40
43
45 double opacity() const;
46
48 LayerSettings& opacity(double value);
49
51 int render_order() const;
52
55
57 std::string to_string() const;
58
63
66 static const int NO_RENDER_ORDER;
67
68 private:
69 int m_render_order;
70 bool m_filled;
71 bool m_wireframe;
72 double m_opacity;
73 };
74} // namespace scenepic
75
76#endif
Representation of a JSON value according to the specification at https://www.json....
Definition: json_value.h:30
Settings used for customizing canvas drawing by layer.
Definition: layer_settings.h:16
LayerSettings & wireframe(bool value)
Specifies whether to draw the layer with a wireframe outline.
static const int NO_RENDER_ORDER
Special value indicating that this layer has no specific rendering order.
Definition: layer_settings.h:66
bool wireframe() const
Specifies whether to draw the layer with a wireframe outline.
LayerSettings & render_order(int value)
Specifies a fixed order to draw transparency.
double opacity() const
In [0,1] specifies the opacity with which to draw the layer.
LayerSettings & opacity(double value)
In [0,1] specifies the opacity with which to draw the layer.
bool filled() const
Specifies whether to draw the layer with filled triangles.
LayerSettings(bool filled=true, bool wireframe=false, double opacity=1.0, int render_order=LayerSettings::NO_RENDER_ORDER)
Constructor.
std::string to_string() const
Return a JSON string representing the object.
JsonValue to_json() const
Convert this object into ScenePic json.
int render_order() const
Specifies a fixed order to draw transparency.
LayerSettings & filled(bool value)
Specifies whether to draw the layer with filled triangles.
Definition: audio_track.h:14