How do I access an array of objects inside of an array of objects?
my code:
private boolean intersect(Polygon[] polygons, Line[] the_path, int i, int j)
{
int k = 0;
boolean intersect;
if(intersect == true)
{
for(i = 0; i < polygons.length; i++)
for(j = 0; j < polygons._lines.length; j++)
for(k = 0; k < the_path.length; k++)
intersect = polygons._lines[j].intersect(the_path[k]);
}
return intersect;
}
The intersect method in the array of lines returns a boolean, but there is a separate array of line objects in each of the polygons....how do I go about accessing that method? (note..I don't know if this exact code will do what I want yet, but either way I need to be able to access that method)