Skip to content

Commit b8aa409

Browse files
committed
Move types from FS.hpp to Types.hpp
1 parent 74095a5 commit b8aa409

File tree

4 files changed

+60
-43
lines changed

4 files changed

+60
-43
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
}

src/editors/xrManagedApi/core/fs/FS.hpp

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,14 @@ class IReader;
22
class IWriter;
33

44
#include "xrCore/xrCore.h"
5+
#include "Core/Types.hpp"
56

67
namespace XRay
78
{
89
namespace ManagedApi
910
{
1011
namespace 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-
5513
public
5614
ref class WriterBase abstract
5715
{

src/editors/xrManagedApi/xrManagedApi.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
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>

src/editors/xrManagedApi/xrManagedApi.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
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" />

0 commit comments

Comments
 (0)