Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r1381 - in trunk: Core/Geometry Engine/PixelSamplers Interface Model/Groups Model/MiscObjects Model/Primitives


Chronological Thread 
  • From: thiago@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r1381 - in trunk: Core/Geometry Engine/PixelSamplers Interface Model/Groups Model/MiscObjects Model/Primitives
  • Date: Wed, 9 May 2007 12:48:48 -0600 (MDT)

Author: thiago
Date: Wed May  9 12:48:47 2007
New Revision: 1381

Modified:
   trunk/Core/Geometry/BBox.h
   trunk/Engine/PixelSamplers/TimeViewSampler.cc
   trunk/Interface/Clonable.h
   trunk/Interface/Context.h
   trunk/Interface/Interpolable.h
   trunk/Model/Groups/Group.cc
   trunk/Model/Groups/Group.h
   trunk/Model/MiscObjects/KeyFrameAnimation.cc
   trunk/Model/Primitives/Heightfield.cc
Log:
Core/Geometry/BBox.h :
  added function to find intersection of two boxes (opposite of
  extendByBox).

Model/Groups/Group.h
Model/Groups/Group.cc
Model/Primitives/Heightfield.cc
Model/MiscObjects/KeyFrameAnimation.cc
Interface/Clonable.h
Interface/Interpolable.h
Interface/Context.h
Engine/PixelSamplers/TimeViewSampler.cc :
  "Fix" some annoying compiler warnings.

Modified: trunk/Core/Geometry/BBox.h
==============================================================================
--- trunk/Core/Geometry/BBox.h  (original)
+++ trunk/Core/Geometry/BBox.h  Wed May  9 12:48:47 2007
@@ -88,6 +88,11 @@
       bounds[1] = Max(bounds[1], b.bounds[1]);
     }
 
+    void intersection(const BBox& b) {
+      bounds[0] = Max(bounds[0], b.bounds[0]);
+      bounds[1] = Min(bounds[1], b.bounds[1]);
+    }
+
     const Vector& getMin() const {
       return bounds[0];
     }
@@ -119,6 +124,7 @@
       else
         return d.y() > d.z() ? 1 : 2;
     }
+
 #ifndef SWIG
     inline       Vector &operator[] (int i)       { return bounds[i]; }
     inline const Vector &operator[] (int i) const { return bounds[i]; }

Modified: trunk/Engine/PixelSamplers/TimeViewSampler.cc
==============================================================================
--- trunk/Engine/PixelSamplers/TimeViewSampler.cc       (original)
+++ trunk/Engine/PixelSamplers/TimeViewSampler.cc       Wed May  9 12:48:47 
2007
@@ -28,8 +28,8 @@
 TimeViewSampler::TimeViewSampler(const vector<string>& args)
   : child(0),
     scale(1.e5),
-    active(true),
-    state(0)
+    state(0),
+    active(true)
 {
   int argc = static_cast<int>(args.size());
   for(int i = 0; i<argc;i++){

Modified: trunk/Interface/Clonable.h
==============================================================================
--- trunk/Interface/Clonable.h  (original)
+++ trunk/Interface/Clonable.h  Wed May  9 12:48:47 2007
@@ -13,6 +13,7 @@
       else
         return this;
     }
+    virtual ~Clonable() { }
   };
 }
 #endif //Manta_Interface_Clonable_h

Modified: trunk/Interface/Context.h
==============================================================================
--- trunk/Interface/Context.h   (original)
+++ trunk/Interface/Context.h   Wed May  9 12:48:47 2007
@@ -50,9 +50,8 @@
         channelIndex(channelIndex), numChannels(numChannels),
         proc(proc), numProcs(numProcs),
         loadBalancer(loadBalancer), pixelSampler(pixelSampler),
-        renderer(renderer),
-        stereo(stereo), xres(xres), yres(yres),
-        storage_allocator( storage_allocator_ )
+        renderer(renderer), storage_allocator( storage_allocator_ ),
+        stereo(stereo), xres(xres), yres(yres)
     {
       init();
     }

Modified: trunk/Interface/Interpolable.h
==============================================================================
--- trunk/Interface/Interpolable.h      (original)
+++ trunk/Interface/Interpolable.h      Wed May  9 12:48:47 2007
@@ -15,6 +15,8 @@
       float t;
     };
 
+    virtual ~Interpolable() { }
+
     //Assuming the following operators existed, this function is
     //supposed to do something like the following: 
     //       *this = keyframe[0]*t[0] + ... + keyframe[n]*t[n];

