Skip to content

Commit

Permalink
Found the Static Function
Browse files Browse the repository at this point in the history
  • Loading branch information
kwmoore81 committed Mar 23, 2016
1 parent e4029c7 commit 72717e5
Show file tree
Hide file tree
Showing 27 changed files with 72 additions and 20 deletions.
Binary file modified .vs/Math Library/v14/.suo
Binary file not shown.
Binary file modified Debug/Math Library.pdb
Binary file not shown.
Binary file modified Debug/TestProject.ilk
Binary file not shown.
Binary file modified Debug/TestProject.pdb
Binary file not shown.
Binary file modified Math Library.sdf
Binary file not shown.
Binary file modified Math Library/Debug/Math Library.idb
Binary file not shown.
35 changes: 25 additions & 10 deletions Math Library/Debug/Math Library.log
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
 collision.cpp
c:\users\aikid\onedrive\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(27): warning C4018: '<': signed/unsigned mismatch
c:\users\aikid\onedrive\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(35): warning C4018: '<': signed/unsigned mismatch
c:\users\aikid\onedrive\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(45): warning C4018: '<': signed/unsigned mismatch
c:\users\aikid\onedrive\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(50): warning C4018: '<': signed/unsigned mismatch
c:\users\aikid\onedrive\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(57): warning C4018: '<': signed/unsigned mismatch
c:\users\aikid\onedrive\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(187): warning C4804: '<=': unsafe use of type 'bool' in operation
c:\users\aikid\onedrive\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(230): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
c:\users\aikid\onedrive\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(243): warning C4804: '<=': unsafe use of type 'bool' in operation
Math Library.vcxproj -> C:\Users\Aikid\OneDrive\Documents\Visual Studio 2015\Projects\MathLibrary\Debug\Math Library.lib
Build started 3/23/2016 11:19:32 AM.
1>Project "C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\Math Library\Math Library.vcxproj" on node 2 (Build target(s)).
1>ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /sdl /Od /Oy- /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\Math Library.pdb" /Gd /TP /analyze- /errorReport:prompt collision.cpp
collision.cpp
1>c:\users\kevin.moore\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(28): warning C4018: '<': signed/unsigned mismatch
1>c:\users\kevin.moore\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(36): warning C4018: '<': signed/unsigned mismatch
1>c:\users\kevin.moore\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(46): warning C4018: '<': signed/unsigned mismatch
1>c:\users\kevin.moore\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(51): warning C4018: '<': signed/unsigned mismatch
1>c:\users\kevin.moore\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(58): warning C4018: '<': signed/unsigned mismatch
1>c:\users\kevin.moore\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(194): warning C4804: '<=': unsafe use of type 'bool' in operation
1>c:\users\kevin.moore\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(237): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
1>c:\users\kevin.moore\documents\visual studio 2015\projects\mathlibrary\math library\collision.cpp(250): warning C4804: '<=': unsafe use of type 'bool' in operation
Lib:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\Lib.exe /OUT:"C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\Debug\Math Library.lib" /NOLOGO Debug\collision.obj
Debug\mat3.obj
Debug\shapes.obj
Debug\vec2.obj
Debug\vec3.obj
Math Library.vcxproj -> C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\Debug\Math Library.lib
1>Done Building Project "C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\Math Library\Math Library.vcxproj" (Build target(s)).

Build succeeded.

Time Elapsed 00:00:00.39
Binary file modified Math Library/Debug/Math Library.pdb
Binary file not shown.
Binary file modified Math Library/Debug/Math Library.tlog/CL.read.1.tlog
Binary file not shown.
Binary file modified Math Library/Debug/Math Library.tlog/CL.write.1.tlog
Binary file not shown.
Binary file modified Math Library/Debug/Math Library.tlog/Lib-link.read.1.tlog
Binary file not shown.
Binary file modified Math Library/Debug/Math Library.tlog/Lib-link.write.1.tlog
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
Debug|Win32|C:\Users\Aikid\OneDrive\Documents\Visual Studio 2015\Projects\MathLibrary\|
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
Debug|Win32|C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\|
4 changes: 3 additions & 1 deletion Math Library/collision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <algorithm>
#include "collision.h"


using namespace kml;

float kml::point_plane_dist(const vec2 & a, const Plane & b)
Expand Down Expand Up @@ -93,6 +94,7 @@ CollisionData kml::iTest(const AABB & a, const AABB & b)

