Skip to content

Commit

Permalink
World|Sector: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Apr 22, 2014
1 parent 908e0a3 commit ee85b27
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions doomsday/client/include/world/sector.h
Expand Up @@ -68,8 +68,6 @@ class Sector : public de::MapElement
* Adjacent BSP leafs in the sector (i.e., those which share one or more
* common edge) are grouped into a "cluster". Clusters are never empty and
* will always contain at least one BSP leaf.
*
* Call Sector::buildClusters to rebuild the cluster set for the sector.
*/
class Cluster
{
Expand Down Expand Up @@ -558,16 +556,16 @@ class SectorClusterCirculator
*
* @param direction Relative direction of the desired neighbor.
*/
de::HEdge const &neighbor(de::ClockDirection direction) {
de::HEdge &neighbor(de::ClockDirection direction) {
_current = &getNeighbor(*_current, direction, _cluster);
return *_current;
}

/// Returns the next half-edge (clockwise) and advances the circulator.
inline de::HEdge const &next() { return neighbor(de::Clockwise); }
inline de::HEdge &next() { return neighbor(de::Clockwise); }

/// Returns the previous half-edge (anticlockwise) and advances the circulator.
inline de::HEdge const &previous() { return neighbor(de::Anticlockwise); }
inline de::HEdge &previous() { return neighbor(de::Anticlockwise); }

/// Advance to the next half-edge (clockwise).
inline SectorClusterCirculator &operator ++ () {
Expand Down Expand Up @@ -598,7 +596,7 @@ class SectorClusterCirculator
}

/// Returns the current half-edge of a non-empty sequence.
de::HEdge const &operator * () const {
de::HEdge &operator * () const {
if(!_current)
{
/// @throw NullError Attempted to dereference a "null" circulator.
Expand All @@ -609,17 +607,17 @@ class SectorClusterCirculator

/// Returns a pointer to the current half-edge (might be @c NULL, meaning the
/// circulator references an empty sequence).
de::HEdge const *operator -> () const { return _current; }
de::HEdge *operator -> () { return _current; }

private:
static SectorCluster *getCluster(de::HEdge const &hedge);

static de::HEdge const &getNeighbor(de::HEdge const &hedge, de::ClockDirection direction,
SectorCluster const *cluster = 0);
static de::HEdge &getNeighbor(de::HEdge const &hedge, de::ClockDirection direction,
SectorCluster const *cluster = 0);

de::HEdge const *_hedge;
de::HEdge const *_current;
SectorCluster const *_cluster;
de::HEdge *_hedge;
de::HEdge *_current;
SectorCluster *_cluster;
};

#endif // DENG_WORLD_SECTOR_H

0 comments on commit ee85b27

Please sign in to comment.