Search in sources :

Example 1 with XYZProjectedPoint

use of org.jwildfire.create.tina.base.XYZProjectedPoint in project JWildfire by thargor6.

the class LightViewCalculator method project.

public void project(XYZPoint pPoint, XYZProjectedPoint pProjectedPoint) {
    for (int i = 0; i < lightProjectionMatrix.length; i++) {
        if (lightProjectionMatrix[i] != null) {
            pProjectedPoint.lightX[i] = applyLightProjectionX(i, pPoint.x, pPoint.y, pPoint.z);
            pProjectedPoint.lightY[i] = applyLightProjectionY(i, pPoint.x, pPoint.y, pPoint.z);
            pProjectedPoint.lightZ[i] = applyLightProjectionZ(i, pPoint.x, pPoint.y, pPoint.z);
            pProjectedPoint.hasLight[i] = true;
        } else {
            pProjectedPoint.hasLight[i] = false;
        }
    }
}
Also used : XYZProjectedPoint(org.jwildfire.create.tina.base.XYZProjectedPoint) XYZPoint(org.jwildfire.create.tina.base.XYZPoint)

Example 2 with XYZProjectedPoint

use of org.jwildfire.create.tina.base.XYZProjectedPoint in project JWildfire by thargor6.

the class JWildfireApplet method notifyIterationFinished.

@Override
public void notifyIterationFinished(AbstractRenderThread pEventSource, int pPlotX, int pPlotY, XYZProjectedPoint pProjectedPoint, double pX, double pY, double pZ, double pColorRed, double pColorGreen, double pColorBlue) {
    int x = pPlotX / pEventSource.getOversample();
    int y = pPlotY / pEventSource.getOversample();
    iterationCount[pEventSource.getThreadId()] = pEventSource.getCurrSample();
    long iteration = calculateSampleCount();
    if (x >= 0 && x < image.getImageWidth() && y >= 0 && y < image.getImageHeight()) {
        image.setARGB(x, y, pEventSource.getTonemapper().tonemapSample(x, y));
        if (iteration % 2000 == 0) {
            updateImage();
        }
        if (iteration % 10000 == 0) {
            double quality = pEventSource.getTonemapper().calcDensity(iteration);
            updateStats(pEventSource, quality);
            pEventSource.getTonemapper().setDensity(quality);
        }
    }
}
Also used : XYZProjectedPoint(org.jwildfire.create.tina.base.XYZProjectedPoint)

Aggregations

XYZProjectedPoint (org.jwildfire.create.tina.base.XYZProjectedPoint)2 XYZPoint (org.jwildfire.create.tina.base.XYZPoint)1