27#ifdef SEEXPR_USE_ANIMLIB
28#include <animlib/AnimCurve.h>
29#include <animlib/AnimKeyframe.h>
33inline void printVal(std::stringstream& stream,
double v) { stream << v; }
35 stream <<
"[" << v[0] <<
"," << v[1] <<
"," << v[2] <<
"]";
38#define UNUSED(x) (void)(x)
55 virtual std::string
str()
const {
return std::string(
"<unknown>"); }
68 if (comment.find(
'.') != std::string::npos || comment.find(
'e') != std::string::npos) {
70 if (sscanf(comment.c_str(),
"#%f,%f", &fmin, &fmax) == 2) {
78 if (sscanf(comment.c_str(),
"#%d,%d", &imin, &imax) == 2) {
86 std::string
str()
const {
88 s <<
name <<
" " <<
v <<
" in [" <<
min <<
"," <<
max <<
"] subset " << (
isInt ?
"Integers" :
"Reals");
95 return min == o->min &&
max == o->max &&
v == o->v &&
isInt == o->isInt &&
name == o->name;
110 int numParsed = sscanf(comment.c_str(),
"#%f,%f", &fmin, &fmax);
111 if (numParsed == 2) {
120 s <<
name <<
" " <<
v <<
" in [" <<
min <<
"," <<
max <<
"]";
128 return min == o->min &&
max == o->max &&
v == o->v &&
name == o->name;
140 char namebuf[1024], typebuf[1024];
141 int parsed = sscanf(comment.c_str(),
"#%s %s", typebuf, namebuf);
153 stream <<
"\"" <<
v <<
"\"";
163 return v == o->v &&
type == o->type &&
name == o->name;
183 s <<
name <<
" ccurve";
190 for (
size_t i = 0, sz =
cvs.size(); i < sz; i++) {
191 const CV& cv =
cvs[i];
192 stream <<
"," << cv.
_pos <<
",";
214#ifdef SEEXPR_USE_ANIMLIB
215 animlib::AnimCurve
curve;
223#ifdef SEEXPR_USE_ANIMLIB
238 s <<
name <<
" ccurve";
242#ifdef SEEXPR_USE_ANIMLIB
246 stream <<
",\"" << animlib::AnimCurve::infinityTypeToString(
curve.getPreInfinity()) <<
"\"";
247 stream <<
",\"" << animlib::AnimCurve::infinityTypeToString(
curve.getPostInfinity()) <<
"\"";
248 stream <<
"," <<
curve.isWeighted();
249 stream <<
",\"" <<
link <<
"\"";
250 for (
auto it =
curve.getFirstKey(), itend =
curve.getEndKey();
it != itend; ++
it) {
251 const animlib::AnimKeyframe& key = *
it;
252 stream <<
"," << key.getTime() <<
"," << key.getValue() <<
"," << key.getInWeight() <<
","
253 << key.getOutWeight() <<
"," << key.getInAngle() <<
"," << key.getOutAngle() <<
",\""
254 << animlib::AnimKeyframe::tangentTypeToString(key.getInTangentType()) <<
"\",\""
255 << animlib::AnimKeyframe::tangentTypeToString(key.getOutTangentType()) <<
"\","
256 << key.isWeightsLocked();
282 int parsed = sscanf(comment.c_str(),
"#%s", labelbuf);
292 s <<
name <<
" swatch";
297 for (
size_t i = 0, sz =
colors.size(); i < sz; i++) {
320 std::cerr <<
"\nColorSwatchEditable:\n";
321 for (
unsigned int i = 0; i <
colors.size(); i++) {
322 std::cerr <<
colors[i][0] <<
", " <<
colors[i][1] <<
", " <<
colors[i][2] << std::endl;
338 s <<
name <<
" deepWater";
void printVal(std::stringstream &stream, double v)
GenericCurveEditable< SeExpr2::Vec3d > ColorCurveEditable
GenericCurveEditable< double > CurveEditable
endif() set(ANIMLIB_SRCS "") if(DEFINED ANIMLIB_DIR) set(CE_MOC_HDRS CE/CECurveListUI.h CE/CEDragHandlers.h CE/CEGraphCurve.h CE/CEGraphKey.h CE/CEGraphSeg.h CE/CEGraphUI.h CE/CEMainUI.h CE/CESegEditUI.h CE/CETool.h) set(CE_CPPS CE/CECurveListUI.cpp CE/CEDragHandlers.cpp CE/CEGraphCurve.cpp CE/CEGraphKey.cpp CE/CEGraphSeg.cpp CE/CEGraphUI.cpp CE/CEMainUI.cpp CE/CESegEditUI.cpp CE/CETool.cpp) if(ENABLE_QT5) qt5_wrap_cpp(CE_MOC_SRCS $
Interpolation curve class for double->double and double->Vec3D.
InterpType
Supported interpolation types.
you may not use this file except in compliance with the License and the following modification to it
SeExpr2::CurveFuncX curve
void appendString(std::stringstream &stream) const
virtual bool controlsMatch(const Editable &other) const
std::string animationSystemCurve
AnimCurveEditable(const std::string &name, int startPos, int endPos)
bool parseComment(const std::string &comment)
parses a comment. if false is returned then delete the control from the editable
std::vector< SeExpr2::Vec3d > colors
void appendString(std::stringstream &stream) const
bool parseComment(const std::string &comment)
parses a comment. if false is returned then delete the control from the editable
virtual bool controlsMatch(const Editable &other) const
ColorSwatchEditable(const std::string &name, int startPos, int endPos)
void add(const SeExpr2::Vec3d &value)
void change(int index, const SeExpr2::Vec3d &value)
void setParams(const SeDeepWaterParams ¶msIn)
void appendString(std::stringstream &stream) const
virtual bool controlsMatch(const Editable &other) const
bool parseComment(const std::string &)
parses a comment. if false is returned then delete the control from the editable
DeepWaterEditable(const std::string &name, int startPos, int endPos)
void updatePositions(const Editable &other)
virtual void appendString(std::stringstream &stream) const =0
virtual std::string str() const
Editable(const std::string &name, int startPos, int endPos)
virtual bool parseComment(const std::string &comment)=0
parses a comment. if false is returned then delete the control from the editable
virtual bool controlsMatch(const Editable &) const =0
Curve::InterpType InterpType
virtual bool controlsMatch(const Editable &other) const
bool parseComment(const std::string &)
parses a comment. if false is returned then delete the control from the editable
void appendString(std::stringstream &stream) const
SeExpr2::Curve< TVAL >::CV CV
void add(double x, const TVAL &y, int interp)
SeExpr2::Curve< TVAL > Curve
GenericCurveEditable(const std::string &name, int startPos, int endPos)
virtual bool controlsMatch(const Editable &other) const
void appendString(std::stringstream &stream) const
bool parseComment(const std::string &comment)
parses a comment. if false is returned then delete the control from the editable
NumberEditable(const std::string &name, int startPos, int endPos, double val)
SeExpr2::Vec3d flowDirection
double directionalFactorExponent
double directionalReflectionDamping
virtual bool controlsMatch(const Editable &other) const
StringEditable(int startPos, int endPos, const std::string &val)
bool parseComment(const std::string &comment)
parses a comment. if false is returned then delete the control from the editable
void appendString(std::stringstream &stream) const
bool parseComment(const std::string &comment)
parses a comment. if false is returned then delete the control from the editable
virtual bool controlsMatch(const Editable &other) const
void appendString(std::stringstream &stream) const
VectorEditable(const std::string &name, int startPos, int endPos, const SeExpr2::Vec3d &val)
</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
This is the same as the prman cellnoise function< br ></div >< br > float< b > float y< br > float< b > float y
The result is computed int int< br >< div style="margin-left: 40px;"> Picks values randomly between loRange and hiRange based on supplied index(which is automatically hashed).  
For any rgb or hsl value(except for negative s values)