Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Moved line of sight test algorithm into GameMap
- Loading branch information
1 parent
1977698
commit fa9c500
Showing
17 changed files
with
361 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,41 @@ | ||
/**\file | ||
*\section License | ||
* License: GPL | ||
* Online License Link: http://www.gnu.org/licenses/gpl.html | ||
* | ||
*\author Copyright © 2003-2012 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
*\author Copyright © 2006-2012 Daniel Swanson <danij@dengine.net> | ||
/** | ||
* @file p_sight.h | ||
* Gamemap Line of Sight Testing. @ingroup map | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* @authors Copyright © 2003-2012 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
* @authors Copyright © 2006-2012 Daniel Swanson <danij@dengine.net> | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* @par License | ||
* GPL: http://www.gnu.org/licenses/gpl.html | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin St, Fifth Floor, | ||
* Boston, MA 02110-1301 USA | ||
* <small>This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. This program is distributed in the hope that it | ||
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
* Public License for more details. You should have received a copy of the GNU | ||
* General Public License along with this program; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA</small> | ||
*/ | ||
|
||
/** | ||
* de_play.h: Line of Sight Testing | ||
*/ | ||
#ifndef LIBDENG_MAP_GAMEMAP_SIGHT_H | ||
#define LIBDENG_MAP_GAMEMAP_SIGHT_H | ||
|
||
#ifndef __DOOMSDAY_PLAY_SIGHT_H__ | ||
#define __DOOMSDAY_PLAY_SIGHT_H__ | ||
#include "gamemap.h" | ||
|
||
boolean P_CheckLineSight(const float from[3], const float to[3], | ||
float bottomSlope, float topSlope, int flags); | ||
/** | ||
* Traces a line of sight. | ||
* | ||
* @param from World position, trace origin coordinates. | ||
* @param to World position, trace target coordinates. | ||
* @param flags Line Sight Flags (LS_*) @see lineSightFlags | ||
* | ||
* @return @c true if the traverser function returns @c true | ||
* for all visited lines. | ||
*/ | ||
boolean GameMap_CheckLineSight(GameMap* map, const float from[3], const float to[3], | ||
float bottomSlope, float topSlope, int flags); | ||
|
||
#endif | ||
#endif /// LIBDENG_MAP_GAMEMAP_SIGHT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.