mmf
Class MMF_SwitchFormula
Object
common:Generic
common:Formula
mmf:MMF_SwitchFormula
- Direct Known Subclasses:
- MMF_SwitchGradientSlope, MMF_SwitchTransformFormula
class
- Formula:MMF_SwitchFormula
Base class for formulas that allow switching to be used with
mmf5.ufm-Generic Switch Formula
Ultra Fractal Source
Toggle UF Source Code Display
class MMF_SwitchFormula(common.ulb:Formula) {
; Base class for formulas that allow switching to be used with
; mmf5.ufm-Generic Switch Formula<br>
public:
import "common.ulb"
; @param pparent the parent, generally "this" for the parent, or zero
func MMF_SwitchFormula(Generic pparent)
Formula.Formula(pparent)
if (fType = @p_mandy)
fValue = fConstant = @p_start
else
fValue = fConstant = @p_seed
endif
endfunc
; @param f flag for Mandelbrot or Julia mode, is true for Mandelbrots
; @param v the value to be used as the start value or constant
func SetParams(bool f,complex v)
if !@p_manual
fType = f
fValue = fConstant = v
endif
endfunc
protected:
complex fConstant
complex fValue
bool fType
default:
int param v_mmfswitchformula
caption = "Version (MMF_SwitchFormula)"
default = 100
hint = "This version parameter is used to detect when a change has \
been made to the formula that is incompatible with the \
previous version. When that happens, this field will reflect \
the old version number to alert you to the fact that an \
alternate rendering is being used."
visible = @v_mmfswitchformula < 100
endparam
heading
caption = "Information"
text = "This formula object is intended for use with the 'Generic \
Switch Formula' in mmf5.ufm and in formula objects that \
allow switching, however it will still function without \
switching in non-switching formulas and formula objects."
endheading
heading
enabled = false
endheading
bool param p_manual
caption = "Manual Over-ride"
default = false
hint = "When enabled you will have manual control of the \
Mandelbrot/Julia switching and the associated parameters \
i.e. you will be able to over-ride the settings from the \
parent object. Note that this will effectively disable \
UF's built-in switching but allow full use of this formula \
when not used with a compatible switching parent."
endparam
bool param p_mandy
caption = "Mandelbrot ?"
default = true
hint = "Disable for Julia mode."
visible = @p_manual
endparam
complex param p_start
caption = "Mandelbrot Start Value"
default = (0,0)
visible = @p_manual && @p_mandy
endparam
complex param p_seed
caption = "Julia Constant"
default = (-1.25,0)
visible = @p_manual && !@p_mandy
endparam
}
Methods inherited from class Object |
|
MMF_SwitchFormula
public MMF_SwitchFormula(Generic pparent)
- Parameters:
pparent
- the parent, generally "this" for the parent, or zero
MMF_SwitchFormula
public MMF_SwitchFormula()
SetParams
public void SetParams(boolean f,
complex v)
- Parameters:
f
- flag for Mandelbrot or Julia mode, is true for Mandelbrotsv
- the value to be used as the start value or constant