Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1915 - in trunk: Model/Groups SwigInterface
- Date: Mon, 10 Dec 2007 16:56:18 -0700 (MST)
Author: abe
Date: Mon Dec 10 16:56:17 2007
New Revision: 1915
Modified:
trunk/Model/Groups/KDTree.h
trunk/SwigInterface/manta.i
Log:
Added support for KDTree to the swig interface.
M SwigInterface/manta.i
ifndef SWIG'ed out inner classes and certain parts of the API.
M Model/Groups/KDTree.h
Modified: trunk/Model/Groups/KDTree.h
==============================================================================
--- trunk/Model/Groups/KDTree.h (original)
+++ trunk/Model/Groups/KDTree.h Mon Dec 10 16:56:17 2007
@@ -33,6 +33,7 @@
# define MAILBOX_ENTRIES 64
# define MAILBOX_MASK (MAILBOX_ENTRIES-1)
+#ifndef SWIG
struct Mailbox
{
MANTA_ALIGN(16) int triID[MAILBOX_ENTRIES];
@@ -100,7 +101,7 @@
mutable long nTotalRays;
mutable long nFrontIABranch;
mutable long nBackIABranch;
-
+#endif // SWIG
void update(int proc, int numProcs)
{
// #define COLLECT_STATS
@@ -122,9 +123,9 @@
KDTree() : currGroup(NULL), mesh(NULL), nIntersects(0), nTraversals(0),
nTotalRays(0)
{}
- void preprocess(const PreprocessContext&);
+ void preprocess(const PreprocessContext&);
void intersect(const RenderContext& context, RayPacket& rays) const;
-
+#ifndef SWIG
template<bool COMMON_ORIGIN>
void intersectNode(int nodeID,
const RenderContext& context,
@@ -136,6 +137,7 @@
, Mailbox &mailbox
#endif
) const;
+#endif
bool intersectBounds(const RenderContext& context, RayPacket& rays)
const;
void computeBounds(const PreprocessContext&,
@@ -161,12 +163,14 @@
void saveToFile(const string &file);
void printStats();
+#ifndef SWIG
struct TreeStats{
int maxDepth;
int maxObjectsInLeaf;
int childrenLeafHist[1024]; //hopefully 1024 is more than enough
};
void collectTreeStats(int nodeID, int depth, TreeStats &stats);
+#endif
};
#ifdef _MSC_VER
Modified: trunk/SwigInterface/manta.i
==============================================================================
--- trunk/SwigInterface/manta.i (original)
+++ trunk/SwigInterface/manta.i Mon Dec 10 16:56:17 2007
@@ -278,6 +278,7 @@
%include <Model/Textures/NormalTexture.h>
%{
+#include <Model/Groups/KDTree.h>
#include <Model/Groups/DynBVH.h>
#include <Model/Groups/Mesh.h>
#include <Model/Groups/ObjGroup.h>
@@ -287,7 +288,7 @@
%ignore Manta::DynBVH::finishUpdate;
%ignore Manta::DynBVH::parallelTopDownUpdate;
-
+%include <Model/Groups/KDTree.h>
%include <Model/Groups/DynBVH.h>
%include <Model/Groups/Mesh.h>
%include <Model/Groups/ObjGroup.h>
- [Manta] r1915 - in trunk: Model/Groups SwigInterface, abe, 12/10/2007
Archive powered by MHonArc 2.6.16.