Commit 553e4f29 authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

ART - SimulationEngine

- now makes sure that copied rays will also trace through the ground
parent 2b2f2c71
......@@ -54,21 +54,26 @@ class CWorker
double tOffset = pRay->at(idxEndReflection).timeStamp - pRay->at(idxStartReflection).timeStamp;
VistaVector3D rXYOffset = pRay->at(idxEndReflection).position - pRay->at(idxStartReflection).position;
for (int idx = idxStartReflection+1; idx < idxEndReflection; idx++)
for (int idx = idxStartReflection + 1; idx < idxEndReflection; idx++)
{
const double t = pRay->at(idx).timeStamp + tOffset;
const VistaVector3D r = pRay->at(idx).position + rXYOffset;
const VistaVector3D n = pRay->at(idx).wavefrontNormal;
VistaVector3D r = pRay->at(idx).position + rXYOffset;
VistaVector3D n = pRay->at(idx).wavefrontNormal;
r[Vista::Z] = -r[Vista::Z];
n[Vista::Z] = -n[Vista::Z];
pRay->Append(r, n, t);
rExternalWatcher.ProcessRay(pRay);
if (rExternalWatcher.AbortRequested(pRay))
return;
}
const double t = pRay->at(idxEndReflection).timeStamp + tOffset;
const VistaVector3D r = pRay->at(idxEndReflection).position + rXYOffset;
const VistaVector3D n = pRay->at(idxEndReflection).wavefrontNormal;
VistaVector3D r = pRay->at(idxEndReflection).position + rXYOffset;
VistaVector3D n = pRay->at(idxEndReflection).wavefrontNormal;
r[Vista::Z] = -r[Vista::Z];
n[Vista::Z] = -n[Vista::Z];
pRay->AppendReflection(r, n, t);
rExternalWatcher.ProcessRay(pRay);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment