Scene::load() calling parse() now
git-svn-id: svn://anubis/fart/trunk@125 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
b0014e34d1
commit
30932d00e9
@ -14,6 +14,7 @@
|
|||||||
#include "PointLight.h"
|
#include "PointLight.h"
|
||||||
#include "Lighting.h"
|
#include "Lighting.h"
|
||||||
|
|
||||||
|
#include "parser/parser.h"
|
||||||
#include "parser/nodes.h"
|
#include "parser/nodes.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -78,6 +79,8 @@ Scene::~Scene()
|
|||||||
|
|
||||||
void Scene::load(const char * filename)
|
void Scene::load(const char * filename)
|
||||||
{
|
{
|
||||||
|
refptr<Node> node = parse(filename);
|
||||||
|
|
||||||
/* TODO: parse file somehow */
|
/* TODO: parse file somehow */
|
||||||
refptr<Shape> plane = new Plane(0, 0, 1, -2);
|
refptr<Shape> plane = new Plane(0, 0, 1, -2);
|
||||||
m_shapes.push_back(plane);
|
m_shapes.push_back(plane);
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "util/Color.h"
|
#include "util/Color.h"
|
||||||
#include "shapes/Shape.h"
|
#include "shapes/Shape.h"
|
||||||
#include "Light.h"
|
#include "Light.h"
|
||||||
#include "parser/nodes.h"
|
|
||||||
|
|
||||||
#define SCENE_MAX_TRANSPARENT_HITS 8
|
#define SCENE_MAX_TRANSPARENT_HITS 8
|
||||||
#define SCENE_TRANSPARENCY_THRESHOLD 0.01
|
#define SCENE_TRANSPARENCY_THRESHOLD 0.01
|
||||||
@ -46,7 +45,6 @@ class Scene
|
|||||||
void renderPixel(int x, int y, unsigned char * pixel);
|
void renderPixel(int x, int y, unsigned char * pixel);
|
||||||
Color traceRay(const Ray & ray);
|
Color traceRay(const Ray & ray);
|
||||||
std::vector<ShapeDistance> getRayHits(const Ray & ray);
|
std::vector<ShapeDistance> getRayHits(const Ray & ray);
|
||||||
void parse(refptr<Node> node);
|
|
||||||
|
|
||||||
/* rendering parameters */
|
/* rendering parameters */
|
||||||
int m_width;
|
int m_width;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user