Physics Project 0.4/Physics Sandbox/Object.cpp
bool Object::CheckCollision( int xcheck, int ycheck )
{
    /*
    int N = vertices.size();
    int counter = 0;
    int i;
    double xinters;
    Vertex p1,p2;

    p1 = vertices[0];
    for( i = 1; i <= N; i++ )
    {
        p2 = vertices[i % N];
        if (p.Y() > MIN(p1.Y(),p2.Y()))
        {
            if (p.Y() <= MAX(p1.Y(),p2.Y()))
            {
                if (p.X() <= MAX(p1.X(),p2.X()))
                {
                    if (p1.Y() != p2.Y())
                    {
                        xinters = (ycheck-p1.Y())*(p2.X()-p1.X())/(p2.Y()-p1.Y()y)+p1.X();
                        if (p1.X() == p2.X() || xcheck <= xinters)
                        {
                            counter++;
                        }
                    }
                }
            }
            p1 = p2;
        }
    }

    if (counter % 2 == 0){
        return false;
    }else{
        return true;
    }
    */
}
//Check collision between object and a given point

Check collision between object and a given point
Check collision between object and a given point
bool Object::CheckCollision( int xcheck, int ycheck )
{
}
bool Object :: CheckCollision ( int xcheck , int ycheck ) { }
Check collision between object and a given point
Check collision between object and a given point
/*
    int N = vertices.size();
    int counter = 0;
    int i;
    double xinters;
    Vertex p1,p2;

    p1 = vertices[0];
    for( i = 1; i <= N; i++ )
    {
        p2 = vertices[i % N];
        if (p.Y() > MIN(p1.Y(),p2.Y()))
        {
            if (p.Y() <= MAX(p1.Y(),p2.Y()))
            {
                if (p.X() <= MAX(p1.X(),p2.X()))
                {
                    if (p1.Y() != p2.Y())
                    {
                        xinters = (ycheck-p1.Y())*(p2.X()-p1.X())/(p2.Y()-p1.Y()y)+p1.X();
                        if (p1.X() == p2.X() || xcheck <= xinters)
                        {
                            counter++;
                        }
                    }
                }
            }
            p1 = p2;
        }
    }

    if (counter % 2 == 0){
        return false;
    }else{
        return true;
    }
    */