23 #include <QtCore/QObject>
24 #include <QtGui/QGraphicsPolygonItem>
25 #include <QtGui/QGraphicsView>
26 #include <QtGui/QLineEdit>
31 #include <SeExpr2/Vec.h>
36 SeDeepWaterParams(
int resolutionIn,
double tileSizeIn,
double lengthCutoffIn,
double amplitudeIn,
double windAngleIn,
double windSpeedIn,
double directionalFactorExponentIn,
double directionalReflectionDampingIn,
const SeExpr2::Vec3d& flowDirectionIn,
double sharpenIn,
double timeIn,
double filterWidthIn) :
resolution(resolutionIn),
tileSize(tileSizeIn),
lengthCutoff(lengthCutoffIn),
amplitude(amplitudeIn),
windAngle(windAngleIn),
windSpeed(windSpeedIn),
directionalFactorExponent(directionalFactorExponentIn),
directionalReflectionDamping(directionalReflectionDampingIn),
flowDirection(flowDirectionIn),
sharpen(sharpenIn),
time(timeIn),
filterWidth(filterWidthIn) {}
67 inline static T
kscale(){
return 1/100.0;};
124 for (
size_t sample=0; sample<
energy.size(); sample++) {
131 if (
energy.empty())
return 0;
132 if (param<0) param = 0;
133 if (param>1) param = 1;
140 return klow<0 ? 0 : klow;
145 return khigh>1 ? 1 : khigh;
167 setTransformationAnchor(QGraphicsView::NoAnchor);
168 setResizeAnchor(QGraphicsView::NoAnchor);
191 QLineEdit::focusOutEvent(e);
237 void resize(
const int width,
const int height);
DeepWaterLineEdit * _amplitudeEdit
DeepWaterLineEdit * _sharpenEdit
void lengthCutoffChanged(double val)
void windAngleChangedSignal(double val)
SeDeepWaterParams(int resolutionIn, double tileSizeIn, double lengthCutoffIn, double amplitudeIn, double windAngleIn, double windSpeedIn, double directionalFactorExponentIn, double directionalReflectionDampingIn, const SeExpr2::Vec3d &flowDirectionIn, double sharpenIn, double timeIn, double filterWidthIn)
DeepWaterLineEdit * _windSpeedEdit
void amplitudeChanged(double val)
virtual void resizeEvent(QResizeEvent *event)
QGraphicsRectItem * _baseRect
QGraphicsRectItem * _gridRect
DeepWaterLineEdit * _lengthCutoffEdit
void windSpeedChangedSignal(double val)
void flowDirectionChanged(QString val)
void windAngleChanged(double val)
void setParams(const SeDeepWaterParams ¶msIn)
T powerLaw(const T x, const SeDeepWaterParams ¶ms)
void resolutionChangedSignal(int val)
void flowDirectionChanged()
DeepWaterLineEdit * _resolutionEdit
DeepWaterLineEdit * _flowDirectionEdit
void directionalFactorExponentChanged()
QGraphicsPolygonItem * _curvePoly
void directionalReflectionDampingChangedSignal(double val)
The result is computed int int< br >< divstyle="margin-left:40px;"> Picks values randomly between loRange and hiRange based on supplied index(which is automatically hashed). 
T fromIndex(const T index)
< br > pow($a, 0.5)+$b< br >< br ></div > External variables can also be overridden by local assignment. 
SeExpr2::Vec3d flowDirection
double directionalReflectionDamping
DeepWaterLineEdit * _windAngleEdit
double directionalFactorExponent
void directionalReflectionDampingChanged(double val)
void sharpenChanged(double val)
void windSpeedChanged(double val)
void sharpenChangedSignal(double val)
void resize(const int width, const int height)
DeepWaterLineEdit * _directionalReflectionDampingEdit
</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
void resolutionChanged(int val)
ExprDeepWater(QWidget *parent=0)
SeDeepWater< double > T_CURVE
This is the same as the prman cellnoise function< br ></div >< br > float< b > float y< br > float< b > float float z
void tileSizeChangedSignal(double val)
void setParams(const SeDeepWaterParams ¶ms)
void flowDirectionChangedSignal(QString val)
T getValue(double param) const
Evaluates curve and returns full value.
DeepWaterLineEdit * _directionalFactorExponentEdit
void directionalFactorExponentChangedSignal(double val)
virtual void focusOutEvent(QFocusEvent *e)
void resizeSignal(int width, int height)
void lengthCutoffChanged()
DeepWaterLineEdit * _tileSizeEdit
void directionalReflectionDampingChanged()
void tileSizeChanged(double val)
void emitDeepWaterChanged()
DeepWaterLineEdit(QWidget *parent=0)
void setParams(const SeDeepWaterParams ¶msIn)
void amplitudeChangedSignal(double val)
void lengthCutoffChangedSignal(double val)
void directionalFactorExponentChanged(double val)