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 
28 {
30 
31 
33  :startPos(startPos),endPos(endPos)
34  {}
35 
36  virtual ~ExprSpecNode()
37  {}
38 };
39 
41 {
42  double v;
43 
44  ExprSpecScalarNode(int startPos,int endPos,double scalar)
45  :ExprSpecNode(startPos,endPos),v(scalar)
46  {}
47 };
48 
50 {
53  :ExprSpecNode(startPos,endPos)
54  {
55  v=SeExpr2::Vec3d(static_cast<ExprSpecScalarNode*>(x)->v,static_cast<ExprSpecScalarNode*>(y)->v,static_cast<ExprSpecScalarNode*>(z)->v);
56  }
57 
58 };
59 
61 {
62  std::vector<ExprSpecNode*> nodes;
64  :ExprSpecNode(startPos,endPos)
65  {}
66 
67  void add(ExprSpecNode* node){
70  nodes.push_back(node);
71  }
72 };
73 
75 {
76  std::string v;
77  ExprSpecStringNode(int startPos,int endPos,const char* s)
78  :ExprSpecNode(startPos,endPos),v(s)
79  {}
80 };
81 
83 {
86  :ExprSpecNode(args->startPos,args->endPos),args(args)
87  {}
88 };
89 
91 {
94  :ExprSpecNode(args->startPos,args->endPos),args(args)
95  {}
96 };
97 
99 {
102  :ExprSpecNode(args->startPos,args->endPos),args(args)
103  {}
104 };
105 
107 {
110  :ExprSpecNode(args->startPos,args->endPos),args(args)
111  {}
112 };
113 
115 {
118  :ExprSpecNode(args->startPos,args->endPos),args(args)
119  {}
120 };
121 
122 #endif
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
ExprSpecNode * args
Definition: ExprSpecType.h:84
ExprSpecCurveNode(ExprSpecNode *args)
Definition: ExprSpecType.h:85
ExprSpecCCurveNode(ExprSpecNode *args)
Definition: ExprSpecType.h:93
void add(ExprSpecNode *node)
Definition: ExprSpecType.h:67
ExprSpecScalarNode(int startPos, int endPos, double scalar)
Definition: ExprSpecType.h:44
std::vector< ExprSpecNode * > nodes
Definition: ExprSpecType.h:62
ExprSpecAnimCurveNode(ExprSpecNode *args)
Definition: ExprSpecType.h:101
ExprSpecDeepWaterNode(ExprSpecNode *args)
Definition: ExprSpecType.h:117
virtual ~ExprSpecNode()
Definition: ExprSpecType.h:36
ExprSpecStringNode(int startPos, int endPos, const char *s)
Definition: ExprSpecType.h:77
ExprSpecColorSwatchNode(ExprSpecNode *args)
Definition: ExprSpecType.h:109
ExprSpecNode * args
Definition: ExprSpecType.h:100
double max(double x, double y)
Definition: ExprBuiltins.h:42
ExprSpecListNode(int startPos, int endPos)
Definition: ExprSpecType.h:63
Vec< double, 3, false > Vec3d
Definition: Vec.h:368
double min(double x, double y)
Definition: ExprBuiltins.h:43
Mini parse tree node... Only represents literals, and lists of literals.
Definition: ExprSpecType.h:27
</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
ExprSpecNode * args
Definition: ExprSpecType.h:116
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
SeExpr2::Vec3d v
Definition: ExprSpecType.h:51
ExprSpecNode(int startPos, int endPos)
Definition: ExprSpecType.h:32
ExprSpecVectorNode(int startPos, int endPos, ExprSpecNode *x, ExprSpecNode *y, ExprSpecNode *z)
Definition: ExprSpecType.h:52
ExprSpecNode * args
Definition: ExprSpecType.h:92
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