Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r339 - in branches/itanium2: Model/Groups scenes


Chronological Thread 
  • From: hansong@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r339 - in branches/itanium2: Model/Groups scenes
  • Date: Tue, 24 May 2005 14:49:42 -0600 (MDT)

Author: hansong
Date: Tue May 24 14:49:39 2005
New Revision: 339

Modified:
   branches/itanium2/Model/Groups/CMakeLists.txt
   branches/itanium2/scenes/boeing777.cc
Log:
cmakefile change for kd

Modified: branches/itanium2/Model/Groups/CMakeLists.txt
==============================================================================
--- branches/itanium2/Model/Groups/CMakeLists.txt       (original)
+++ branches/itanium2/Model/Groups/CMakeLists.txt       Tue May 24 14:49:39 
2005
@@ -2,4 +2,5 @@
 SET (Manta_Groups_SRCS
      Groups/BVH.cc
      Groups/Group.cc
+     Groups/kdtree.cc
 )

Modified: branches/itanium2/scenes/boeing777.cc
==============================================================================
--- branches/itanium2/scenes/boeing777.cc       (original)
+++ branches/itanium2/scenes/boeing777.cc       Tue May 24 14:49:39 2005
@@ -16,6 +16,7 @@
 #include <Model/AmbientLights/ArcAmbient.h>
 #include <Model/Backgrounds/ConstantBackground.h>
 #include <Model/Groups/Group.h>
+#include <Model/Groups/kdtree.h>
 #include <Model/Lights/PointLight.h>
 #include <Model/Materials/Lambertian.h>
 #include <Model/Materials/MetalMaterial.h>
@@ -24,6 +25,7 @@
 #include <Model/Textures/CheckerTexture.h>
 #include <Core/Geometry/AffineTransform.h>
 #include <Core/Util/NotFinished.h>
+#include <Model/AmbientLights/ConstantAmbient.h>
 
 
 using namespace Manta;
@@ -53,18 +55,21 @@
   Scene *scene = new Scene();
 
   // Create a kd tree.
-  Group *world = new KdTree( file_name.c_str() );
+  KDTree *world = new KDTree;
+  world->load("head.tri");
+  LightSet* lights = new LightSet();
+  lights->add(new PointLight(Point(0,0,8), Color(RGBColor(.6,.1,.1))));
+  lights->setAmbientLight(new ConstantAmbient(Color::black()));
+  scene->setLights(lights);
 
   // Add the tree to the scene.
   scene->setObject( world );
 
   // Set other important scene properties.
   
-  // Lights unnecessary for now.
-  scene->setLights( new LightSet );
-
   // Background.
   scene->setBackground( new ConstantBackground(Color(RGB(1.0, 1.0, 1.0))) );
 
   return scene;
 }
+




  • [MANTA] r339 - in branches/itanium2: Model/Groups scenes, hansong, 05/24/2005

Archive powered by MHonArc 2.6.16.

Top of page