Ejemplo n.º 1
0
Archivo: box.cpp Proyecto: garinh/cs
int csBox3::Adjacent (const csBox3 &other, float epsilon) const
{
    if (AdjacentX (other, epsilon))
    {
        if (other.MaxX () > MaxX ())
            return CS_BOX_SIDE_X;
        else
            return CS_BOX_SIDE_x;
    }

    if (AdjacentY (other, epsilon))
    {
        if (other.MaxY () > MaxY ())
            return CS_BOX_SIDE_Y;
        else
            return CS_BOX_SIDE_y;
    }

    if (AdjacentZ (other, epsilon))
    {
        if (other.MaxZ () > MaxZ ())
            return CS_BOX_SIDE_Z;
        else
            return CS_BOX_SIDE_z;
    }

    return -1;
}
Ejemplo n.º 2
0
int csBox3::Adjacent (const csBox3& other) const
{
  if (AdjacentX (other))
  {
    if (other.MaxX () > MaxX ()) return BOX_SIDE_X;
    else return BOX_SIDE_x;
  }
  if (AdjacentY (other))
  {
    if (other.MaxY () > MaxY ()) return BOX_SIDE_Y;
    else return BOX_SIDE_y;
  }
  if (AdjacentZ (other))
  {
    if (other.MaxZ () > MaxZ ()) return BOX_SIDE_Z;
    else return BOX_SIDE_z;
  }
  return -1;
}