SeExpr
ExprSpecType.h
Go to the documentation of this file.
1/*
2* Copyright Disney Enterprises, Inc. All rights reserved.
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License
6* and the following modification to it: Section 6 Trademarks.
7* deleted and replaced with:
8*
9* 6. Trademarks. This License does not grant permission to use the
10* trade names, trademarks, service marks, or product names of the
11* Licensor and its affiliates, except as required for reproducing
12* the content of the NOTICE file.
13*
14* You may obtain a copy of the License at
15* http://www.apache.org/licenses/LICENSE-2.0
16*/
17#ifndef _ExprSpecType_h_
18#define _ExprSpecType_h_
19
20#include <SeExpr2/Vec.h>
21#include <vector>
22#include <sstream>
23#include <SeExpr2/Curve.h>
24#include <cstdio>
25
29
31
32 virtual ~ExprSpecNode() {}
33};
34
36 double v;
37
38 ExprSpecScalarNode(int startPos, int endPos, double scalar) : ExprSpecNode(startPos, endPos), v(scalar) {}
39};
40
45 v = SeExpr2::Vec3d(static_cast<ExprSpecScalarNode*>(x)->v,
46 static_cast<ExprSpecScalarNode*>(y)->v,
47 static_cast<ExprSpecScalarNode*>(z)->v);
48 }
49};
50
52 std::vector<ExprSpecNode*> nodes;
54
55 void add(ExprSpecNode* node) {
57 endPos = std::max(node->endPos, endPos);
58 nodes.push_back(node);
59 }
60};
61
63 std::string v;
64 ExprSpecStringNode(int startPos, int endPos, const char* s) : ExprSpecNode(startPos, endPos), v(s) {}
65};
66
70};
71
75};
76
80};
81
85};
86
90};
91
92#endif
Vec< double, 3, false > Vec3d
Definition: Vec.h:384
double max(double x, double y)
Definition: ExprBuiltins.h:42
double min(double x, double y)
Definition: ExprBuiltins.h:43
ExprSpecNode * args
Definition: ExprSpecType.h:78
ExprSpecAnimCurveNode(ExprSpecNode *args)
Definition: ExprSpecType.h:79
ExprSpecNode * args
Definition: ExprSpecType.h:73
ExprSpecCCurveNode(ExprSpecNode *args)
Definition: ExprSpecType.h:74
ExprSpecNode * args
Definition: ExprSpecType.h:83
ExprSpecColorSwatchNode(ExprSpecNode *args)
Definition: ExprSpecType.h:84
ExprSpecCurveNode(ExprSpecNode *args)
Definition: ExprSpecType.h:69
ExprSpecNode * args
Definition: ExprSpecType.h:68
ExprSpecNode * args
Definition: ExprSpecType.h:88
ExprSpecDeepWaterNode(ExprSpecNode *args)
Definition: ExprSpecType.h:89
void add(ExprSpecNode *node)
Definition: ExprSpecType.h:55
std::vector< ExprSpecNode * > nodes
Definition: ExprSpecType.h:52
ExprSpecListNode(int startPos, int endPos)
Definition: ExprSpecType.h:53
Mini parse tree node... Only represents literals, and lists of literals.
Definition: ExprSpecType.h:27
ExprSpecNode(int startPos, int endPos)
Definition: ExprSpecType.h:30
virtual ~ExprSpecNode()
Definition: ExprSpecType.h:32
ExprSpecScalarNode(int startPos, int endPos, double scalar)
Definition: ExprSpecType.h:38
ExprSpecStringNode(int startPos, int endPos, const char *s)
Definition: ExprSpecType.h:64
ExprSpecVectorNode(int startPos, int endPos, ExprSpecNode *x, ExprSpecNode *y, ExprSpecNode *z)
Definition: ExprSpecType.h:43
SeExpr2::Vec3d v
Definition: ExprSpecType.h:42
</pre >< h3 > A simple variable reference</h3 > This is not a very interesting subclass of expression until we add some additional variables Variables on some applications may be very dynamic In this we only need x
Definition: tutorial.txt:108
This is the same as the prman cellnoise function< br ></div >< br > float< b > float y< br > float< b > float float z
Definition: userdoc.txt:218
This is the same as the prman cellnoise function< br ></div >< br > float< b > float y< br > float< b > float y
Definition: userdoc.txt:218