Skip to content

Commit

Permalink
Client|Shadow Bias: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Aug 4, 2013
1 parent ae58dac commit 53a74cb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
4 changes: 1 addition & 3 deletions doomsday/client/src/render/biasillum.cpp
Expand Up @@ -100,7 +100,7 @@ DENG2_PIMPL_NOREF(BiasIllum)
// Do we need to re-accumulate light contributions?
if(activeContributors)
{
/// Maximum accumulated color strength.
// Maximum accumulated color strength.
static Vector3f const saturated(1, 1, 1);

for(int i = 0; i < MAX_CONTRIBUTORS; ++i)
Expand Down Expand Up @@ -162,7 +162,6 @@ DENG2_PIMPL_NOREF(BiasIllum)
DENG_ASSERT(tracker != 0);

BiasSource const &source = tracker->contributor(index);

Vector3f &casted = contribution(index);

/// @todo LineSightTest should (optionally) perform this test.
Expand All @@ -178,7 +177,6 @@ DENG2_PIMPL_NOREF(BiasIllum)
}

Vector3d sourceToPoint = source.origin() - point;

double distance = sourceToPoint.length();
double dot = sourceToPoint.normalize().dot(normalAtPoint);

Expand Down
14 changes: 6 additions & 8 deletions doomsday/client/src/render/biassource.cpp
Expand Up @@ -69,7 +69,7 @@ DENG2_PIMPL(BiasSource)
color(color),
minLight(minLight),
maxLight(maxLight),
lastUpdateTime(0), // Force an update (vertices are STILL_UNSEEN).
lastUpdateTime(0), // Force an update.
changed(true)
{}

Expand All @@ -83,7 +83,7 @@ DENG2_PIMPL(BiasSource)
color(other.color),
minLight(other.minLight),
maxLight(other.maxLight),
lastUpdateTime(0), // Force an update (vertices are STILL_UNSEEN).
lastUpdateTime(0), // Force an update.
changed(true)
{}

Expand Down Expand Up @@ -172,10 +172,8 @@ void BiasSource::setOrigin(Vector3d const &newOrigin)
{
if(d->origin != newOrigin)
{
//qDebug() << "BiasSource" << App_World().map().toIndex(*this) << "new origin" << newOrigin.asText();

d->changed = true;
d->origin = newOrigin;
d->origin = newOrigin;
d->bspLeaf = 0;

// Notify interested parties of the change.
Expand Down Expand Up @@ -233,7 +231,7 @@ BiasSource &BiasSource::setColor(Vector3f const &newColor)
{
Vector3f oldColor = d->color;

d->color = newColorAmplified;
d->color = newColorAmplified;
d->changed = true;

// Notify interested parties of the change.
Expand All @@ -258,7 +256,7 @@ BiasSource &BiasSource::setIntensity(float newIntensity)
if(!d->inVoid)
{
d->intensity = d->primaryIntensity;
d->changed = true;
d->changed = true;
}

// Notify interested parties of the change.
Expand Down Expand Up @@ -298,7 +296,7 @@ bool BiasSource::trackChanges(BiasDigest &changes, uint digestIndex, uint curren
if(newIntensity != oldIntensity)
{
d->intensity = newIntensity;
d->changed = true;
d->changed = true;
}
}

Expand Down
5 changes: 1 addition & 4 deletions doomsday/client/src/world/bspleaf.cpp
Expand Up @@ -50,9 +50,6 @@ ddouble triangleArea(Vector2d const &v1, Vector2d const &v2, Vector2d const &v3)
}

#ifdef __CLIENT__
/**
* Structure containing data for a geometry group.
*/
struct GeometryGroup
{
typedef QList<BiasIllum> BiasIllums;
Expand Down Expand Up @@ -295,7 +292,7 @@ DENG2_PIMPL(BspLeaf)
}

/**
* Retrieve the geometry data for the unique @a group identifier.
* Retrieve geometry data by it's associated unique @a group identifier.
*
* @param group Geometry group identifier.
* @param canAlloc @c true= to allocate if no data exists. Note that the
Expand Down
9 changes: 2 additions & 7 deletions doomsday/client/src/world/segment.cpp
Expand Up @@ -41,9 +41,6 @@
using namespace de;

#ifdef __CLIENT__
/**
* Structure containing data for a geometry group.
*/
struct GeometryGroup
{
typedef QList<BiasIllum> BiasIllums;
Expand Down Expand Up @@ -99,12 +96,10 @@ DENG2_PIMPL(Segment)

#ifdef __CLIENT__
/**
* Retrieve the geometry data for the unique @a group identifier.
* Retrieve geometry data by it's associated unique @a group identifier.
*
* @param group Geometry group identifier.
* @param canAlloc @c true= to allocate if no data exists. Note that the
* number of vertices in the fan geometry must be known
* at this time.
* @param canAlloc @c true= to allocate if no data exists.
*/
GeometryGroup *geometryGroup(int group, bool canAlloc = true)
{
Expand Down

0 comments on commit 53a74cb

Please sign in to comment.