added parser/nodes.{cc,h}, broke compilation temporarily

git-svn-id: svn://anubis/fart/trunk@106 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2009-02-16 13:41:09 +00:00
parent dcbdf4e2ec
commit 3014a39bb0
3 changed files with 27 additions and 22 deletions

0
parser/nodes.cc Normal file
View File

26
parser/nodes.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef NODES_H
#define NODES_H NODES_H
#include <vector>
class Node
{
public:
void addChild(refptr<Node> child) { m_children.push_back(child); }
virtual refptr<Material> getMaterial()
{
return refptr<Material>(NULL);
}
protected:
std::vector< refptr<Node> > m_children;
};
class SceneNode
{
};
#endif

View File

@ -8,6 +8,7 @@
#include "util/Vector.h"
#include "util/refptr.h"
#include "shapes/Shape.h" /* includes all shape types */
#include "nodes.h"
using namespace std;
extern "C" {
@ -27,28 +28,6 @@ int yywrap()
return 1;
}
class Node
{
public:
Node();
int type;
refptr<double> the_double;
refptr<Node> the_Node;
refptr<Node> the_tail;
refptr<Material> the_Material;
refptr<Shape> the_Shape;
refptr<Vector> the_Vector;
refptr<Color> the_Color;
};
enum Node_Type
{
Node_Shape = 0x42001, /* don't clash with bison token namespace */
Node_Camera,
Node_Options,
Node_Light
};
#define YYSTYPE refptr<Node>
static Scene * g_scene;