Blender  V2.93
BLI_dot_export_attribute_enums.hh
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
19 #include "BLI_string_ref.hh"
20 
21 namespace blender ::dot {
22 
23 enum class Attr_rankdir {
26 };
27 
28 inline StringRef rankdir_to_string(Attr_rankdir value)
29 {
30  switch (value) {
31  case Attr_rankdir::LeftToRight:
32  return "LR";
33  case Attr_rankdir::TopToBottom:
34  return "TB";
35  }
36  return "";
37 }
38 
39 enum class Attr_shape {
40  Rectangle,
41  Ellipse,
42  Circle,
43  Point,
44  Diamond,
45  Square,
46 };
47 
48 inline StringRef shape_to_string(Attr_shape value)
49 {
50  switch (value) {
51  case Attr_shape::Rectangle:
52  return "rectangle";
53  case Attr_shape::Ellipse:
54  return "ellipse";
55  case Attr_shape::Circle:
56  return "circle";
57  case Attr_shape::Point:
58  return "point";
59  case Attr_shape::Diamond:
60  return "diamond";
61  case Attr_shape::Square:
62  return "square";
63  }
64  return "";
65 }
66 
67 enum class Attr_arrowType {
68  Normal,
69  Inv,
70  Dot,
71  None,
72  Empty,
73  Box,
74  Vee,
75 };
76 
77 inline StringRef arrowType_to_string(Attr_arrowType value)
78 {
79  switch (value) {
81  return "normal";
82  case Attr_arrowType::Inv:
83  return "inv";
85  return "dot";
86  case Attr_arrowType::None:
87  return "none";
88  case Attr_arrowType::Empty:
89  return "empty";
91  return "box";
92  case Attr_arrowType::Vee:
93  return "vee";
94  }
95  return "";
96 }
97 
98 enum class Attr_dirType {
99  Forward,
100  Back,
101  Both,
102  None,
103 };
104 
105 inline StringRef dirType_to_string(Attr_dirType value)
106 {
107  switch (value) {
108  case Attr_dirType::Forward:
109  return "forward";
110  case Attr_dirType::Back:
111  return "back";
112  case Attr_dirType::Both:
113  return "both";
114  case Attr_dirType::None:
115  return "none";
116  }
117  return "";
118 }
119 
120 } // namespace blender::dot
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC Boolean Random Edge Subdivision Point Object Attribute Attribute Attribute Color Attribute Attribute Vector Point Attribute Sample Collection Attribute Attribute Combine Attribute Circle
Group RGB to Normal
static btScalar Dot(const btScalar *a, const btScalar *b, int ndof)
#define Square(a, x, y)
struct Box Box
StringRef dirType_to_string(Attr_dirType value)
StringRef shape_to_string(Attr_shape value)
StringRef rankdir_to_string(Attr_rankdir value)
StringRef arrowType_to_string(Attr_arrowType value)