File tree Expand file tree Collapse file tree 4 files changed +60
-43
lines changed Expand file tree Collapse file tree 4 files changed +60
-43
lines changed Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #include " xrCore/xrCore.h"
4+
5+ namespace XRay
6+ {
7+ namespace ManagedApi
8+ {
9+ namespace Core
10+ {
11+ using namespace System ;
12+ using System::Runtime::InteropServices::OutAttribute;
13+ using System::Runtime::InteropServices::StructLayoutAttribute;
14+ using System::Runtime::InteropServices::LayoutKind;
15+ using System::Runtime::InteropServices::FieldOffsetAttribute;
16+
17+ [StructLayout(LayoutKind::Sequential, Size = sizeof (Fcolor))] public value struct ColorF
18+ {
19+ public:
20+ float r, g, b, a;
21+ };
22+
23+ [StructLayout(LayoutKind::Sequential, Size = sizeof (Fvector2))] public value struct Vector2F
24+ {
25+ float x, y;
26+ };
27+
28+ [StructLayout(LayoutKind::Sequential, Size = sizeof (Fvector3))] public value struct Vector3F
29+ {
30+ float x, y, z;
31+ };
32+
33+ // [FieldOffset(offsetof(Fvector4, x))]
34+ [StructLayout(LayoutKind::Sequential, Size = sizeof (Fvector4))] public value struct Vector4F
35+ {
36+ float x, y, z, w;
37+ };
38+
39+ [StructLayout(LayoutKind::Sequential, Size = sizeof (Ivector2))] public value struct Vector2I
40+ {
41+ int x, y;
42+ };
43+
44+ [StructLayout(LayoutKind::Sequential, Size = sizeof (Ivector3))] public value struct Vector3I
45+ {
46+ int x, y, z;
47+ };
48+
49+ [StructLayout(LayoutKind::Sequential, Size = sizeof (Ivector4))] public value struct Vector4I
50+ {
51+ int x, y, z, w;
52+ };
53+ }
54+ }
55+ }
Original file line number Diff line number Diff line change @@ -2,56 +2,14 @@ class IReader;
22class IWriter ;
33
44#include " xrCore/xrCore.h"
5+ #include " Core/Types.hpp"
56
67namespace XRay
78{
89namespace ManagedApi
910{
1011namespace Core
1112{
12- using namespace System ;
13- using System::Runtime::InteropServices::OutAttribute;
14- using System::Runtime::InteropServices::StructLayoutAttribute;
15- using System::Runtime::InteropServices::LayoutKind;
16- using System::Runtime::InteropServices::FieldOffsetAttribute;
17-
18- [StructLayout(LayoutKind::Sequential, Size = sizeof (Fcolor))] public value struct ColorF
19- {
20- public:
21- float r, g, b, a;
22- };
23-
24- [StructLayout(LayoutKind::Sequential, Size = sizeof (Fvector2))] public value struct Vector2F
25- {
26- float x, y;
27- };
28-
29- [StructLayout(LayoutKind::Sequential, Size = sizeof (Fvector3))] public value struct Vector3F
30- {
31- float x, y, z;
32- };
33-
34- // [FieldOffset(offsetof(Fvector4, x))]
35- [StructLayout(LayoutKind::Sequential, Size = sizeof (Fvector4))] public value struct Vector4F
36- {
37- float x, y, z, w;
38- };
39-
40- [StructLayout(LayoutKind::Sequential, Size = sizeof (Ivector2))] public value struct Vector2I
41- {
42- int x, y;
43- };
44-
45- [StructLayout(LayoutKind::Sequential, Size = sizeof (Ivector3))] public value struct Vector3I
46- {
47- int x, y, z;
48- };
49-
50- [StructLayout(LayoutKind::Sequential, Size = sizeof (Ivector4))] public value struct Vector4I
51- {
52- int x, y, z, w;
53- };
54-
5513public
5614ref class WriterBase abstract
5715{
Original file line number Diff line number Diff line change 211211 <ClInclude Include =" core\Core.hpp" />
212212 <ClInclude Include =" core\fs\FS.hpp" />
213213 <ClInclude Include =" core\PostProcessAnimator.hpp" />
214+ <ClInclude Include =" core\Types.hpp" />
214215 <ClInclude Include =" Pch.hpp" />
215216 </ItemGroup >
216217 <ItemGroup >
Original file line number Diff line number Diff line change 1919 <ClInclude Include =" core\PostProcessAnimator.hpp" >
2020 <Filter >core</Filter >
2121 </ClInclude >
22+ <ClInclude Include =" core\Types.hpp" >
23+ <Filter >core</Filter >
24+ </ClInclude >
2225 </ItemGroup >
2326 <ItemGroup >
2427 <ClCompile Include =" AssemblyInfo.cpp" />
You can’t perform that action at this time.
0 commit comments