Lots of little niggling compiler errors

This commit is contained in:
Eryn Wells 2014-08-09 20:46:26 -07:00
parent 3a8c955796
commit b7a9f07d5e
3 changed files with 12 additions and 7 deletions

View file

@ -5,6 +5,10 @@
#include <ostream> #include <ostream>
#include "basics/color.hh"
#include "basics/types.hh"
namespace charles { namespace charles {
namespace basics { namespace basics {

View file

@ -252,8 +252,8 @@ LinearCombination(const Double k1, const Vector4& v1,
/* /*
* charles::basics::operator<< -- * charles::basics::operator<< --
*/ */
std::ostream & std::ostream&
operator<<(std::ostream &os, const Vector3 &v) operator<<(std::ostream& os, const Vector4& v)
{ {
// Stream the vector like this: <x, y, z> // Stream the vector like this: <x, y, z>
os << "<" << v.X() << ", " << v.Y() << ", " << v.Z() << ">"; os << "<" << v.X() << ", " << v.Y() << ", " << v.Z() << ">";

View file

@ -8,18 +8,19 @@
#include <cstdio> #include <cstdio>
#include <unistd.h> #include <unistd.h>
#include "basics.h"
#include "log.hh" #include "log.hh"
#include "light.hh" #include "light.hh"
#include "reader_yaml.hh" #include "reader_yaml.hh"
#include "scene.hh" #include "scene.hh"
#include "writer_png.h" #include "writer_png.h"
#include "basics/basics.hh"
#define LOG_NAME "ROOT" #define LOG_NAME "ROOT"
#include "logModule.hh" #include "logModule.hh"
using namespace charles; using namespace charles;
using namespace charles::basics;
static void static void
@ -38,8 +39,8 @@ main(int argc,
Scene scene; Scene scene;
PointLight *l1 = new PointLight(Vector3(4.0, 6.0, 1.0), Color::White, 0.8); PointLight *l1 = new PointLight(Vector4(4.0, 6.0, 1.0), Color::White, 0.8);
scene.add_light(l1); scene.AddLight(l1);
std::string logFilename; std::string logFilename;
unsigned int logLevel = 0; unsigned int logLevel = 0;
@ -96,11 +97,11 @@ main(int argc,
/* Call tracer. */ /* Call tracer. */
LOG_INFO << "Beginning render"; LOG_INFO << "Beginning render";
scene.render(); scene.Render();
/* Write rendered scene to PNG file. */ /* Write rendered scene to PNG file. */
PNGWriter writer; PNGWriter writer;
scene.write(writer, outfile); scene.Write(writer, outfile);
if (logLevel > 0) { if (logLevel > 0) {
Log::Close(); Log::Close();