Skip to content

Commit

Permalink
BiasIllum: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Aug 2, 2013
1 parent b924a9b commit 613fd6c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions doomsday/client/src/render/biasillum.cpp
Expand Up @@ -35,20 +35,20 @@ static int devUseSightCheck = true; //cvar

DENG2_PIMPL_NOREF(BiasIllum)
{
BiasTracker *surface; ///< The "control" surface.
BiasTracker *tracker; ///< Controlling tracker.
Vector3f color; ///< Current light color.
Vector3f dest; ///< Destination light color (interpolated to).
uint updateTime; ///< When the value was calculated.
bool interpolating; ///< Set to @c true during interpolation.

/**
* Cast lighting contributions from each source that affects the map point.
* Order is the same as that in the affected surface.
* Order is the same as that in the tracker.
*/
Vector3f casted[MAX_CONTRIBUTORS];

Instance(BiasTracker *surface)
: surface(surface),
Instance(BiasTracker *tracker)
: tracker(tracker),
updateTime(0),
interpolating(false)
{}
Expand Down Expand Up @@ -115,7 +115,7 @@ DENG2_PIMPL_NOREF(BiasIllum)
// This is what we will be interpolating to.
dest = newColor;
interpolating = true;
updateTime = surface->timeOfLatestContributorUpdate();
updateTime = tracker->timeOfLatestContributorUpdate();
}

#undef COLOR_CHANGE_THRESHOLD
Expand All @@ -132,7 +132,7 @@ DENG2_PIMPL_NOREF(BiasIllum)
void updateContribution(int index, Vector3d const &point,
Vector3f const &normalAtPoint, MapElement &bspRoot)
{
BiasSource const &source = surface->contributor(index);
BiasSource const &source = tracker->contributor(index);

Vector3f &casted = contribution(index);

Expand Down Expand Up @@ -208,15 +208,15 @@ DENG2_PIMPL_NOREF(BiasIllum)

float const BiasIllum::MIN_INTENSITY = .005f;

BiasIllum::BiasIllum(BiasTracker *surface) : d(new Instance(surface))
BiasIllum::BiasIllum(BiasTracker *tracker) : d(new Instance(tracker))
{}

void BiasIllum::evaluate(Vector3f &color, Vector3d const &point,
Vector3f const &normalAtPoint, uint biasTime,
/// @todo Refactor away:
byte activeContributors, byte changedContributions)
{
// Does the surface have any lighting changes to apply?
// Does the tracker have any lighting changes to apply?
if(changedContributions)
{
if(activeContributors & changedContributions)
Expand Down

0 comments on commit 613fd6c

Please sign in to comment.