Skip to content

Commit

Permalink
Line: Side relative accessors; made private more instance data
Browse files Browse the repository at this point in the history
Line::Side now features a set of side relative accessors enabling
users of the class to implement their algorithms more expressively.

Made use of the new functionality to simplify various algorithms
in the FakeRadio and light decoration modules.

The client-only FakeRadio data for line was moved to that module.

Applied the pimpl idiom to Line::Side and Line::Side::Section and
added a Line::FlagsChange audience (which Line::Side observes on
client side).

Plus significant clean up.
  • Loading branch information
danij-deng committed Apr 16, 2013
1 parent 0525518 commit 451158e
Show file tree
Hide file tree
Showing 18 changed files with 751 additions and 687 deletions.
2 changes: 1 addition & 1 deletion doomsday/client/include/map/bsp/lineinfo.h
Expand Up @@ -74,7 +74,7 @@ struct LineInfo
(de::abs(from.origin()[VY] - to.origin()[VY]) < distEpsilon))
flags |= ZeroLength;

if(line->hasBackSections() && line->hasFrontSections())
if(line->hasFrontSections() && line->hasBackSections())
{
flags |= Twosided;

Expand Down
6 changes: 3 additions & 3 deletions doomsday/client/include/map/hedge.h
Expand Up @@ -124,7 +124,7 @@ class HEdge : public de::MapElement
/// Accurate length of the segment (v1 -> v2).
coord_t _length;

/// For each @ref SideSection.
/// For each section of a Line::Side.
biassurface_t *_bsuf[3];

/// @ref hedgeFrameFlags
Expand Down Expand Up @@ -396,7 +396,7 @@ class HEdge : public de::MapElement
/**
* Prepare wall division data for a section of the HEdge.
*
* @param section Section to prepare divisions for.
* @param section Line::Side section to prepare divisions for.
* @param frontSector Sector to use for the front side.
* @param backSector Sector to use for the back side.
* @param leftWallDivs Division data for the left edge is written here.
Expand All @@ -406,7 +406,7 @@ class HEdge : public de::MapElement
* @return @c true if divisions were prepared (the specified @a section has a
* non-zero Z axis height).
*/
bool prepareWallDivs(SideSection section, Sector *frontSector, Sector *backSector,
bool prepareWallDivs(int section, Sector *frontSector, Sector *backSector,
walldivs_t *leftWallDivs, walldivs_t *rightWallDivs, pvec2f_t matOffset) const;

/**
Expand Down

0 comments on commit 451158e

Please sign in to comment.