2
0
Эх сурвалжийг харах

Delete Circle, Rect and related stuff

Daniele Bartolini 12 жил өмнө
parent
commit
90f5506990

+ 1 - 6
engine/CMakeLists.txt

@@ -114,16 +114,11 @@ set (CORE_HEADERS
 )
 )
 
 
 set (BV_SRC
 set (BV_SRC
-	core/bv/Circle.cpp
 	core/bv/Frustum.cpp
 	core/bv/Frustum.cpp
-	core/bv/Rect.cpp
 )
 )
 
 
 set (BV_HEADERS
 set (BV_HEADERS
-	core/bv/Box.h
-	core/bv/Circle.h
 	core/bv/Frustum.h
 	core/bv/Frustum.h
-	core/bv/Rect.h
 	core/bv/Sphere.h
 	core/bv/Sphere.h
 )
 )
 
 
@@ -152,6 +147,7 @@ set (MATH_SRC
 )
 )
 
 
 set (MATH_HEADERS
 set (MATH_HEADERS
+	core/math/AABB.h
 	core/math/Color4.h
 	core/math/Color4.h
 	core/math/Intersection.h
 	core/math/Intersection.h
 	core/math/MathTypes.h
 	core/math/MathTypes.h
@@ -161,7 +157,6 @@ set (MATH_HEADERS
 	core/math/Plane.h
 	core/math/Plane.h
 	core/math/Quaternion.h
 	core/math/Quaternion.h
 	core/math/Random.h
 	core/math/Random.h
-	core/math/Triangle.h
 	core/math/Vector2.h
 	core/math/Vector2.h
 	core/math/Vector3.h
 	core/math/Vector3.h
 	core/math/Vector4.h
 	core/math/Vector4.h

+ 0 - 2
engine/Crown.h

@@ -48,9 +48,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Vector4.h"
 #include "Vector4.h"
 
 
 // Core/Bv
 // Core/Bv
-#include "Circle.h"
 #include "Frustum.h"
 #include "Frustum.h"
-#include "Rect.h"
 #include "Sphere.h"
 #include "Sphere.h"
 
 
 // Core/Containers
 // Core/Containers

+ 0 - 42
engine/core/bv/Circle.cpp

@@ -1,42 +0,0 @@
-/*
-Copyright (c) 2013 Daniele Bartolini, Michele Rossi
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#include "Circle.h"
-#include "Rect.h"
-
-namespace crown
-{
-
-Rect Circle::to_rect() const
-{
-	Rect b;
-
-	b.set_from_center_and_dimensions(m_center, m_radius * 2.0, m_radius * 2.0);
-
-	return b;
-}
-
-}

+ 0 - 114
engine/core/bv/Circle.h

@@ -1,114 +0,0 @@
-/*
-Copyright (c) 2013 Daniele Bartolini, Michele Rossi
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#pragma once
-
-#include "Types.h"
-#include "Vector2.h"
-#include "MathUtils.h"
-
-namespace crown
-{
-
-class Rect;
-
-/// Circle.
-///
-/// Used mainly for collision detection and intersection tests.
-class Circle
-{
-public:
-
-	/// Does nothing for efficiency.
-					Circle();
-					
-	/// Constructs from @a center and @a radius.
-					Circle(const Vector2& center, float radius);	
-					Circle(const Circle& circle);				
-
-	const Vector2&		center() const;							
-	float			radius() const;	
-	void			set_center(const Vector2& center);			
-	void			set_radius(float radius);				
-
-	float			area() const;						
-
-	/// Returns a Rect containing the circle.
-	Rect			to_rect() const;
-
-private:
-
-	Vector2			m_center;
-	float			m_radius;
-};
-
-//-----------------------------------------------------------------------------
-inline Circle::Circle()
-{
-}
-
-//-----------------------------------------------------------------------------
-inline Circle::Circle(const Vector2& center, float radius) : m_center(center), m_radius(radius)
-{
-}
-
-//-----------------------------------------------------------------------------
-inline Circle::Circle(const Circle& circle) : m_center(circle.m_center), m_radius(circle.m_radius)
-{
-}
-
-//-----------------------------------------------------------------------------
-inline const Vector2& Circle::center() const
-{
-	return m_center;
-}
-
-//-----------------------------------------------------------------------------
-inline float Circle::radius() const
-{
-	return m_radius;
-}
-
-//-----------------------------------------------------------------------------
-inline void Circle::set_center(const Vector2& center)
-{
-	m_center = center;
-}
-
-//-----------------------------------------------------------------------------
-inline void Circle::set_radius(float radius)
-{
-	m_radius = radius;
-}
-
-//-----------------------------------------------------------------------------
-inline float Circle::area() const
-{
-	return m_radius * m_radius * math::PI;
-}
-
-} // namespace crown
-

+ 0 - 141
engine/core/bv/Rect.cpp

@@ -1,141 +0,0 @@
-/*
-Copyright (c) 2013 Daniele Bartolini, Michele Rossi
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#include "Assert.h"
-#include "Rect.h"
-#include "Circle.h"
-#include "MathUtils.h"
-
-namespace crown
-{
-
-//-----------------------------------------------------------------------------
-bool Rect::contains_point(const Vector2& point) const
-{
-	return (point.x >= m_min.x && point.y >= m_min.y &&
-			point.x <= m_max.x && point.y <= m_max.y);
-}
-
-//-----------------------------------------------------------------------------
-bool Rect::intersects_rect(const Rect& rect) const
-{
-	if (rect.m_min.x > m_max.x || rect.m_max.x < m_min.x || rect.m_min.y > m_max.y || rect.m_max.y < m_min.y)
-		return false;
-	return true;
-}
-
-//-----------------------------------------------------------------------------
-void Rect::set_from_center_and_dimensions(Vector2 center, float width, float height)
-{
-	m_min.x = (float)(center.x - width  / 2.0);
-	m_min.y = (float)(center.y - height / 2.0);
-	m_max.x = (float)(center.x + width  / 2.0);
-	m_max.y = (float)(center.y + height / 2.0);
-}
-
-//-----------------------------------------------------------------------------
-void Rect::vertices(Vector2 v[4]) const
-{
-	// 3 ---- 2
-	// |      |
-	// |      |
-	// 0 ---- 1
-	v[0].x = m_min.x;
-	v[0].y = m_min.y;
-	v[1].x = m_max.x;
-	v[1].y = m_min.y;
-	v[2].x = m_max.x;
-	v[2].y = m_max.y;
-	v[3].x = m_min.x;
-	v[3].y = m_max.y;
-}
-
-//-----------------------------------------------------------------------------
-Vector2 Rect::vertex(uint32_t index) const
-{
-	CE_ASSERT(index < 4, "Index must be < 4");
-
-	switch (index)
-	{
-		case 0:
-			return Vector2(m_min.x, m_min.y);
-		case 1:
-			return Vector2(m_max.x, m_min.y);
-		case 2:
-			return Vector2(m_max.x, m_max.y);
-		case 3:
-			return Vector2(m_min.x, m_max.y);
-	}
-
-	return vector2::ZERO;
-}
-
-//-----------------------------------------------------------------------------
-Vector2 Rect::center() const
-{
-	return (m_min + m_max) * 0.5;
-}
-
-//-----------------------------------------------------------------------------
-float Rect::radius() const
-{
-	return vector2::length((m_max - (m_min + m_max) * 0.5));
-}
-
-//-----------------------------------------------------------------------------
-float Rect::area() const
-{
-	return (m_max.x - m_min.x) * (m_max.y - m_min.y);
-}
-
-//-----------------------------------------------------------------------------
-Vector2 Rect::size() const
-{
-	return (m_max - m_min);
-}
-
-//-----------------------------------------------------------------------------
-void Rect::fix()
-{
-	if (m_min.x > m_max.x)
-	{
-		math::swap(m_min.x, m_max.x);
-	}
-
-	if (m_min.y > m_max.y)
-	{
-		math::swap(m_min.y, m_max.y);
-	}
-}
-
-//-----------------------------------------------------------------------------
-Circle Rect::to_circle() const
-{
-	return Circle(center(), radius());
-}
-
-} // namespace crown
-

+ 0 - 130
engine/core/bv/Rect.h

@@ -1,130 +0,0 @@
-/*
-Copyright (c) 2013 Daniele Bartolini, Michele Rossi
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#pragma once
-
-#include "Types.h"
-#include "Vector2.h"
-
-namespace crown
-{
-
-class Circle;
-
-/// 2D rectangle.
-///
-/// Used mainly for collision detection and intersection tests.
-class Rect
-{
-public:
-
-	/// Does nothing for efficiency.
-					Rect();		
-
-	/// Constructs from  @a min and @a max
-					Rect(const Vector2& min, const Vector2& max);		
-					Rect(const Rect& rect);	
-
-	const Vector2&		min() const;					
-	const Vector2&		max() const;					
-	void			set_min(const Vector2& min);				
-	void			set_max(const Vector2& max);			
-
-	Vector2			center() const;					
-	float			radius() const;					
-	float			area() const;		
-
-	/// Returns the diagonal of the rect.
-	Vector2			size() const;						
-
-	/// Returns whether @a point point is contained into the rect.
-	bool			contains_point(const Vector2& point) const;
-
-	/// Returns whether the rect intersects @a r.
-	bool			intersects_rect(const Rect& rect) const;	
-
-	/// Sets the Rect from a @a center and a @a width - @a height
-	void			set_from_center_and_dimensions(Vector2 center, float width, float height);	
-
-	/// Returns the four vertices of the rect.
-	void			vertices(Vector2 v[4]) const;
-
-	/// Returns the @a index -th vetex of the rect.
-	Vector2			vertex(uint32_t index) const;			
-
-	/// Returns the equivalent circle.
-	Circle			to_circle() const;
-
-	/// Ensures that min and max aren't swapped.
-	void			fix();									
-
-private:
-
-	Vector2			m_min;
-	Vector2			m_max;
-};
-
-//-----------------------------------------------------------------------------
-inline Rect::Rect()
-{
-}
-
-//-----------------------------------------------------------------------------
-inline Rect::Rect(const Vector2& min, const Vector2& max) : m_min(min), m_max(max)
-{
-}
-
-//-----------------------------------------------------------------------------
-inline Rect::Rect(const Rect& rect) : m_min(rect.m_min), m_max(rect.m_max)
-{
-}
-
-//-----------------------------------------------------------------------------
-inline const Vector2& Rect::min() const
-{
-	return m_min;
-}
-
-//-----------------------------------------------------------------------------
-inline const Vector2& Rect::max() const
-{
-	return m_max;
-}
-
-//-----------------------------------------------------------------------------
-inline void Rect::set_min(const Vector2& min)
-{
-	m_min = min;
-}
-
-//-----------------------------------------------------------------------------
-inline void Rect::set_max(const Vector2& max)
-{
-	m_max = max;
-}
-
-} // namespace crown
-

+ 0 - 246
engine/core/math/Intersection.h

@@ -32,51 +32,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Frustum.h"
 #include "Frustum.h"
 #include "MathUtils.h"
 #include "MathUtils.h"
 #include "Types.h"
 #include "Types.h"
-#include "Circle.h"
-#include "Rect.h"
 #include "AABB.h"
 #include "AABB.h"
 
 
 namespace crown
 namespace crown
 {
 {
-
-/// Intersection test utils.
-/// Table of Intersection tests (3d)
-/// +----------+----------+----------+----------+----------+----------+
-/// |          | Ray      | Plane    | Sphere   | AABB      | Frustum  |
-/// +----------+----------+----------+----------+----------+----------+
-/// | Ray      | No       | Yes      | Yes      | No       | No       |
-/// +----------+----------+----------+----------+----------+----------+
-/// | Plane    | -        | Yes (1)  | Yes (+)  | No       | No       |
-/// +----------+----------+----------+----------+----------+----------+
-/// | Sphere   | -        | -        | Yes (+)  | No       | Yes      |
-/// +----------+----------+----------+----------+----------+----------+
-/// | AABB      | -        | -        | -        | Yes (+)  | Yes      |
-/// +----------+----------+----------+----------+----------+----------+
-/// | Frustum  | -        | -        | -        | -        | No       |
-/// +----------+----------+----------+----------+----------+----------+
-//
-/// Notes:
-/// (1): Intersection of three planes
-/// (-): Static intersection only
-/// (+): Static/Dynamic intersection
-/// Table of Intersection tests (2d)
-/// +---------------+----------+-------------+-------------+----------+----------+
-/// |               | Circle   | Rect        | O Rect      | Segment  | Ray 2d   |
-/// +---------------+----------+-------------+-------------+----------+----------+
-/// | Circle        | Yes (p-) | No          | No          | No       | No       |
-/// +---------------+----------+-------------+-------------+----------+----------+
-/// | Rect          | -        | Yes         | No          | No       | No       | <- Axis Aligned Rect
-/// +---------------+----------+-------------+-------------+----------+----------+
-/// | O Rect        | -        | -           | No          | No       | No       | <- Oriented Rect
-/// +---------------+----------+-------------+-------------+----------+----------+
-/// | Segment       | -        | -           | -           | No       | No       |
-/// +---------------+----------+-------------+-------------+----------+----------+
-/// | Ray 2d        | -        | -           | -           | -        | No       |
-/// +---------------+----------+-------------+-------------+----------+----------+
-/// Notes:
-/// (p): Penetration vector
-/// (-): Static intersection only
-/// (+): Static/Dynamic intersection
 class Intersection
 class Intersection
 {
 {
 public:
 public:
@@ -98,11 +57,6 @@ public:
 	static bool test_frustum_sphere(const Frustum& f, const Sphere& s);
 	static bool test_frustum_sphere(const Frustum& f, const Sphere& s);
 	static bool test_frustum_box(const Frustum& f, const AABB& box);
 	static bool test_frustum_box(const Frustum& f, const AABB& box);
 
 
-	static bool test_circle_circle(const Circle& c1, const Circle& c2, Vector2& penetration);
-	static bool test_dynamic_circle_circle(const Circle& c1, const Vector2& d1, const Circle& c2, const Vector2& d2, float& it);
-	static bool test_rect_rect(const Rect& r1, const Rect& r2, Vector2& penetration);
-	static bool test_circle_rect(const Circle& c1, const Rect& r2, Vector2& penetration);
-
 private:
 private:
 
 
 	// Disable construction
 	// Disable construction
@@ -485,204 +439,4 @@ inline bool Intersection::test_frustum_box(const Frustum& f, const AABB& b)
 	return true;
 	return true;
 }
 }
 
 
-//-----------------------------------------------------------------------------
-inline bool Intersection::test_circle_circle(const Circle& c1, const Circle& c2, Vector2& penetration)
-{
-	Vector2 distance = c1.center() - c2.center();
-	float distanceLen2 = vector2::squared_length(distance);
-	float radiusSum = c1.radius() + c2.radius();
-	if (distanceLen2 > radiusSum*radiusSum)
-	{
-		return false;
-	}
-
-	if (distanceLen2 < 0.001)
-	{
-		penetration = Vector2(c1.radius(), 0.0);
-	}
-	else
-	{
-		distanceLen2 = math::sqrt(distanceLen2);
-		penetration = distance * ((radiusSum - distanceLen2) / distanceLen2);
-	}
-	return true;
-}
-
-//-----------------------------------------------------------------------------
-inline bool Intersection::test_dynamic_circle_circle(const Circle& c1, const Vector2& d1, const Circle& c2, const Vector2& d2, float& it)
-{
-	// c1 == static circle
-	// c2 == moving circle
-	Vector2 d = d2 - d1;
-	vector2::normalize(d);
-
-	const Vector2& cs = c1.center();
-	const Vector2& cm = c2.center();
-
-	Vector2 e = cs - cm;
-	float r = c1.radius() + c2.radius();
-
-	// If ||e|| < r, int32_tersection occurs at t = 0
-	if (vector2::length(e) < r)
-	{
-		it = 0.0;
-		return true;
-	}
-
-	// it == Intersection Time
-	float ed = vector2::dot(e, d);
-	float squared = (ed * ed) + (r * r) - vector2::dot(e, e);
-
-	// If the value inside the square root is neg, then no int32_tersection
-	if (squared < 0.0)
-	{
-		return false;
-	}
-
-	float t = ed - math::sqrt(squared);
-	float l = vector2::length(d2 - d1);
-
-	// If t < 0 || t > l, then non int32_tersection in the considered period of time
-	if (t < 0.0 || t > l)
-	{
-		return false;
-	}
-
-	it = t / l;
-	return true;
-}
-
-//-----------------------------------------------------------------------------
-inline bool Intersection::test_rect_rect(const Rect& r1, const Rect& r2, Vector2& penetration)
-{
-	//x
-	float min1MinusMax2 = r1.min().x - r2.max().x;
-	float min2MinusMax1 = r2.min().x - r1.max().x;
-
-	if (min1MinusMax2 > min2MinusMax1)
-	{
-		if (min1MinusMax2 > 0)
-		{
-			return false;
-		}
-		penetration.x = -min1MinusMax2;
-	}
-	else
-	{
-		if (min2MinusMax1 > 0)
-		{
-			return false;
-		}
-		penetration.x = min2MinusMax1;
-	}
-
-	//y
-	min1MinusMax2 = r1.min().y - r2.max().y;
-	min2MinusMax1 = r2.min().y - r1.max().y;
-
-	if (min1MinusMax2 > min2MinusMax1)
-	{
-		if (min1MinusMax2 > 0)
-		{
-			return false;
-		}
-		penetration.y = -min1MinusMax2;
-	}
-	else
-	{
-		if (min2MinusMax1 > 0)
-		{
-			return false;
-		}
-		penetration.y = min2MinusMax1;
-	}
-
-	if (math::abs(penetration.x) < math::abs(penetration.y))
-	{
-		penetration.y = 0.0;
-	}
-	else
-	{
-		penetration.x = 0.0;
-	}
-
-	return true;
-}
-
-//-----------------------------------------------------------------------------
-inline bool Intersection::test_circle_rect(const Circle& c1, const Rect& r2, Vector2& penetration)
-{
-	bool circleIsAtRight;
-	if (c1.center().x > (r2.min().x + r2.max().x) / 2)
-	{
-		penetration.x = (c1.center().x - c1.radius()) - r2.max().x;
-		circleIsAtRight = true;
-	}
-	else
-	{
-		penetration.x = r2.min().x - (c1.center().x + c1.radius());
-		circleIsAtRight = false;
-	}
-
-	bool circleIsAtTop;
-	if (c1.center().y > (r2.min().y + r2.max().y) / 2)
-	{
-		penetration.y = (c1.center().y - c1.radius()) - r2.max().y;
-		circleIsAtTop = true;
-	}
-	else
-	{
-		penetration.y = r2.min().y - (c1.center().y + c1.radius());
-		circleIsAtTop = false;
-	}
-
-	if (penetration.x < -c1.radius() || penetration.y < -c1.radius())
-	{
-		if (penetration.y > 0 || penetration.x > 0)
-		{
-			return false;
-		}
-		if (penetration.x > penetration.y)
-		{
-			penetration.y = 0;
-		}
-		else
-		{
-			penetration.x = 0;
-		}
-	}
-	//else if (penetration.y < -c1.radius())
-	//{
-	//	if (penetration.x > 0)
-	//	{
-	//		return false;
-	//	}
-	//	penetration.y = 0;
-	//}
-	else
-	{
-		penetration += Vector2(c1.radius(), c1.radius());
-		float len = math::sqrt(vector2::squared_length(penetration));
-		if (len > c1.radius())
-		{
-			return false;
-		}
-		//The - is to point32_t outwards
-		penetration *= - (c1.radius() - len) / len;
-	}
-
-	if (circleIsAtRight)
-	{
-		penetration.x *= -1;
-	}
-
-	if (circleIsAtTop)
-	{
-		penetration.y *= -1;
-	}
-	
-	return true;
-}
-
 } // namespace crown
 } // namespace crown
-