added jitter and radius parameters to light objects; not using them yet
git-svn-id: svn://anubis/fart/trunk@255 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
bc27be0f85
commit
1af787b9ab
10 files changed
+53
-11
No files matched your search
@@ -130,6 +130,12 @@ class ItemsNode : public Node
|
||||
{
|
||||
};
|
||||
|
||||
class JitterNode : public IntegerNode
|
||||
{
|
||||
public:
|
||||
JitterNode(int i) : IntegerNode(i) {}
|
||||
};
|
||||
|
||||
class LightNode : public Node
|
||||
{
|
||||
};
|
||||
|
||||
@@ -49,6 +49,7 @@ diffuse return DIFFUSE;
|
||||
exposure return EXPOSURE;
|
||||
height return HEIGHT;
|
||||
intersect return INTERSECT;
|
||||
jitter return JITTER;
|
||||
light return LIGHT;
|
||||
look_at return LOOKAT;
|
||||
material return MATERIAL;
|
||||
|
||||
@@ -68,6 +68,7 @@ static refptr<Node> parsed_scene_node;
|
||||
%token EXPOSURE;
|
||||
%token HEIGHT;
|
||||
%token INTERSECT;
|
||||
%token JITTER;
|
||||
%token LIGHT;
|
||||
%token LOOKAT;
|
||||
%token MATERIAL;
|
||||
@@ -190,6 +191,11 @@ intersect: INTERSECT LCURLY bool_items RCURLY {
|
||||
}
|
||||
;
|
||||
|
||||
jitter: JITTER number {
|
||||
$$ = new JitterNode($2->getInteger());
|
||||
}
|
||||
;
|
||||
|
||||
light: LIGHT LCURLY light_items RCURLY {
|
||||
$$ = new LightNode();
|
||||
$$->addChildren($3);
|
||||
@@ -216,6 +222,12 @@ light_item: POSITION vector {
|
||||
| COLOR vector {
|
||||
$$ = new ColorNode($2->getVector());
|
||||
}
|
||||
| radius {
|
||||
$$ = $1;
|
||||
}
|
||||
| jitter {
|
||||
$$ = $1;
|
||||
}
|
||||
;
|
||||
|
||||
material: MATERIAL LCURLY material_items RCURLY {
|
||||
|
||||
Reference in new issue
Block a user