Source/Gorgon/Geometry.h

Fri, 16 Jul 2021 11:00:50 +0300

author
cemkalyoncu
date
Fri, 16 Jul 2021 11:00:50 +0300
branch
4.x-dev
changeset 1722
ac75a1494fa5
parent 1589
13038a91c0f4
permissions
-rw-r--r--

* Margin to Geometry scripting

1525
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
1 #pragma once
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
2
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
3 #include "Scripting/Reflection.h"
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
4
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
5 namespace Gorgon { namespace Geometry {
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
6
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
7 extern Scripting::Library LibGeometry;
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
8
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
9 namespace Types {
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
10 #define DEFTYPE(name) \
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
11 inline const Scripting::Type &name() { \
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
12 static const Scripting::Type *type = LibGeometry.GetType(#name); \
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
13 return *type; \
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
14 }
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
15
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
16 DEFTYPE(Point)
1530
23a67943a4ee * Placeholder scripting types for some geometry classes
cemkalyoncu
parents: 1525
diff changeset
17 DEFTYPE(Pointf)
23a67943a4ee * Placeholder scripting types for some geometry classes
cemkalyoncu
parents: 1525
diff changeset
18 DEFTYPE(Size)
23a67943a4ee * Placeholder scripting types for some geometry classes
cemkalyoncu
parents: 1525
diff changeset
19 DEFTYPE(Sizef)
1589
13038a91c0f4 * Bounds and Boundsf geometry scripting types
dogukangulyasar
parents: 1530
diff changeset
20 DEFTYPE(Bounds)
13038a91c0f4 * Bounds and Boundsf geometry scripting types
dogukangulyasar
parents: 1530
diff changeset
21 DEFTYPE(Boundsf)
1722
ac75a1494fa5 * Margin to Geometry scripting
cemkalyoncu
parents: 1589
diff changeset
22 DEFTYPE(Margin)
ac75a1494fa5 * Margin to Geometry scripting
cemkalyoncu
parents: 1589
diff changeset
23 DEFTYPE(Marginf)
1525
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
24
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
25 #undef DEFTYPE
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
26 }
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
27
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
28 void InitializeScripting();
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
29
ab43d641c7c4 * Geometry reflection
cemkalyoncu
parents:
diff changeset
30 } }

mercurial