aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbonmas14 <bonmas14@gmail.com>2023-10-01 17:14:41 +0300
committerbonmas14 <bonmas14@gmail.com>2023-10-01 17:14:41 +0300
commitaad3d0382c498f6a39e5dbf5c9682e18127df353 (patch)
treeeb9c2566332f1f7679ebbf9d1db3c47b271f6ef9
parentace225b3b8b1a3dfb67ab6a06113c38279ccc762 (diff)
downloadRayRoom-aad3d0382c498f6a39e5dbf5c9682e18127df353.tar.gz
RayRoom-aad3d0382c498f6a39e5dbf5c9682e18127df353.zip
Добавьте файлы проекта.
-rw-r--r--RayRoom.sln25
-rw-r--r--RayRoom/Class1.cs7
-rw-r--r--RayRoom/Core/AudioSimulator.cs10
-rw-r--r--RayRoom/Core/Ray.cs11
-rw-r--r--RayRoom/Core/Settings.cs28
-rw-r--r--RayRoom/Platform/AVXSummator.cs30
-rw-r--r--RayRoom/Platform/IRaySummator.cs10
-rw-r--r--RayRoom/RayRoom.csproj9
8 files changed, 130 insertions, 0 deletions
diff --git a/RayRoom.sln b/RayRoom.sln
new file mode 100644
index 0000000..5dd8ab3
--- /dev/null
+++ b/RayRoom.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.7.34031.279
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RayRoom", "RayRoom\RayRoom.csproj", "{230DBE77-7C79-48AB-80F9-7ACBA8654F9E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {230DBE77-7C79-48AB-80F9-7ACBA8654F9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {230DBE77-7C79-48AB-80F9-7ACBA8654F9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {230DBE77-7C79-48AB-80F9-7ACBA8654F9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {230DBE77-7C79-48AB-80F9-7ACBA8654F9E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F82657D8-1694-4965-A4B5-C59E885B895D}
+ EndGlobalSection
+EndGlobal
diff --git a/RayRoom/Class1.cs b/RayRoom/Class1.cs
new file mode 100644
index 0000000..7c8766e
--- /dev/null
+++ b/RayRoom/Class1.cs
@@ -0,0 +1,7 @@
+namespace RayRoom
+{
+ public class Class1
+ {
+
+ }
+} \ No newline at end of file
diff --git a/RayRoom/Core/AudioSimulator.cs b/RayRoom/Core/AudioSimulator.cs
new file mode 100644
index 0000000..0451c0e
--- /dev/null
+++ b/RayRoom/Core/AudioSimulator.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace RayRoom.Core
+{
+ public class AudioSimulator
+ {
+ private Settings simulationSettings;
+
+ }
+}
diff --git a/RayRoom/Core/Ray.cs b/RayRoom/Core/Ray.cs
new file mode 100644
index 0000000..0c2edcc
--- /dev/null
+++ b/RayRoom/Core/Ray.cs
@@ -0,0 +1,11 @@
+using System.Numerics;
+
+namespace RayRoom.Core
+{
+ public class Ray
+ {
+ public readonly Vector2 position;
+ public readonly Vector2 direction;
+ public readonly float length;
+ }
+} \ No newline at end of file
diff --git a/RayRoom/Core/Settings.cs b/RayRoom/Core/Settings.cs
new file mode 100644
index 0000000..7ca0b45
--- /dev/null
+++ b/RayRoom/Core/Settings.cs
@@ -0,0 +1,28 @@
+using System;
+
+namespace RayRoom.Core
+{
+ public struct Settings
+ {
+ public readonly int frequency;
+ public readonly int maxRayReflections;
+ public readonly int maxDiffusionRays;
+
+ public readonly float fadeFactorPerMeter; //qurve
+ public readonly float speedOfSoundMetersPerSec;
+
+ public static Settings GetDefault()
+ {
+ return new Settings(441000, 10, 15, 0.001f, 330);
+ }
+
+ public Settings(int frequency, int maxRayReflections, int maxDiffusionRays, float fadeFactorPerMeter, float speedOfSoundMetersPerSec)
+ {
+ this.frequency = frequency;
+ this.maxRayReflections = maxRayReflections;
+ this.maxDiffusionRays = maxDiffusionRays;
+ this.fadeFactorPerMeter = fadeFactorPerMeter;
+ this.speedOfSoundMetersPerSec = speedOfSoundMetersPerSec;
+ }
+ }
+}
diff --git a/RayRoom/Platform/AVXSummator.cs b/RayRoom/Platform/AVXSummator.cs
new file mode 100644
index 0000000..17db989
--- /dev/null
+++ b/RayRoom/Platform/AVXSummator.cs
@@ -0,0 +1,30 @@
+using RayRoom.Core;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Intrinsics;
+using System.Runtime.Intrinsics.X86;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace RayRoom.Platform
+{
+ internal class AVXSummator : IRaySummator
+ {
+ private float[] buffer;
+
+ public AVXSummator()
+ {
+ buffer = new float[2048];
+
+ }
+
+ public float[] SumRays(Ray[] rays, float[] data)
+ {
+ if (!Avx.IsSupported)
+ throw new NotSupportedException("Avx is not supported");
+
+ throw new NotImplementedException("Avx is not implemented");
+ }
+ }
+}
diff --git a/RayRoom/Platform/IRaySummator.cs b/RayRoom/Platform/IRaySummator.cs
new file mode 100644
index 0000000..177b327
--- /dev/null
+++ b/RayRoom/Platform/IRaySummator.cs
@@ -0,0 +1,10 @@
+using System;
+using RayRoom.Core;
+
+namespace RayRoom.Platform
+{
+ internal interface IRaySummator
+ {
+ float[] SumRays(Ray[] rays, float[] data);
+ }
+}
diff --git a/RayRoom/RayRoom.csproj b/RayRoom/RayRoom.csproj
new file mode 100644
index 0000000..132c02c
--- /dev/null
+++ b/RayRoom/RayRoom.csproj
@@ -0,0 +1,9 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>net6.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ </PropertyGroup>
+
+</Project>