Modified: trunk/Model/Groups/Group.cc
==============================================================================
--- trunk/Model/Groups/Group.cc (original)
+++ trunk/Model/Groups/Group.cc Wed May  9 12:48:47 2007
@@ -53,7 +53,7 @@
   vector<keyframe_t> keyframes(group_keyframes);
   
   Group *groups[group_keyframes.size()];
-  for(int frame=0; frame < keyframes.size(); ++frame) {
+  for(unsigned int frame=0; frame < keyframes.size(); ++frame) {
     Group *group = dynamic_cast<Group*>(group_keyframes[frame].keyframe);
     if (group == NULL)
       return notInterpolable;
@@ -66,7 +66,7 @@
   int start = proc*serialSize/numProc;
   int end = (proc+1)*serialSize/numProc;
   for (int i=start; i < end; ++i) {
-    for(int frame=0; frame < keyframes.size(); ++frame) {
+    for(unsigned int frame=0; frame < keyframes.size(); ++frame) {
       keyframes[frame].keyframe = groups[frame]->get(i);
     }
     InterpErr retcode = objs[i]->serialInterpolate(keyframes);
@@ -75,8 +75,8 @@
   }
 
   //now do the parallel objects
-  for (int i=serialSize; i < objs.size(); ++i) {
-    for(int frame=0; frame < keyframes.size(); ++frame) {
+  for (unsigned int i=serialSize; i < objs.size(); ++i) {
+    for(unsigned int frame=0; frame < keyframes.size(); ++frame) {
       keyframes[frame].keyframe = groups[frame]->get(i);
     }
     InterpErr retcode = objs[i]->parallelInterpolate(keyframes, proc, 
numProc);

Modified: trunk/Model/Groups/Group.h
==============================================================================
--- trunk/Model/Groups/Group.h  (original)
+++ trunk/Model/Groups/Group.h  Wed May  9 12:48:47 2007
@@ -58,6 +58,9 @@
     void set( int i, Object *obj );
     Object *get( int i );
     const Object* get(int i) const;
+    
+    vector<Object*> &getObjects() { return objs; }
+    const vector<Object*> &getObjects() const { return objs; }
 
     void shrinkTo(int firstNumObjs, bool deleteRemainder);
     int getSize() const;

Modified: trunk/Model/MiscObjects/KeyFrameAnimation.cc
==============================================================================
--- trunk/Model/MiscObjects/KeyFrameAnimation.cc        (original)
+++ trunk/Model/MiscObjects/KeyFrameAnimation.cc        Wed May  9 12:48:47 
2007
@@ -10,9 +10,9 @@
 using namespace std;
 
 KeyFrameAnimation::KeyFrameAnimation(InterpolationMode interpolation) : 
-  interpolation(interpolation), currGroup(NULL), spareGroup(NULL),
-  duration(1), currTime(-1), paused(false), barrier("keyframe animation 
barrier"),
-  as(NULL), updateToCurrTime(false)
+  as(NULL), interpolation(interpolation), spareGroup(NULL), 
+  currGroup(NULL), currTime(-1), updateToCurrTime(false), 
+  paused(false), barrier("keyframe animation barrier"), duration(1)
 {
 }
 
@@ -193,7 +193,7 @@
 
 void KeyFrameAnimation::preprocess(const PreprocessContext& context)
 {
-  for (int i=0; i < frames.size(); ++i) {
+  for (unsigned int i=0; i < frames.size(); ++i) {
     frames[i]->preprocess(context);
   }
   if (spareGroup)

Modified: trunk/Model/Primitives/Heightfield.cc
==============================================================================
--- trunk/Model/Primitives/Heightfield.cc       (original)
+++ trunk/Model/Primitives/Heightfield.cc       Wed May  9 12:48:47 2007
@@ -105,7 +105,7 @@
 
   Heightfield *heightfields[keyframes.size()];
 
-  for (int frame=0; frame < keyframes.size(); ++frame) {
+  for (unsigned int frame=0; frame < keyframes.size(); ++frame) {
     Heightfield *h = dynamic_cast<Heightfield*>(keyframes[frame].keyframe);
     if (h == NULL)
       return notInterpolable;
@@ -149,7 +149,7 @@
   for (int i = start; i < end; ++i) {
     float val = 0;
     //lets hope this loop gets unrolled!
-    for (int frame=0; frame < keyframes.size(); ++frame) {
+    for (unsigned int frame=0; frame < keyframes.size(); ++frame) {
       val += keyframes[frame].t * heightfields[frame]->data[0][i]; 
     }
     data[0][i] = val;




  • [MANTA] r1381 - in trunk: Core/Geometry Engine/PixelSamplers Interface Model/Groups Model/MiscObjects Model/Primitives, thiago, 05/09/2007

Archive powered by MHonArc 2.6.16.

Top of page