Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1850 - in trunk: Core/Color SwigInterface
- Date: Wed, 14 Nov 2007 14:12:41 -0700 (MST)
Author: bigler
Date: Wed Nov 14 14:12:41 2007
New Revision: 1850
Modified:
trunk/Core/Color/RGBTraits.h
trunk/Core/Color/Spectrum.cc
trunk/SwigInterface/mantainterface.i
Log:
Core/Color/RGBTraits.h
Uncomment unimplemented function.
Core/Color/Spectrum.cc
Filled in toString.
SwigInterface/mantainterface.i
Added Spectrum to interface. Fixes compilation errors.
Modified: trunk/Core/Color/RGBTraits.h
==============================================================================
--- trunk/Core/Color/RGBTraits.h (original)
+++ trunk/Core/Color/RGBTraits.h Wed Nov 14 14:12:41 2007
@@ -44,7 +44,8 @@
}
static void readwrite(ArchiveElement* archive, ComponentType data[3]);
- static bool parseColor(RGBColor& result, const std::string& str);
+ // Uncomment when you actually fill this in
+ //static bool parseColor(RGBColor& result, const std::string& str);
};
}
Modified: trunk/Core/Color/Spectrum.cc
==============================================================================
--- trunk/Core/Color/Spectrum.cc (original)
+++ trunk/Core/Color/Spectrum.cc Wed Nov 14 14:12:41 2007
@@ -89,6 +89,11 @@
{730, 3.17420e-003, -2.65110e-005, 4.12510e-006}
};
+std::string Spectrum::toString() const
+{
+ return writePersistentString();
+}
+
float sample_scale[] = {1./206.327774, 1./94.4312286, 1./55.3023796};
RGBColor Spectrum::getRGB() const
Modified: trunk/SwigInterface/mantainterface.i
==============================================================================
--- trunk/SwigInterface/mantainterface.i (original)
+++ trunk/SwigInterface/mantainterface.i Wed Nov 14 14:12:41 2007
@@ -293,6 +293,7 @@
#include <Core/Color/RGBColor.h>
#include <Core/Color/RGBTraits.h>
#include <Core/Color/GrayColor.h>
+#include <Core/Color/Spectrum.h>
#include <Core/Color/Conversion.h>
#include <Core/Color/ColorSpace.h>
#include <Core/Color/ColorSpace_fancy.h>
@@ -304,6 +305,7 @@
%include <Core/Color/RGBColor.h>
%include <Core/Color/RGBTraits.h>
%include <Core/Color/GrayColor.h>
+%include <Core/Color/Spectrum.h>
%include <Core/Color/Conversion.h>
%include <Core/Color/ColorSpace.h>
%include <Core/Color/ColorSpace_fancy.h>
@@ -333,6 +335,12 @@
}
};
%extend GrayColor {
+ %newobject __str__;
+ char* __str__() {
+ return strdup(self->toString().c_str());
+ }
+ };
+ %extend Spectrum {
%newobject __str__;
char* __str__() {
return strdup(self->toString().c_str());
- [Manta] r1850 - in trunk: Core/Color SwigInterface, bigler, 11/14/2007
Archive powered by MHonArc 2.6.16.