Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r692 - in branches/itanium2: Core/Math UserInterface scenes
- Date: Thu, 3 Nov 2005 17:06:17 -0700 (MST)
Author: bigler
Date: Thu Nov 3 17:06:16 2005
New Revision: 692
Modified:
branches/itanium2/Core/Math/Noise.h
branches/itanium2/UserInterface/CameraPathAutomator.cc
branches/itanium2/scenes/boeing777.cc
Log:
Core/Math/Noise.h
Removed erroneous forward declaration of SCIRun::Point.
UserInterface/CameraPathAutomator.cc
If there weren't at least 4 control points in the file, an exception
is thrown.
scenes/boeing777.cc
Added MarbleTexture background accessed via "-bg marble" argument.
Modified: branches/itanium2/Core/Math/Noise.h
==============================================================================
--- branches/itanium2/Core/Math/Noise.h (original)
+++ branches/itanium2/Core/Math/Noise.h Thu Nov 3 17:06:16 2005
@@ -3,10 +3,6 @@
#include <Core/Geometry/PointVector.h>
-namespace SCIRun {
- class Point;
-}
-
namespace Manta {
/**
Modified: branches/itanium2/UserInterface/CameraPathAutomator.cc
==============================================================================
--- branches/itanium2/UserInterface/CameraPathAutomator.cc (original)
+++ branches/itanium2/UserInterface/CameraPathAutomator.cc Thu Nov 3
17:06:16 2005
@@ -31,6 +31,7 @@
#include <SCIRun/Core/Thread/Thread.h>
#include <SCIRun/Core/Thread/Time.h>
#include <SCIRun/Core/Exceptions/ErrnoException.h>
+#include <SCIRun/Core/Exceptions/InternalError.h>
#include <SCIRun/Core/Math/MinMax.h>
#include <Interface/Camera.h>
@@ -125,7 +126,13 @@
total_points++;
}
}
-
+
+ // Check to make sure we got enough control points
+ if (total_points < 4) {
+ throw new InternalError( "Didn't find at least 4 control points in the
file: " + file_name,
+ __FILE__, __LINE__ );
+ }
+
// Rewind the input file.
fseek( file, SEEK_SET, 0 );
Modified: branches/itanium2/scenes/boeing777.cc
==============================================================================
--- branches/itanium2/scenes/boeing777.cc (original)
+++ branches/itanium2/scenes/boeing777.cc Thu Nov 3 17:06:16 2005
@@ -42,6 +42,7 @@
#include <Interface/Primitive.h>
#include <Model/AmbientLights/ArcAmbient.h>
#include <Model/Backgrounds/ConstantBackground.h>
+#include <Model/Backgrounds/TextureBackground.h>
#include <Model/Groups/Group.h>
#include <Model/Groups/KDTree.h>
#include <Model/Groups/TransparentKDTree.h>
@@ -54,6 +55,7 @@
#include <Model/Primitives/Parallelogram.h>
#include <Model/Primitives/Sphere.h>
#include <Model/Textures/CheckerTexture.h>
+#include <Model/Textures/MarbleTexture.h>
#include <Model/Cameras/PinholeCamera.h>
#include <Core/Geometry/AffineTransform.h>
#include <Core/Util/NotFinished.h>
@@ -96,6 +98,8 @@
ColorComponent phong_reflect = 0;
bool use_transparency = false;
+
+ string bg_method = "";
// Parse args.i
for (int i=0;i<args.size();++i) {
@@ -143,6 +147,9 @@
else
throw IllegalArgument("boeing777 -cutting
[<point> <normal>]", i, args);
}
+ else if (args[i] == "-bg") {
+ bg_method = args[++i];
+ }
else {
cerr << "Valid options for boeing777:" << endl;
cerr << "-file <filename>" << endl;
@@ -152,6 +159,7 @@
cerr << "-lambertianalt (alpha=1.0 without transparent traversal)" <<
endl;
cerr << "-phong <exp> <reflection> **default**" << endl;
cerr << "-ambient <max dist> <secondary rays>" << endl;
+ cerr << "-bg marble Currently only marble is supported.\n";
throw IllegalArgument( "boeing777", i, args );
}
@@ -242,7 +250,20 @@
// Set other important scene properties.
// Background.
- scene->setBackground( new ConstantBackground( Color(RGB(0.8, 0.8,
0.8)) ) );
+ {
+ Background* bg;
+ if (bg_method == "marble") {
+ bg = (new TextureBackground
+ (new MarbleTexture<Color>(Color(RGB(0.1,0.2,0.5)),
+ Color(RGB(0.7,0.8,1.0)),
+ 1.0, 1.0, 15.0,
+ 6, 2.0, 0.6 ),
+ Vector(0,1,0)));
+ } else {
+ bg = new ConstantBackground( Color(RGB(0.8, 0.8, 0.8)) );
+ }
+ scene->setBackground(bg);
+ }
return scene;
}
- [MANTA] r692 - in branches/itanium2: Core/Math UserInterface scenes, bigler, 11/03/2005
Archive powered by MHonArc 2.6.16.