added ambient_occlusion global scene option to parser and vim keywords; added ambient_occlusion scene file
git-svn-id: svn://anubis/fart/trunk@263 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
f5ac18d34f
commit
96f2b7d276
9 files changed
+69
-4
No files matched your search
@@ -68,6 +68,12 @@ class AmbientNode : public VectorNode
|
||||
AmbientNode(refptr<Vector> vector) : VectorNode(vector) {}
|
||||
};
|
||||
|
||||
class AmbientOcclusionNode : public IntegerNode
|
||||
{
|
||||
public:
|
||||
AmbientOcclusionNode(int i) : IntegerNode(i) {}
|
||||
};
|
||||
|
||||
class BoxNode : public Node
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
-?[0-9]*\.[0-9]+ *yylval = new NumberNode(atof(yytext)); return REAL_NUMBER;
|
||||
|
||||
ambient return AMBIENT;
|
||||
ambient_occlusion return AMBIENT_OCCLUSION;
|
||||
box return BOX;
|
||||
camera return CAMERA;
|
||||
color return COLOR;
|
||||
|
||||
@@ -59,6 +59,7 @@ static refptr<Node> parsed_scene_node;
|
||||
%token REAL_NUMBER;
|
||||
|
||||
%token AMBIENT;
|
||||
%token AMBIENT_OCCLUSION;
|
||||
%token BOX;
|
||||
%token CAMERA;
|
||||
%token COLOR;
|
||||
@@ -314,6 +315,9 @@ options_item: WIDTH DEC_NUMBER {
|
||||
| AMBIENT vector {
|
||||
$$ = new AmbientNode($2->getVector());
|
||||
}
|
||||
| AMBIENT_OCCLUSION DEC_NUMBER {
|
||||
$$ = new AmbientOcclusionNode($2->getInteger());
|
||||
}
|
||||
;
|
||||
|
||||
plane: PLANE LCURLY plane_items RCURLY {
|
||||
|
||||
Reference in new issue
Block a user