CollisionData kml::iTest(Circle a, const AABB &b)
{

//CollisionData cd;
/*vec2 bc = clamp(b.position, a.min(), a.max());
float dist = dot((b.position - bc), (b.position - bc));
Expand All @@ -112,7 +114,7 @@ CollisionData kml::iTest(Circle a, const AABB &b)
Circle cp = { snap(a.position, b.min(), b.max()), 0 };
if (b.min() < a.position && a.position < b.max())
std::swap(a, cp);
//a.position = b.max + a.r + 1;

return iTest(a, cp);
}

Expand Down
1 change: 1 addition & 0 deletions Math Library/collision.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "kmath.h"



namespace kml
{
struct CollisionData // Wrapper for Minimum Translation Vector
Expand Down
22 changes: 20 additions & 2 deletions TestProject/Debug/TestProject.log
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
 main.cpp
TestProject.vcxproj -> C:\Users\Aikid\OneDrive\Documents\Visual Studio 2015\Projects\MathLibrary\Debug\TestProject.exe
Build started 3/23/2016 11:19:32 AM.
1>Project "C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\TestProject\TestProject.vcxproj" on node 2 (Build target(s)).
1>Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\Debug\TestProject.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\Debug" sfw_d.lib "Math Library.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /Debug /PDB:"C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\Debug\TestProject.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\Debug\TestProject.lib" /MACHINE:X86 Debug\Assets.obj
Debug\collider.obj
Debug\crenderutils.obj
Debug\Input.obj
Debug\main.obj
Debug\RigidBody.obj
Debug\Time.obj
Debug\transform.obj
Debug\Window.obj
..\Debug\sfw.lib
..\Debug\sfw_d.lib
TestProject.vcxproj -> C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\Debug\TestProject.exe
1>Done Building Project "C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\TestProject\TestProject.vcxproj" (Build target(s)).

Build succeeded.

Time Elapsed 00:00:00.16
Binary file modified TestProject/Debug/TestProject.tlog/CL.read.1.tlog
Binary file not shown.
Binary file modified TestProject/Debug/TestProject.tlog/CL.write.1.tlog
Binary file not shown.
4 changes: 2 additions & 2 deletions TestProject/Debug/TestProject.tlog/TestProject.lastbuildstate
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
Debug|Win32|C:\Users\Aikid\OneDrive\Documents\Visual Studio 2015\Projects\MathLibrary\|
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
Debug|Win32|C:\Users\kevin.moore\Documents\Visual Studio 2015\Projects\MathLibrary\|
Binary file modified TestProject/Debug/TestProject.tlog/link.read.1.tlog
Binary file not shown.
Binary file modified TestProject/Debug/TestProject.tlog/link.write.1.tlog
Binary file not shown.
Binary file modified TestProject/Debug/vc140.idb
Binary file not shown.
Binary file modified TestProject/Debug/vc140.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion TestProject/Factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace kml
e->collider->aabb.halfextents = { 60,80 };
e->collider->shape = Collider::e_AABB;
e->transform->setPos(pos);

return e;
}

Expand Down
2 changes: 1 addition & 1 deletion TestProject/StaticResolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace kml
void update(Collision c)
{
Handle<Entity> t;

//TODO add static equation
}
};
}
1 change: 1 addition & 0 deletions TestProject/collider.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "transform.h"
#include "collision.h"


namespace kml
{
struct Collider : GCData<Collider>
Expand Down
17 changes: 16 additions & 1 deletion TestProject/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ int main()
auto slime5 = Factory::makeBall({ 600, 250 }, { 0 , 0 }, 20, 40);
auto slime6 = Factory::makeBall({ 200, 350 }, { 0 , 0 }, 20, 40);
auto tree1 = Factory::makeWall({ 160,70 }, { 1,1 });
auto tree2 = Factory::makeWall({ 380,200 }, { 1,1 });
auto tree3 = Factory::makeWall({ 550,50 }, { 1,1 });
auto tree4 = Factory::makeWall({750,50 }, { 1,1 });
auto tree5 = Factory::makeWall({ 20,450 }, { 1,1 });
auto tree6 = Factory::makeWall({ 150,550 }, { 1,1 });
auto tree7 = Factory::makeWall({ 480,590 }, { 1,1 });
player->rigidbody->drag = 2;

DebugDraw debugDraw;
RigidbodyDynamics rigidbodies;
LifetimeSystem lifetimes;
Expand All @@ -50,6 +56,15 @@ int main()

while (window.step())
{

/*tree1->rigidbody->velocity = { 0, 0 };
tree2->rigidbody->velocity = { 0, 0 };
tree3->rigidbody->velocity = { 0, 0 };
tree4->rigidbody->velocity = { 0, 0 };
tree5->rigidbody->velocity = { 0, 0 };
tree6->rigidbody->velocity = { 0, 0 };
tree7->rigidbody->velocity = { 0, 0 };*/

input.step();
time.step();

Expand Down

0 comments on commit 72717e5

Please sign in to comment.