Text archives Help
- From: cgribble@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1561 - trunk/DynLT
- Date: Thu, 26 Jul 2007 12:29:22 -0600 (MDT)
Author: cgribble
Date: Thu Jul 26 12:29:22 2007
New Revision: 1561
Modified:
trunk/DynLT/DynLTCGT.cc
Log:
Yet another fix: handle datasets with variable radii appropriately
Modified: trunk/DynLT/DynLTCGT.cc
==============================================================================
--- trunk/DynLT/DynLTCGT.cc (original)
+++ trunk/DynLT/DynLTCGT.cc Thu Jul 26 12:29:22 2007
@@ -2,30 +2,30 @@
#include <DynLT/DynLTCGT.h>
#include <Model/Readers/ParticleNRRD.h>
-namespace Manta
-{
+#include <iostream>
+using std::cout;
-DynLTCGT::DynLTCGT(ParticleNRRD& pnrrd, DynLTQueue* queue, float* spheres,
- int nspheres, int nvars, int ncells, int depth, Real
radius,
- int ridx, RegularColorMap* cmap, int cidx, int
textureMode)
- : DynLTGridSpheres(queue, spheres, nspheres, nvars, ncells, depth, radius,
- ridx, cmap, cidx,textureMode)
+namespace Manta
{
- grid = new ParticleGrid(pnrrd, radius, -1, cidx, this, this);
-}
+ DynLTCGT::DynLTCGT(ParticleNRRD& pnrrd, DynLTQueue* queue, float* spheres,
+ int nspheres, int nvars, int ncells, int depth, Real
radius,
+ int ridx, RegularColorMap* cmap, int cidx, int
textureMode)
+ : DynLTGridSpheres(queue, spheres, nspheres, nvars, ncells, depth,
radius,
+ ridx, cmap, cidx,textureMode)
+ {
+ grid = new ParticleGrid(pnrrd, radius, ridx, cidx, this, this);
+ }
void DynLTCGT::intersect(const RenderContext& context,
RayPacket& packet) const
{
- if (packet.getDepth() > 0 &&
- packet.end() - packet.begin() > 1) {
- // Packet of secondary (or deeper) rays, use GridSpheres
- DynLTGridSpheres::intersect(context, packet);
+ if (packet.getFlag(RayPacket::ConstantOrigin)) {
+ grid->intersect(context, packet);
return;
}
- // Packet of primary rays or a packet of size 1, use ParticleCGT
- grid->intersect(context, packet);
+ // Packets with non-constant origin use GridSpheres
+ DynLTGridSpheres::intersect(context, packet);
//computeNormal(context, packet);
//computeTexCoords2(context, packet);
- [MANTA] r1561 - trunk/DynLT, cgribble, 07/26/2007
Archive powered by MHonArc 2.6.16.