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:
parent
dcbdf4e2ec
commit
3014a39bb0
0
parser/nodes.cc
Normal file
0
parser/nodes.cc
Normal file
26
parser/nodes.h
Normal file
26
parser/nodes.h
Normal 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
|
||||||
|
|
@ -8,6 +8,7 @@
|
|||||||
#include "util/Vector.h"
|
#include "util/Vector.h"
|
||||||
#include "util/refptr.h"
|
#include "util/refptr.h"
|
||||||
#include "shapes/Shape.h" /* includes all shape types */
|
#include "shapes/Shape.h" /* includes all shape types */
|
||||||
|
#include "nodes.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -27,28 +28,6 @@ int yywrap()
|
|||||||
return 1;
|
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>
|
#define YYSTYPE refptr<Node>
|
||||||
|
|
||||||
static Scene * g_scene;
|
static Scene * g_scene;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user