Text archives Help
- From: "Solomon Boulos" <boulos@cs.utah.edu>
- To: manta@sci.utah.edu
- Subject: [Manta] r2031 - in trunk: Interface Model/Groups
- Date: Tue, 5 Feb 2008 18:47:05 -0700 (MST)
Author: boulos
Date: Tue Feb 5 18:47:04 2008
New Revision: 2031
Modified:
trunk/Interface/InterfaceRTTI.cc
trunk/Interface/InterfaceRTTI.h
trunk/Model/Groups/DynBVH.cc
trunk/Model/Groups/DynBVH.h
trunk/Model/Groups/Group.cc
trunk/Model/Groups/Group.h
Log:
Interface/InterfaceRTTI.cc
Interface/InterfaceRTTI.h
Model/Groups/DynBVH.cc
Model/Groups/DynBVH.h
Model/Groups/Group.cc
Model/Groups/Group.h
Paving the way for BVH serialization.
DynBVH won't compile if the declarations are put in, so these are
left out for now (need to commit to move to laptop for train)
Modified: trunk/Interface/InterfaceRTTI.cc
==============================================================================
--- trunk/Interface/InterfaceRTTI.cc (original)
+++ trunk/Interface/InterfaceRTTI.cc Tue Feb 5 18:47:04 2008
@@ -1,5 +1,7 @@
#include <Interface/InterfaceRTTI.h>
+
+#include <Interface/AccelerationStructure.h>
#include <Interface/AmbientLight.h>
#include <Interface/Background.h>
#include <Interface/Clonable.h>
@@ -16,16 +18,16 @@
using namespace std;
using namespace Manta;
+MANTA_REGISTER_CLASS(AccelerationStructure);
MANTA_REGISTER_CLASS(AmbientLight);
+MANTA_REGISTER_CLASS(Background);
+MANTA_REGISTER_CLASS(Clonable);
+MANTA_REGISTER_CLASS(Interpolable);
MANTA_REGISTER_CLASS(Light);
+MANTA_REGISTER_CLASS(LightSet);
MANTA_REGISTER_CLASS(Material);
-MANTA_REGISTER_CLASS(TexCoordMapper);
-MANTA_REGISTER_CLASS(Scene);
-MANTA_REGISTER_CLASS(Background);
MANTA_REGISTER_CLASS(Object);
MANTA_REGISTER_CLASS(Primitive);
-MANTA_REGISTER_CLASS(LightSet);
MANTA_REGISTER_CLASS(RenderParameters);
-MANTA_REGISTER_CLASS(Interpolable);
-MANTA_REGISTER_CLASS(Clonable);
-
+MANTA_REGISTER_CLASS(Scene);
+MANTA_REGISTER_CLASS(TexCoordMapper);
Modified: trunk/Interface/InterfaceRTTI.h
==============================================================================
--- trunk/Interface/InterfaceRTTI.h (original)
+++ trunk/Interface/InterfaceRTTI.h Tue Feb 5 18:47:04 2008
@@ -5,6 +5,7 @@
#include <Core/Persistent/MantaRTTI.h>
namespace Manta {
+ class AccelerationStructure;
class AmbientLight;
class Background;
class Clonable;
@@ -15,8 +16,9 @@
class Object;
class Primitive;
class RenderParameters;
- class TexCoordMapper;
class Scene;
+ class TexCoordMapper;
+
template<class ValueType> class Texture;
MANTA_DECLARE_RTTI_BASECLASS(AmbientLight, AbstractClass, readwriteNone);
@@ -31,6 +33,7 @@
MANTA_DECLARE_RTTI_BASECLASS(RenderParameters, ConcreteClass,
readwriteMethod);
MANTA_DECLARE_RTTI_DERIVEDCLASS(Interpolable, Clonable, AbstractClass,
readwriteNone);
MANTA_DECLARE_RTTI_BASECLASS(Clonable, AbstractClass, readwriteNone);
+ MANTA_DECLARE_RTTI_DERIVEDCLASS(AccelerationStructure, Object,
AbstractClass, readwriteNone);
template<class ValueType>
class MantaRTTI<Texture<ValueType> > : public
MantaRTTI_DerivedClass<Texture<ValueType>, Interpolable>, public
MantaRTTI_AbstractClass<Texture<ValueType> >, public
MantaRTTI_readwriteNone<Texture<ValueType> > {
Modified: trunk/Model/Groups/DynBVH.cc
==============================================================================
--- trunk/Model/Groups/DynBVH.cc (original)
+++ trunk/Model/Groups/DynBVH.cc Tue Feb 5 18:47:04 2008
@@ -2,9 +2,12 @@
#include <Core/Thread/Time.h>
#include <Core/Util/Preprocessor.h>
#include <Core/Util/UpdateGraph.h>
+#include <Core/Persistent/ArchiveElement.h>
+#include <Core/Persistent/MantaRTTI.h>
#include <DynBVH_Parameters.h>
#include <Interface/Context.h>
#include <Interface/Task.h>
+#include <Interface/InterfaceRTTI.h>
#include <Model/Groups/DynBVH.h>
#include <algorithm>
#include <float.h>
@@ -1691,3 +1694,16 @@
return firstActive + 3;
}
#endif // MANTA_SSE for USE_DYNBVH_PORTS
+
+namespace Manta {
+ //MANTA_DECLARE_RTTI_DERIVEDCLASS(DynBVH, Group, ConcreteClass,
readwriteMethod);
+ //MANTA_REGISTER_CLASS(DynBVH);
+}
+
+void DynBVH::readwrite(ArchiveElement* archive)
+{
+ // TODO(boulos): Fix this...
+ //MantaRTTI<Group>::readwrite(archive, *this);
+ //archive->readwrite("object_ids", object_ids);
+}
+
Modified: trunk/Model/Groups/DynBVH.h
==============================================================================
--- trunk/Model/Groups/DynBVH.h (original)
+++ trunk/Model/Groups/DynBVH.h Tue Feb 5 18:47:04 2008
@@ -130,6 +130,7 @@
int proc, int numProcs);
void updateBounds(const PreprocessContext& context, int ID = 0);
+ void readwrite(ArchiveElement* archive);
protected:
int partitionSAH(const PreprocessContext& context,
Modified: trunk/Model/Groups/Group.cc
==============================================================================
--- trunk/Model/Groups/Group.cc (original)
+++ trunk/Model/Groups/Group.cc Tue Feb 5 18:47:04 2008
@@ -222,8 +222,7 @@
}
namespace Manta {
-MANTA_DECLARE_RTTI_DERIVEDCLASS(Group, Object, ConcreteClass,
readwriteMethod);
-MANTA_REGISTER_CLASS(Group);
+ MANTA_REGISTER_CLASS(Group);
}
void Group::readwrite(ArchiveElement* archive)
Modified: trunk/Model/Groups/Group.h
==============================================================================
--- trunk/Model/Groups/Group.h (original)
+++ trunk/Model/Groups/Group.h Tue Feb 5 18:47:04 2008
@@ -37,6 +37,7 @@
#include <Core/Thread/Mutex.h>
#include <Core/Util/Assert.h>
#include <Interface/Object.h>
+#include <Interface/InterfaceRTTI.h>
#include <vector>
#include <string>
@@ -108,6 +109,8 @@
mutable Mutex mutex;
};
+
+ MANTA_DECLARE_RTTI_DERIVEDCLASS(Group, Object, ConcreteClass,
readwriteMethod);
}
#endif
- [Manta] r2031 - in trunk: Interface Model/Groups, Solomon Boulos, 02/05/2008
Archive powered by MHonArc 2.6.16.