Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1350 - trunk/Engine/Renderers
- Date: Wed, 18 Apr 2007 15:48:26 -0600 (MDT)
Author: bigler
Date: Wed Apr 18 15:48:26 2007
New Revision: 1350
Modified:
trunk/Engine/Renderers/Raytracer.cc
Log:
Support for multi-ray packets. It does a depth first print out
(mirrors execution order).
Added ray index printing, and reordered the output variables. This
shouldn't make a difference for the python reader, as it was looking
for keywords instead of relying on the order of data.
Modified: trunk/Engine/Renderers/Raytracer.cc
==============================================================================
--- trunk/Engine/Renderers/Raytracer.cc (original)
+++ trunk/Engine/Renderers/Raytracer.cc Wed Apr 18 15:48:26 2007
@@ -56,25 +56,38 @@
// same object and material to shade with a single shade call
for(int i = rays.begin();i<rays.end();){
if(rays.wasHit(i)){
- if (debugFlag) {
- rays.computeHitPositions();
- cerr << "raytree: origin "<< rays.getOrigin(i) << " direction "<<
rays.getDirection(i) << " hitpos " << rays.getHitPosition(i) << " depth " <<
rays.getDepth() << "\n";
- }
const Material* hit_matl = rays.getHitMaterial(i);
int end = i+1;
while(end < rays.end() && rays.wasHit(end) &&
rays.getHitMaterial(end) == hit_matl)
end++;
+ if (debugFlag) {
+ rays.computeHitPositions();
+ for (int j = i; j < end; ++j) {
+ cerr << "raytree: ray_index "<<j
+ << " depth " << rays.getDepth()
+ << " origin "<< rays.getOrigin(j)
+ << " direction "<< rays.getDirection(j)
+ << " hitpos " << rays.getHitPosition(j)
+ << "\n";
+ }
+ }
RayPacket subPacket(rays, i, end);
hit_matl->shade(context, subPacket);
i=end;
} else {
- if (debugFlag) {
- cerr << "raytree: origin "<< rays.getOrigin(i) << " direction "<<
rays.getDirection(i) << " depth " << rays.getDepth() << "\n";
- }
int end = i+1;
while(end < rays.end() && !rays.wasHit(end))
end++;
+ if (debugFlag) {
+ for (int j = i; j < end; ++j) {
+ cerr << "raytree: ray_index "<<j
+ << " depth " << rays.getDepth()
+ << " origin "<< rays.getOrigin(j)
+ << " direction "<< rays.getDirection(j)
+ << "\n";
+ }
+ }
RayPacket subPacket(rays, i, end);
context.scene->getBackground()->shade(context, subPacket);
i=end;
- [MANTA] r1350 - trunk/Engine/Renderers, bigler, 04/18/2007
Archive powered by MHonArc 2.6.16.