Put the readers and writers in charles namespace
This commit is contained in:
parent
84cb27fa6f
commit
3a8c955796
4 changed files with 29 additions and 20 deletions
|
@ -2,18 +2,18 @@
|
||||||
* vim: set tw=80:
|
* vim: set tw=80:
|
||||||
* Eryn Wells <eryn@erynwells.me>
|
* Eryn Wells <eryn@erynwells.me>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __READERYAML_HH__
|
||||||
|
#define __READERYAML_HH__
|
||||||
|
|
||||||
|
#include "reader.hh"
|
||||||
|
#include "scene.hh"
|
||||||
|
|
||||||
|
namespace charles {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An input file reader for YAML files.
|
* An input file reader for YAML files.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __READER_YAML_HH__
|
|
||||||
#define __READER_YAML_HH__
|
|
||||||
|
|
||||||
#include "reader.hh"
|
|
||||||
#include "scene.h"
|
|
||||||
|
|
||||||
|
|
||||||
struct YAMLReader
|
struct YAMLReader
|
||||||
: public Reader
|
: public Reader
|
||||||
{
|
{
|
||||||
|
@ -21,9 +21,9 @@ struct YAMLReader
|
||||||
: Reader(scene)
|
: Reader(scene)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
~YAMLReader() { }
|
|
||||||
|
|
||||||
ssize_t read_file(const std::string& filename);
|
ssize_t read_file(const std::string& filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} /* namespace charles */
|
||||||
|
|
||||||
#endif /* __READER_YAML_HH__ */
|
#endif /* __READER_YAML_HH__ */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* scene.h
|
/* scene.hh
|
||||||
* vim: tw=80:
|
* vim: tw=80:
|
||||||
* Eryn Wells <eryn@erynwells.me>
|
* Eryn Wells <eryn@erynwells.me>
|
||||||
*/
|
*/
|
||||||
|
@ -17,11 +17,11 @@
|
||||||
#include "basics/basics.hh"
|
#include "basics/basics.hh"
|
||||||
|
|
||||||
|
|
||||||
|
namespace charles {
|
||||||
|
|
||||||
class Writer;
|
class Writer;
|
||||||
|
|
||||||
|
|
||||||
namespace charles {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scenes are the top level object in charles. Scenes contain objects, lights, a
|
* Scenes are the top level object in charles. Scenes contain objects, lights, a
|
||||||
* camera, etc. and can be rendered to pixel data and written to a file.
|
* camera, etc. and can be rendered to pixel data and written to a file.
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
class Scene;
|
namespace charles {
|
||||||
|
|
||||||
|
struct Scene;
|
||||||
|
|
||||||
|
|
||||||
class Writer
|
class Writer
|
||||||
|
@ -24,4 +26,6 @@ public:
|
||||||
virtual int write_scene(const Scene &scene, const std::string &filename) = 0;
|
virtual int write_scene(const Scene &scene, const std::string &filename) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} /* namespace charles */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
/* writer_png.h
|
/* writer_png.h
|
||||||
*
|
* vim: set tw=80:
|
||||||
* Declaration of the PNG writer.
|
|
||||||
*
|
|
||||||
* Eryn Wells <eryn@erynwells.me>
|
* Eryn Wells <eryn@erynwells.me>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __WRITER_PNG_H__
|
#ifndef __WRITERPNG_HH__
|
||||||
#define __WRITER_PNG_H__
|
#define __WRITERPNG_HH__
|
||||||
|
|
||||||
#include "writer.h"
|
#include "writer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace charles {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write for producing PNG files.
|
||||||
|
*/
|
||||||
class PNGWriter
|
class PNGWriter
|
||||||
: public Writer
|
: public Writer
|
||||||
{
|
{
|
||||||
|
@ -18,4 +21,6 @@ public:
|
||||||
int write_scene(const Scene &scene, const std::string &filename);
|
int write_scene(const Scene &scene, const std::string &filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} /* namespace charles */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue