Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r878 - in trunk: Core/Util Interface Model/Groups


Chronological Thread 
  • From: bigler@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r878 - in trunk: Core/Util Interface Model/Groups
  • Date: Tue, 31 Jan 2006 16:48:35 -0700 (MST)

Author: bigler
Date: Tue Jan 31 16:48:34 2006
New Revision: 878

Added:
   trunk/Model/Groups/SSEKDTree-stub.cc
Modified:
   trunk/Core/Util/Align.h
   trunk/Interface/RayPacket.h
   trunk/Model/Groups/CMakeLists.txt
Log:

Core/Util/Align.h

  Added GNU flavor of aligning.  The macro should be empty for non
  Intel and GNU compilers.  This needs to be something a bit more
  robust in general, but this gets us partly there.

Interface/RayPacket.h

  The MANTA_ALIGN macro should be between "class" and the class name.

Model/Groups/CMakeLists.txt
Model/Groups/SSEKDTree-stub.cc

  Added SSEKDTree-stub file to be used in place of SSEKDTree.


Modified: trunk/Core/Util/Align.h
==============================================================================
--- trunk/Core/Util/Align.h     (original)
+++ trunk/Core/Util/Align.h     Tue Jan 31 16:48:34 2006
@@ -30,8 +30,15 @@
 #define _CORE_UTIL_ALIGN__H
 
 
+#if defined (__ECC)
 #define MANTA_ALIGN(size) \
   __declspec( align( (size) ) )
+#elif defined (__GNUC__)
+#define MANTA_ALIGN(size) \
+  __attribute__ ((aligned (size)))
+#else
+#define MANTA_ALIGN(size)
+#endif
 
 #define MANTA_IS_ALIGNED(addr,size) \
   ((((size_t)(addr))%(size))==0)

Modified: trunk/Interface/RayPacket.h
==============================================================================
--- trunk/Interface/RayPacket.h (original)
+++ trunk/Interface/RayPacket.h Tue Jan 31 16:48:34 2006
@@ -16,8 +16,8 @@
   class Material;
   class RenderContext;
 
-  MANTA_ALIGN(16)
-  class RayPacketData {
+  
+  class MANTA_ALIGN(16) RayPacketData {
   public:
     enum {
       MaxScratchpadSize = SCRATCHPAD_MAXSIZE,

Modified: trunk/Model/Groups/CMakeLists.txt
==============================================================================
--- trunk/Model/Groups/CMakeLists.txt   (original)
+++ trunk/Model/Groups/CMakeLists.txt   Tue Jan 31 16:48:34 2006
@@ -33,17 +33,18 @@
 IF(${MANTA_REAL} MATCHES float)
   SET(Manta_Groups_SRCS
     ${Manta_Groups_SRCS}
-    Groups/VerticalKDTree.h
-    Groups/VerticalKDTree.cc
-    
     Groups/SSEKDTree.cc
     Groups/SSEKDTree.h
+    Groups/VerticalKDTree.h
+    Groups/VerticalKDTree.cc
     )
 
 # Otherwise include a stub implementation.
 ELSE(${MANTA_REAL} MATCHES float)
   SET(Manta_Groups_SRCS
     ${Manta_Groups_SRCS}
+    Groups/SSEKDTree-stub.cc
+    Groups/SSEKDTree.h
     Groups/VerticalKDTree.h
     Groups/VerticalKDTree-stub.cc
     )

Added: trunk/Model/Groups/SSEKDTree-stub.cc
==============================================================================
--- (empty file)
+++ trunk/Model/Groups/SSEKDTree-stub.cc        Tue Jan 31 16:48:34 2006
@@ -0,0 +1,64 @@
+/*
+  For more information, please see: http://software.sci.utah.edu
+
+  The MIT License
+
+  Copyright (c) 2006
+  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.
+*/
+
+#include <Model/Groups/SSEKDTree.h>
+
+#include <SCIRun/Core/Exceptions/InternalError.h>
+
+using namespace Manta;
+using namespace Manta::Kdtree;
+using namespace SCIRun;
+
+// This is the Manta interface method.
+void SSEKDTree::intersect(const RenderContext& context, RayPacket& rays) 
const { }
+
+///////////////////////////////////////////////////////////////////////////////
+// Simple kdtree functions.
+///////////////////////////////////////////////////////////////////////////////
+
+SSEKDTree::SSEKDTree( KDTree *kdtree_, Material *material_ )
+  : PrimitiveCommon( material_ ),
+    rootNode( kdtree_->rootNode ),
+    triIndices( kdtree_->triIndices ),
+    tris( kdtree_->tris ),
+    normals( kdtree_->normals )
+{
+  throw InternalError( "Manta::Real == float required for SSEKDTree",
+                       __FILE__, __LINE__ );
+}
+SSEKDTree::~SSEKDTree() { };
+
+void SSEKDTree::computeNormal(const RenderContext& /*context*/,
+                              RayPacket& rays) const { }
+
+void SSEKDTree::computeBounds(const PreprocessContext&, BBox &box_ ) const { 
}
+
+void SSEKDTree::computeBounds( BBox &box_ ) const { }
+
+




  • [MANTA] r878 - in trunk: Core/Util Interface Model/Groups, bigler, 01/31/2006

Archive powered by MHonArc 2.6.16.

Top of page