Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r342 - in trunk: Core/Geometry Engine/Control Model/Cameras Readers/BART SCIRun/include
- Date: Tue, 24 May 2005 15:47:32 -0600 (MDT)
Author: bigler
Date: Tue May 24 15:47:32 2005
New Revision: 342
Added:
trunk/SCIRun/include/sci_values.h
Modified:
trunk/Core/Geometry/PointVector.h
trunk/Engine/Control/RTRT.cc
trunk/Model/Cameras/EnvironmentCamera.cc
trunk/Readers/BART/animation.c
Log:
Core/Geometry/PointVector.h
Use typedef for all the compile time checks for sufficient
dimensionality of vectors and points. This stops all the
annoying warnings that these variables weren't being used.
Engine/Control/RTRT.cc
Move iostream inside the sgi_stl_warnings block.
Model/Cameras/EnvironmentCamera.cc
Remove unused variable i.
Readers/BART/animation.c
Uncomment inclusion of sci_values.h
SCIRun/include/sci_values.h
This file is copied from SCIRun. It helps maintain consistent
values for maximums and minimums of various types on different
systems.
Modified: trunk/Core/Geometry/PointVector.h
==============================================================================
--- trunk/Core/Geometry/PointVector.h (original)
+++ trunk/Core/Geometry/PointVector.h Tue May 24 15:47:32 2005
@@ -16,11 +16,11 @@
VectorT() {
}
VectorT(T x, T y) {
- char unnamed[ Dim == 2 ? 1 : 0 ];
+ typedef char unnamed[ Dim == 2 ? 1 : 0 ];
data[0] = x; data[1] = y;
}
VectorT(T x, T y, T z) {
- char unnamed[ Dim == 3 ? 1 : 0 ];
+ typedef char unnamed[ Dim == 3 ? 1 : 0 ];
data[0] = x; data[1] = y; data[2] = z;
}
@@ -47,11 +47,11 @@
return data[0];
}
T y() const {
- char unnamed[ Dim >=2 ? 1 : 0 ];
+ typedef char unnamed[ Dim >=2 ? 1 : 0 ];
return data[1];
}
T z() const {
- char unnamed[ Dim >= 3 ? 1 : 0 ];
+ typedef char unnamed[ Dim >= 3 ? 1 : 0 ];
return data[2];
}
const T &operator[](int i) const {
@@ -222,11 +222,11 @@
}
PointT(T x, T y) {
- char unnamed[ Dim == 2 ? 1 : 0 ];
+ typedef char unnamed[ Dim == 2 ? 1 : 0 ];
data[0] = x; data[1] = y;
}
PointT(T x, T y, T z) {
- char unnamed[ Dim == 3 ? 1 : 0 ];
+ typedef char unnamed[ Dim == 3 ? 1 : 0 ];
data[0] = x; data[1] = y; data[2] = z;
}
@@ -256,7 +256,7 @@
return data[1];
}
T z() const {
- char unnamed[ Dim == 3 ? 1 : 0 ];
+ typedef char unnamed[ Dim == 3 ? 1 : 0 ];
return data[2];
}
T operator[](int i) const {
Modified: trunk/Engine/Control/RTRT.cc
==============================================================================
--- trunk/Engine/Control/RTRT.cc (original)
+++ trunk/Engine/Control/RTRT.cc Tue May 24 15:47:32 2005
@@ -28,15 +28,17 @@
#include <Core/Thread/Time.h>
#include <Core/Util/Assert.h>
#include <Core/Util/NotFinished.h>
+
#include <sgi_stl_warnings_off.h>
#include <sstream>
+#include <iostream>
#include <sgi_stl_warnings_on.h>
+
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dlfcn.h>
#include <stdio.h>
-#include <iostream>
using namespace Manta;
Modified: trunk/Model/Cameras/EnvironmentCamera.cc
==============================================================================
--- trunk/Model/Cameras/EnvironmentCamera.cc (original)
+++ trunk/Model/Cameras/EnvironmentCamera.cc Tue May 24 15:47:32 2005
@@ -59,7 +59,6 @@
void EnvironmentCamera::setup()
{
- int i;
direction=lookat - eye;
n=direction;
n.normalize();
Modified: trunk/Readers/BART/animation.c
==============================================================================
--- trunk/Readers/BART/animation.c (original)
+++ trunk/Readers/BART/animation.c Tue May 24 15:47:32 2005
@@ -7,7 +7,7 @@
#include <math.h>
#include <string.h>
-//#include <sci_values.h>
+#include <sci_values.h>
#include "animation.h"
#include "quat.h"
Added: trunk/SCIRun/include/sci_values.h
==============================================================================
--- (empty file)
+++ trunk/SCIRun/include/sci_values.h Tue May 24 15:47:32 2005
@@ -0,0 +1,55 @@
+/*
+ For more information, please see:
http://software.sci.utah.edu
+
+ The MIT License
+
+ Copyright (c) 2004 Scientific Computing and Imaging Institute,
+ University of Utah.
+
+ License for the specific language governing rights and limitations under
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
+
+/*
+ * File : sci_values.h
+ * Author : J. Davison de St. Germain
+ * Date : Dec. 9, 2003
+ *
+ * This file encapsulates differences between different platforms
+ * with respect to the values.h file.
+ */
+
+#if !defined(SCI_VALUES_H)
+#define SCI_VALUES_H
+
+#if defined( __APPLE__) || defined(_WIN32)
+
+#include <float.h>
+#define MAXDOUBLE DBL_MAX
+#define MAXSHORT SHRT_MAX
+#define MAXINT INT_MAX
+
+#else
+
+#include <values.h>
+
+#endif
+
+
+#endif /* #define SCI_VALUES_H */
- [MANTA] r342 - in trunk: Core/Geometry Engine/Control Model/Cameras Readers/BART SCIRun/include, bigler, 05/24/2005
Archive powered by MHonArc 2.6.16.