Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r828 - in branches/vertical: Interface Model/Instances UserInterface scenes


Chronological Thread 
  • From: sparker@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r828 - in branches/vertical: Interface Model/Instances UserInterface scenes
  • Date: Thu, 5 Jan 2006 16:22:21 -0700 (MST)

Author: sparker
Date: Thu Jan  5 16:22:21 2006
New Revision: 828

Modified:
   branches/vertical/Interface/RayPacket.h
   branches/vertical/Model/Instances/Instance.cc
   branches/vertical/UserInterface/XWindowUI.cc
   branches/vertical/scenes/primtest.cc
Log:
Misc cleanups
Added a wishlist to the instances (hint: they could be faster)


Modified: branches/vertical/Interface/RayPacket.h
==============================================================================
--- branches/vertical/Interface/RayPacket.h     (original)
+++ branches/vertical/Interface/RayPacket.h     Thu Jan  5 16:22:21 2006
@@ -445,20 +445,6 @@
 
       flags |= HaveNormals | HaveUnitNormals;
     }
-    void normalizeNormals()
-    {
-      if(flags & HaveUnitNormals)
-        return;
-      for(int i=rayBegin;i<rayEnd;i++){
-        Real sum = 0;
-        for(int j=0;j<3;j++)
-          sum += data->normal[j][i] * data->normal[j][i];
-        Real scale = 1/SCIRun::Sqrt(sum);
-        for(int j=0;j<3;j++)
-          data->normal[j][i] *= scale;
-      }
-      flags |= HaveUnitNormals;
-    }
 
     // Hit positions
     Point getHitPosition(int which) const

Modified: branches/vertical/Model/Instances/Instance.cc
==============================================================================
--- branches/vertical/Model/Instances/Instance.cc       (original)
+++ branches/vertical/Model/Instances/Instance.cc       Thu Jan  5 16:22:21 
2006
@@ -7,8 +7,11 @@
 #include <Core/Math/MiscMath.h>
 #include <sstream>
 using namespace std;
-
 using namespace Manta;
+
+// TODO:
+// 1. Only transform hit position instead of ray origin/direction 
(computeNormal and texCoords)
+// 2. Avoid redundant transformation in texCooords
 
 Instance::Instance(Object* instance, const AffineTransform& transform)
   : instance(instance), transform(transform)

Modified: branches/vertical/UserInterface/XWindowUI.cc
==============================================================================
--- branches/vertical/UserInterface/XWindowUI.cc        (original)
+++ branches/vertical/UserInterface/XWindowUI.cc        Thu Jan  5 16:22:21 
2006
@@ -399,7 +399,7 @@
   register_key(0, XStringToKeysym("v"),
                "autoview",
                Callback::create(this, &XWindowUI::autoview));
-       register_key(0, XStringToKeysym("c"),
+  register_key(0, XStringToKeysym("c"),
                "output camera",
                Callback::create(this, &XWindowUI::output_camera));           
                                   
   register_key(0, XStringToKeysym("Escape"),

Modified: branches/vertical/scenes/primtest.cc
==============================================================================
--- branches/vertical/scenes/primtest.cc        (original)
+++ branches/vertical/scenes/primtest.cc        Thu Jan  5 16:22:21 2006
@@ -111,7 +111,7 @@
   else if(material == "redlambertian")
     matl=new Lambertian(Color(RGB(.6,0,0)));
   else if(material == "metal")
-    matl = new MetalMaterial(Color(RGB(0.7f,0.7f,0.8f)));
+    matl = new MetalMaterial(Color(RGB(0.7,0.7,0.8)));
   else if(material == "checker")
     matl = new Phong(new CheckerTexture<Color>(Color(RGB(.6,.6,.6)),
                                                Color(RGB(.6,0,0)),




  • [MANTA] r828 - in branches/vertical: Interface Model/Instances UserInterface scenes, sparker, 01/05/2006

Archive powered by MHonArc 2.6.16.

Top of page