removed knowledge of domain types from parser, removed process() from Node, added a global refptr<Node> object, took parse(fileName) out of Scene class
git-svn-id: svn://anubis/fart/trunk@123 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
a8e898e445
commit
f3e522262b
5 files changed
+19
-17
No files matched your search
@@ -13,6 +13,9 @@
|
||||
#include "shapes/Shape.h"
|
||||
#include "PointLight.h"
|
||||
#include "Lighting.h"
|
||||
|
||||
#include "parser/nodes.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
Scene::Scene(const map<string, const char *> & options,
|
||||
@@ -116,6 +119,10 @@ void Scene::load(const char * filename)
|
||||
m_lights.push_back(light);
|
||||
}
|
||||
|
||||
void parse(refptr<Node> node)
|
||||
{
|
||||
}
|
||||
|
||||
void Scene::render()
|
||||
{
|
||||
if (m_verbose)
|
||||
|
||||
+2
-3
@@ -11,6 +11,7 @@
|
||||
#include "util/Color.h"
|
||||
#include "shapes/Shape.h"
|
||||
#include "Light.h"
|
||||
#include "parser/nodes.h"
|
||||
|
||||
#define SCENE_MAX_TRANSPARENT_HITS 8
|
||||
#define SCENE_TRANSPARENCY_THRESHOLD 0.01
|
||||
@@ -39,15 +40,13 @@ class Scene
|
||||
void setAmbientLight(const Color & al) { m_ambient_light = al; }
|
||||
Transform & getTransform() { return m_transform; }
|
||||
|
||||
friend int yyparse();
|
||||
|
||||
protected:
|
||||
/* private methods */
|
||||
void load(const char * filename);
|
||||
void renderPixel(int x, int y, unsigned char * pixel);
|
||||
Color traceRay(const Ray & ray);
|
||||
std::vector<ShapeDistance> getRayHits(const Ray & ray);
|
||||
int parse(const char * fileName);
|
||||
void parse(refptr<Node> node);
|
||||
|
||||
/* rendering parameters */
|
||||
int m_width;
|
||||
|
||||
Reference in new issue
Block a user