Text archives Help
- From: boulos@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1552 - in trunk: Interface Model/Groups Model/Primitives
- Date: Tue, 24 Jul 2007 21:45:08 -0600 (MDT)
Author: boulos
Date: Tue Jul 24 21:45:08 2007
New Revision: 1552
Modified:
trunk/Interface/AccelerationStructure.h
trunk/Model/Groups/DynBVH.cc
trunk/Model/Groups/DynBVH.h
trunk/Model/Primitives/Parallelogram.cc
Log:
Interface/AccelerationStructure.h
Model/Groups/DynBVH.cc
Model/Groups/DynBVH.h
Adding an explicit update function (in case you don't have the
currGroup lying around and just want to update). Currently this is
an optional function due to a deadline (so the Grid and other accel
structs don't follow it yet)
Model/Primitives/Parallelogram.cc
Fixing bug in changeGeometry (forgot to set anchor)
Modified: trunk/Interface/AccelerationStructure.h
==============================================================================
--- trunk/Interface/AccelerationStructure.h (original)
+++ trunk/Interface/AccelerationStructure.h Tue Jul 24 21:45:08 2007
@@ -6,12 +6,17 @@
namespace Manta {
class Group;
-
+
class AccelerationStructure : public Object {
public:
//TODO: decide whether we want a seperate rebuild and update
//function or let the acceleration structure decide which to use.
+
+ // NOTE(boulos): Due to a deadline this won't be done correctly
+ // requiring everyone to implement this until we get a chance to
+ // come back to it.
+ virtual void update(int proc=0, int numProcs=1) {}
virtual void rebuild(Group *group, int proc=0, int numProcs=1) = 0;
//virtual void update() = 0;
Modified: trunk/Model/Groups/DynBVH.cc
==============================================================================
--- trunk/Model/Groups/DynBVH.cc (original)
+++ trunk/Model/Groups/DynBVH.cc Tue Jul 24 21:45:08 2007
@@ -423,6 +423,11 @@
currGroup->preprocess(context);
}
+void DynBVH::update(int proc, int numProcs) {
+ PreprocessContext context;
+ parallelUpdateBounds(context, proc, numProcs);
+}
+
void DynBVH::rebuild(Group *group, int proc, int numProcs)
{
// if (proc > 0) return; //TODO: make this parallel (at least some of it).
@@ -501,7 +506,7 @@
split = partitionApproxSAH(context, objectBegin,objectEnd,bestAxis);
}
#else
- split = partitionSAH(context, objectBegin,objectEnd,bestAxis);
+ split = partitionSAH(context, objectBegin,objectEnd,bestAxis);
#endif
if (bestAxis == -1)
Modified: trunk/Model/Groups/DynBVH.h
==============================================================================
--- trunk/Model/Groups/DynBVH.h (original)
+++ trunk/Model/Groups/DynBVH.h Tue Jul 24 21:45:08 2007
@@ -94,6 +94,7 @@
// {
// return new DynBVH();
// }
+ void update(int proc=0, int numProcs=1);
void rebuild(Group *group, int proc=0, int numProcs=1);
void build(const PreprocessContext& context,
Modified: trunk/Model/Primitives/Parallelogram.cc
==============================================================================
--- trunk/Model/Primitives/Parallelogram.cc (original)
+++ trunk/Model/Primitives/Parallelogram.cc Tue Jul 24 21:45:08 2007
@@ -36,6 +36,7 @@
void Parallelogram::changeGeometry(Vector new_anchor,
Vector new_v1,
Vector new_v2) {
+ anchor = new_anchor;
v1_unscaled = new_v1;
v2_unscaled = new_v2;
v1 = new_v1;
- [MANTA] r1552 - in trunk: Interface Model/Groups Model/Primitives, boulos, 07/24/2007
Archive powered by MHonArc 2.6.16.