allowing transform blocks inside boolean shapes, but using a shape reference to a boolean shape does not propagate transform properly

git-svn-id: svn://anubis/fart/trunk@286 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop committed 2010-07-09 18:33:26 +00:00
1 parent fc2c62d5ac
commit b4a2c8ef8e
7 files changed
+73 -36

No files matched your search

+6 -3
View File
@@ -23,6 +23,7 @@ class Node
}
virtual bool isShape() { return false; }
virtual bool isMaterial() { return false; }
virtual bool isTransformBlock() { return false; }
virtual std::string getString() { return ""; }
protected:
@@ -267,9 +268,8 @@ class RotateBlockNode : public RotateNode
{
public:
RotateBlockNode(double angle, refptr<Vector> vector)
: RotateNode(angle, vector)
{
}
: RotateNode(angle, vector) {}
bool isTransformBlock() { return true; }
};
class ScaleNode : public VectorNode
@@ -282,6 +282,7 @@ class ScaleBlockNode : public ScaleNode
{
public:
ScaleBlockNode(refptr<Vector> vector) : ScaleNode(vector) {}
bool isTransformBlock() { return true; }
};
class SceneNode : public Node
@@ -298,6 +299,7 @@ class ShapeRefNode : public IdentifierNode
{
public:
ShapeRefNode(const std::string & str) : IdentifierNode(str) {}
bool isShape() { return true; }
};
class ShininessNode : public NumberNode
@@ -340,6 +342,7 @@ class TranslateBlockNode : public TranslateNode
{
public:
TranslateBlockNode(refptr<Vector> vector) : TranslateNode(vector) {}
bool isTransformBlock() { return true; }
};
class TransparencyNode : public NumberNode
+2 -1
View File
@@ -121,6 +121,8 @@ bool_items: /* empty */
bool_item: shape
| shape_item
| shape_definition
| transform_block
;
box: BOX LCURLY box_items RCURLY {
@@ -532,7 +534,6 @@ transform_block_items: /* empty */
;
transform_block_item: transform_block { $$ = $1; }
| light { $$ = $1; }
| shape { $$ = $1; }
| shape_definition { $$ = $1; }
;