Compare commits

..

No commits in common. "beb8c2460ef60676be64cba8cebcfb6d05f11ea6" and "e77901d4f057589d31b332618f812e0365b17ae1" have entirely different histories.

11 changed files with 13 additions and 5332 deletions

View File

@ -1,13 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/modules.xml
/contentModel.xml
/.idea.TheRepo.iml
/projectSettingsUpdater.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
<option name="description" value="" />
</component>
</project>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders>
<Path>../../551455-graphics-programming-2526-the-repo-Zyb3rWolfi</Path>
</attachedFolders>
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ResultsSessionDetails/>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ResultsSession>
<SessionData configName="Example Configuration" configPseudoUrl="c++test.user://Example Configuration" enabledAnalysis="Static" enabledHandlers="com.parasoft.xtest.checkers.api.scope.factory;com.parasoft.xtest.checkers.api.standards.factory" header="?? ??false??false??" runId="" startTime="1758617674937" tool="c++test">
<TestParameters cmdLn="C++test: -config c++test.user://Example Configuration "/>
<Authors/>
<Selection>
<Res id="TheRepo/TheLabs/Program.cs"/>
</Selection>
<XmlDataFiles/>
</SessionData>
<Locations/>
<CodingStandards>
<TestedFilesDetails>
<Total name="Suppressed / Total" supp="0" total="0"/>
</TestedFilesDetails>
</CodingStandards>
</ResultsSession>

View File

@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Numerics;
public class MyVector public class MyVector
{ {
@ -11,83 +10,48 @@ public class MyVector
public float W { get; private set; } public float W { get; private set; }
public MyVector(float pX, float pY, float pZ, float pW = 1) public MyVector(float pX, float pY, float pZ, float pW = 1)
{ {
this.W = pW;
this.X = pX;
this.Y = pY;
this.Z = pZ;
} }
public MyVector Add(MyVector pVector) public MyVector Add(MyVector pVector)
{ {
Vector3 firstVector = new Vector3(X, Y, Z); return null;
Vector3 secondVector = new Vector3(pVector.X, pVector.Y,pVector.Z);
Vector3 finishedVector = firstVector + secondVector;
return new MyVector(finishedVector.X, finishedVector.Y, finishedVector.Z);
} }
public MyVector Subtract(MyVector pVector) public MyVector Subtract(MyVector pVector)
{ {
Vector3 firstVector = new Vector3(X, Y, Z); return null;
Vector3 secondVector = new Vector3(pVector.X, pVector.Y, pVector.Z);
Vector3 finishedVector = firstVector - secondVector;
return new MyVector(finishedVector.X, finishedVector.Y, finishedVector.Z);
} }
public MyVector Multiply(float pScalar) public MyVector Multiply(float pScalar)
{ {
Vector3 firstVector = new Vector3(X*pScalar, Y*pScalar, Z*pScalar); return null;
return new MyVector(firstVector.X,firstVector.Y,firstVector.Z);
} }
public MyVector Divide(float pScalar) public MyVector Divide(float pScalar)
{ {
Vector3 firstVector = new Vector3(X / pScalar, Y / pScalar, Z / pScalar); return null;
return new MyVector(firstVector.X, firstVector.Y, firstVector.Z);
} }
public float Magnitude() public float Magnitude()
{ {
float squareSum = (float)Math.Pow(X, 2) + (float)Math.Pow(Y, 2) + (float)Math.Pow(Z, 2); return -1;
float SquareRoot = (float)Math.Sqrt(squareSum);
return SquareRoot;
} }
public MyVector Normalise() public MyVector Normalise()
{ {
float mag = Magnitude(); return null;
return new MyVector(X / mag, Y / mag, Z / mag);
} }
public float DotProduct(MyVector pVector) public float DotProduct(MyVector pVector)
{ {
float dotProduct = (X * pVector.X) + (Y * pVector.Y) + (Z * pVector.Z); return -1;
return dotProduct;
} }
public MyVector Interpolate(MyVector pVector, float pInterpolation) public MyVector Interpolate(MyVector pVector, float pInterpolation)
{ {
return new MyVector( return null;
X + (pVector.X - X) * pInterpolation,
Y + (pVector.Y - Y) * pInterpolation,
Z + (pVector.Z - Z) * pInterpolation
);
} }
public float AngleBetween(MyVector pVector) public float AngleBetween(MyVector pVector)
{ {
float dot = DotProduct(pVector); return -1;
float magA = Magnitude();
float magB = pVector.Magnitude();
float cosAngle = dot / (magA * magB);
cosAngle = Math.Clamp(cosAngle, -1.0f, 1.0f);
return (float)Math.Acos(cosAngle);
} }
public MyVector CrossProduct(MyVector pVector) public MyVector CrossProduct(MyVector pVector)
{ {
return new MyVector( return null;
(Y * pVector.Z) - (Z * pVector.Y),
(Z * pVector.X) - (X * pVector.Z),
(X * pVector.Y) - (Y * pVector.X)
);
} }
} }

View File

@ -13,8 +13,7 @@ namespace TheLabs
Size = new Vector2i(800, 600), Size = new Vector2i(800, 600),
Title = "My OpenTK Example Program" Title = "My OpenTK Example Program"
}; };
MyVector myVector = new MyVector(30, 40, 0);
Console.WriteLine(myVector.Magnitude());
using (var window = new MyExampleWindow(GameWindowSettings.Default, using (var window = new MyExampleWindow(GameWindowSettings.Default,
nativeWindowSettings)) nativeWindowSettings))
{ {

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
@ -14,7 +14,6 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" /> <PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" /> <PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="OpenTK" Version="4.8.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>