dmj5
Class DMJ_TrapModeStacked

Object
  extended by common:Generic
      extended by common:TrapMode
          extended by common:TrapModeWithThreshold
              extended by dmj5:DMJ_TrapModeStacked

class 
TrapModeWithThreshold:DMJ_TrapModeStacked



Ultra Fractal Source

Toggle UF Source Code Display

 class DMJ_TrapModeStacked(common.ulb:TrapModeWithThreshold) {
 public:
   import "common.ulb"
 
   func DMJ_TrapModeStacked(Generic pparent)
     TrapModeWithThreshold.TrapModeWithThreshold(pparent)
   endfunc
   
   func Init(complex pz)
     TrapModeWithThreshold.Init(pz)
 
     m_Solid = true
     int j = 0
     while (j < 4)
       m_Distances[j] = 1e20
       ; Note: leave textures initialized at zero.
       j = j + 1
     endwhile
   endfunc
   
   func Iterate(complex pz, complex pzt, float pdistance, float ptexture)
     TrapModeWithThreshold.Iterate(pz, pzt, pdistance, ptexture)
     
     float d2 = 0
     if (@p_trapstackorder == 0)
       d2 = m_Distances[0] - (m_Iterations-m_IterationPoints[0]) * @p_trapstackdistance * m_Threshold
     else
       d2 = m_Distances[0] + (m_Iterations-m_IterationPoints[0]) * @p_trapstackdistance * m_Threshold
     endif
     if (pdistance < d2 && pdistance < m_Threshold)
       m_Distances[0] = pdistance
       m_Textures[0] = ptexture
       m_UntransformedPoints[0] = pz
       m_TransformedPoints[0] = pzt
       m_IterationPoints[0] = m_Iterations
       m_Solid = false
     endif
   endfunc
   
 default:
   title = "Stacked"
 
   int param v_dmj_trapmodestacked
     caption = "Version (DMJ_TrapModeStacked)"
     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_dmj_trapmodestacked < 100
   endparam
 
   int param p_trapstackorder
     caption = "Stack Order"
     default = 0
     enum = "top-down" "bottom-up"
     hint = "Sets the order in which traps are stacked. Top-down places earlier iterations above later iterations; bottom-up places later iterations above earlier iterations."
   endparam
   float param p_trapstackdistance
     caption = "Stack Distance"
     default = 0.25
     min = 0.0
     hint = "Amount trap distance varies with each iteration. Use this to adjust how close together traps appear and intertwine with each other."
   endparam
 }
 


Constructor Summary
DMJ_TrapModeStacked()
           
DMJ_TrapModeStacked(Generic pparent)
           
 
Method Summary
 void Init(complex pz)
          call this at the beginning of each sequence
 void Iterate(complex pz, complex pzt, float pdistance, float ptexture)
          call this for each point
 
Methods inherited from class common:TrapModeWithThreshold
GetThreshold, SetThreshold, UsesThreshold
 
Methods inherited from class common:TrapMode
GetDistance, GetIteration, GetTexture, GetTransformedPoint, GetUntransformedPoint, IsSolid, IterateSilent, Result
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

DMJ_TrapModeStacked

public DMJ_TrapModeStacked(Generic pparent)

DMJ_TrapModeStacked

public DMJ_TrapModeStacked()
Method Detail

Init

public void Init(complex pz)
Description copied from class: TrapMode
call this at the beginning of each sequence

Overrides:
Init in class TrapMode

Iterate

public void Iterate(complex pz,
                    complex pzt,
                    float pdistance,
                    float ptexture)
Description copied from class: TrapMode
call this for each point

Overrides:
Iterate in class TrapMode