jlb
Class JLB_ComboDualTransform

Object
  extended by common:Generic
      extended by jlb:DualTransform
          extended by jlb:JLB_ComboDualTransform

class 
DualTransform:JLB_ComboDualTransform

ComboDualTransform does two UserTransforms and combines them with one of the operators +, -, *, /, ^.


Ultra Fractal Source

Toggle UF Source Code Display

 class JLB_ComboDualTransform(DualTransform) {
 ; ComboDualTransform does two UserTransforms and combines them
 ; with one of the operators +, -, *, /, ^.
 
 public:
   import "common.ulb"
 
   ; @param pparent the parent, generally "this" for the parent, or zero
   func JLB_ComboDualTransform(Generic pparent)
     DualTransform.DualTransform(pparent)
     m_UserTransform1 = new @f_UserTransform1(this)
     m_UserTransform2 = new @f_UserTransform2(this)
   endfunc
   
   ; @param pz
   ; @param pc
   ; @return true if okay; possibly change both arguments
   bool func Iterate(complex &pz, complex &pc)
     complex t1
     if (@mode1 == "z")
       t1 = m_UserTransform1.Iterate(pz)
     else
       t1 = m_UserTransform1.Iterate(pc)
     endif
     complex t2
     if (@mode2 == "z")
       t2 = m_UserTransform2.Iterate(pz)
     else
       t2 = m_UserTransform2.Iterate(pc)
     endif
     if (@op == "+")
       t1 = t1 + t2
     elseif (@op == "-")
       t1 = t1 - t2
     elseif (@op == "*")
       t1 = t1 * t2
     elseif (@op == "/")
       t1 = t1 / t2
     else;if (@op == "^")
       t1 = t1 ^ t2
     endif
     if (@mode0 == "z")
       pz = t1
     else
       pc = t1
     endif
     return true
   endfunc
 
 protected:
    UserTransform m_UserTransform1
    UserTransform m_UserTransform2
 
 default:
   title = "Combo Dual Transform"
   int param v_ComboDualTransform
     caption = "Version (ComboDualTransform)"
     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_ComboDualTransform < 100
   endparam
 
 
   param mode0
     caption = "Change z or c?"
     default = 0
     enum = "z" "c"
     hint = "Which variable to change"
   endparam
     
 Heading
   caption = "First transform"
 Endheading
   param mode1
     caption = "Based on z or c?"
     default = 0
     enum = "z" "c"
   endparam
   UserTransform param f_UserTransform1
     caption = "Transform 1"
     default = JLB_BasicUserTransform
 ;     hint = "The default Null BasicTransform does nothing."
   endparam
 
 Heading
 Endheading
   param op
     caption = "op"
     enum = "+" "-" "*" "/" "^"
     default = 0
     hint = "result = First transform op second transform"
   endparam
 
 Heading
   caption = "Second transform"
 Endheading
   param mode2
     caption = "Based on z or c?"
     default = 1
     enum = "z" "c"
   endparam
   UserTransform param f_UserTransform2
     default = JLB_NullUserTransform
     caption = "Transform 2"
 ;     hint = "The default Null BasicTransform does nothing."
   endparam
 }
 


Constructor Summary
JLB_ComboDualTransform()
           
JLB_ComboDualTransform(Generic pparent)
           
 
Method Summary
 boolean Iterate(complex pz, complex pc)
           
 
Methods inherited from class jlb:DualTransform
Init
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

JLB_ComboDualTransform

public JLB_ComboDualTransform(Generic pparent)
Parameters:
pparent - the parent, generally "this" for the parent, or zero

JLB_ComboDualTransform

public JLB_ComboDualTransform()
Method Detail

Iterate

public boolean Iterate(complex pz,
                       complex pc)
Overrides:
Iterate in class DualTransform
Parameters:
pz -
pc -
Returns:
true if okay; possibly change both arguments