Re: Cut Objects for perspective view

by alied » Wed Dec 23, 2009 2:43 pm

Hi, I've been doing some work, and I get to the problem of knowing which window is attached to a wall.

Maybe this can help:

Code: Select all

    
private boolean isBoundToWall(Wall wall, HomeDoorOrWindow doorOrWindow) {
        return doorOrWindow.isBoundToWall() && wall.intersectsRectangle(doorOrWindow.getPoints()[0][0], 
                                        doorOrWindow.getPoints()[0][1], 
                                        doorOrWindow.getPoints()[2][0], 
                                        doorOrWindow.getPoints()[2][1]);
    }