-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor|FakeRadio: Moved ShadowEdge to new source files; applied pim…
…pl idiom
- Loading branch information
1 parent
d7f8ae8
commit fbdb4e1
Showing
5 changed files
with
334 additions
and
215 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** @file render/shadowedge.h FakeRadio Shadow Edge Geometry | ||
* | ||
* @authors Copyright © 2004-2013 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net> | ||
* | ||
* @par License | ||
* GPL: http://www.gnu.org/licenses/gpl.html | ||
* | ||
* <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> | ||
*/ | ||
|
||
#ifndef DENG_RENDER_FAKERADIO_SHADOWEDGE_H | ||
#define DENG_RENDER_FAKERADIO_SHADOWEDGE_H | ||
|
||
#include <de/Vector> | ||
|
||
#include "Line" | ||
|
||
class BspLeaf; | ||
|
||
namespace de { | ||
|
||
static coord_t const SHADOWEDGE_OPEN_THRESHOLD = 8; // world units (Z axis) | ||
|
||
/** | ||
* @ingroup render | ||
*/ | ||
class ShadowEdge | ||
{ | ||
public: | ||
ShadowEdge(BspLeaf &bspLeaf, Line::Side &side, int edge); | ||
|
||
void prepare(int planeIndex); | ||
|
||
float openness() const; | ||
|
||
float sideOpenness() const; | ||
|
||
Vector3d const &inner() const; | ||
|
||
Vector3d const &outer() const; | ||
|
||
inline coord_t length() const { | ||
return Vector3d(outer() - inner()).abs().length(); | ||
} | ||
|
||
private: | ||
DENG2_PRIVATE(d) | ||
}; | ||
|
||
} // namespace de | ||
|
||
#endif // DENG_RENDER_FAKERADIO_SHADOWEDGE_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
Oops, something went wrong.