Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r332 - branches/itanium2/scenes


Chronological Thread 
  • From: abe@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r332 - branches/itanium2/scenes
  • Date: Thu, 19 May 2005 17:05:09 -0600 (MDT)

Author: abe
Date: Thu May 19 17:05:06 2005
New Revision: 332

Added:
   branches/itanium2/scenes/boeing777.cc
Modified:
   branches/itanium2/scenes/CMakeLists.txt
Log:
Added make_scene file for boeing777 scene

Modified: branches/itanium2/scenes/CMakeLists.txt
==============================================================================
--- branches/itanium2/scenes/CMakeLists.txt     (original)
+++ branches/itanium2/scenes/CMakeLists.txt     Thu May 19 17:05:06 2005
@@ -36,5 +36,12 @@
    TARGET_LINK_LIBRARIES(scene_primtest ${manta_scene_link})
 ENDIF(SCENE_PRIMTEST)
 
+# Boeing 777 Test Scene.
+SET(SCENE_BOEING777 0 CACHE BOOL "Boeing 777 Test Scene")
+IF(SCENE_BOEING777)
+   ADD_LIBRARY(scene_boeing777 boeing777.cc)
+   TARGET_LINK_LIBRARIES(scene_boeing777 ${manta_scene_link})
+ENDIF(SCENE_BOEING777)
+
 ############################################################
 

Added: branches/itanium2/scenes/boeing777.cc
==============================================================================
--- (empty file)
+++ branches/itanium2/scenes/boeing777.cc       Thu May 19 17:05:06 2005
@@ -0,0 +1,70 @@
+
+
+// Manta Test Scene for Boeing 777 Dataset.
+// Hansong Zhang and Abe Stephens
+// hansong@sgi.com   abe@sgi.com
+// May 2005.
+
+
+#include <Core/Geometry/PointVector.h>
+#include <Core/Exceptions/IllegalArgument.h>
+#include <Core/Util/Args.h>
+#include <Interface/Context.h>
+#include <Interface/LightSet.h>
+#include <Interface/RTRTInterface.h>
+#include <Interface/Scene.h>
+#include <Model/AmbientLights/ArcAmbient.h>
+#include <Model/Backgrounds/ConstantBackground.h>
+#include <Model/Groups/Group.h>
+#include <Model/Lights/PointLight.h>
+#include <Model/Materials/Lambertian.h>
+#include <Model/Materials/MetalMaterial.h>
+#include <Model/Primitives/Parallelogram.h>
+#include <Model/Primitives/Sphere.h>
+#include <Model/Textures/CheckerTexture.h>
+#include <Core/Geometry/AffineTransform.h>
+#include <Core/Util/NotFinished.h>
+
+
+using namespace Manta;
+
+///////////////////////////////////////////////////////////////////////////
+// This function constructs the Boeing 777 Test Scene using a KdTree.
+extern "C" 
+Scene* make_scene(const ReadContext& context, const vector<string>& args) {
+
+  string file_name;
+  
+  // Parse args.
+  for (int i=0;i<args.size();++i) {
+    if (args[i] == "-file") {
+      // Determine the index of the filename.
+      if (!getStringArgument(++i, args, file_name))
+        throw IllegalArgument("boeing777 -file");
+    }
+    else {
+      cerr << "Valid options for boeing777:" << endl;
+      cerr << "-file <filename>"             << endl;
+      throw IllegalArgument( "boeing777" );
+    }
+  }
+
+  // Create the scene.
+  Scene scene = new Scene();
+
+  // Create a kd tree.
+  Group *world = new KdTree( file_name.c_str() );
+
+  // 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] r332 - branches/itanium2/scenes, abe, 05/19/2005

Archive powered by MHonArc 2.6.16.

Top of page