Example #1
0
void GraphicsWorld::DebugDrawCircle(const Circle &c, int numSubdivisions, const Color &clr, bool depthTest)
{
    float3 p = c.GetPoint(0);
    for(int i = 1; i <= numSubdivisions; ++i)
    {
        float3 p2 = c.GetPoint(i * 2.f * 3.14f / numSubdivisions);
        DebugDrawLineSegment(LineSegment(p, p2), clr, depthTest);
        p = p2;
    }
}
Example #2
0
float3 Capsule::PointInside(float l, float a, float d) const
{
	Circle c = CrossSection(l);
	return c.GetPoint(a*2.f*pi, d);
}
Example #3
0
 static inline bool IsColliding( Circle a,Point b ){
     return b.GetDistance(a.GetPoint()) <= a.r;
 }
Example #4
0
	static inline bool IsColliding( Circle& b,Circle& a ){
        if ( a.GetPoint().GetDistance(b.GetPoint())  <= b.r+a.r){
            return true;
        }
        return false;
    }