refactoring

This commit is contained in:
Irlan
2018-10-08 16:18:28 -03:00
parent b48b16843a
commit f98374143a
47 changed files with 895 additions and 1046 deletions

View File

@ -18,7 +18,6 @@
#include <testbed/framework/test.h>
#include <testbed/framework/profiler.h>
#include <imgui/imgui.h>
extern u32 b3_allocCalls, b3_maxAllocCalls;
extern u32 b3_convexCalls, b3_convexCacheHits;
@ -36,8 +35,7 @@ void b3EndProfileScope()
}
Test::Test() :
m_bodyDragger(&m_ray, &m_world),
m_clothDragger(&m_ray, &m_world)
m_bodyDragger(&m_ray, &m_world)
{
b3Draw_draw = g_draw;
b3_convexCache = g_testSettings->convexCache;
@ -115,11 +113,6 @@ void Test::Step()
g_draw->DrawString(b3Color_white, "Convex Cache Hits %d (%f)", b3_convexCacheHits, convexCacheHitRatio);
g_draw->DrawString(b3Color_white, "Frame Allocations %d (%d)", b3_allocCalls, b3_maxAllocCalls);
}
if (m_clothDragger.IsDragging() == true)
{
g_draw->DrawSegment(m_clothDragger.GetPointA(), m_clothDragger.GetPointB(), b3Color_white);
}
}
void Test::MouseMove(const b3Ray3& pw)
@ -130,11 +123,6 @@ void Test::MouseMove(const b3Ray3& pw)
{
m_bodyDragger.Drag();
}
if (m_clothDragger.IsDragging() == true)
{
m_clothDragger.Drag();
}
}
void Test::MouseLeftDown(const b3Ray3& pw)
@ -146,14 +134,6 @@ void Test::MouseLeftDown(const b3Ray3& pw)
BeginDragging();
}
}
if (m_clothDragger.IsDragging() == false)
{
if (m_clothDragger.StartDragging() == true)
{
BeginDragging();
}
}
}
void Test::MouseLeftUp(const b3Ray3& pw)
@ -164,11 +144,4 @@ void Test::MouseLeftUp(const b3Ray3& pw)
EndDragging();
}
if (m_clothDragger.IsDragging() == true)
{
m_clothDragger.StopDragging();
EndDragging();
}
}