added maximum depth command-line argument (-d) and scene option (max_depth); prettified elapsed time output when greater than 60 seconds

git-svn-id: svn://anubis/fart/trunk@203 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop committed 2009-03-10 00:01:21 +00:00
1 parent 4716b200fd
commit 9f9ce1a8f5
8 files changed
+47 -6

No files matched your search

+6
View File
@@ -153,6 +153,12 @@ class MaterialRefNode : public IdentifierNode
bool isMaterial() { return true; }
};
class MaxDepthNode : public IntegerNode
{
public:
MaxDepthNode(int i) : IntegerNode(i) {}
};
class MultisampleNode : public IntegerNode
{
public:
+1
View File
@@ -51,6 +51,7 @@ intersect return INTERSECT;
light return LIGHT;
look_at return LOOKAT;
material return MATERIAL;
max_depth return MAXDEPTH;
multisample return MULTISAMPLE;
options return OPTIONS;
plane return PLANE;
+4
View File
@@ -70,6 +70,7 @@ static refptr<Node> parsed_scene_node;
%token LIGHT;
%token LOOKAT;
%token MATERIAL;
%token MAXDEPTH;
%token MULTISAMPLE;
%token OPTIONS;
%token PLANE;
@@ -281,6 +282,9 @@ options_item: WIDTH DEC_NUMBER {
| MULTISAMPLE DEC_NUMBER {
$$ = new MultisampleNode($2->getInteger());
}
| MAXDEPTH DEC_NUMBER {
$$ = new MaxDepthNode($2->getInteger());
}
;
plane: PLANE LCURLY plane_items RCURLY {