mmf
Class MMF_TrapModeSmoothNth

Object
  extended by common:Generic
      extended by common:TrapMode
          extended by common:TrapModeWithThreshold
              extended by mmf:MMF_TrapModeSmoothWithThreshold
                  extended by mmf:MMF_TrapModeSmoothNth

class 
MMF_TrapModeSmoothWithThreshold:MMF_TrapModeSmoothNth

This trap mode traps to the nth trapped point that is within the threshold.


Ultra Fractal Source

Toggle UF Source Code Display

 class MMF_TrapModeSmoothNth(MMF_TrapModeSmoothWithThreshold) {
 ; This trap mode traps to the nth trapped point that is within the
 ; threshold.<br>
 public:
   import "common.ulb"
 
   func MMF_TrapModeSmoothNth(Generic pparent)
     MMF_TrapModeSmoothWithThreshold.MMF_TrapModeSmoothWithThreshold(pparent)
   endfunc
   
   func Init(complex pz)
     MMF_TrapModeSmoothWithThreshold.Init(pz)
     m_Solid = true
     m_count = @p_count
   endfunc
   
   func Iterate(complex pz, complex pzt, float pdistance, float ptexture)
     MMF_TrapModeSmoothWithThreshold.Iterate(pz, pzt, pdistance, ptexture)
     if (pdistance < m_Threshold && m_count>0)
       m_Distances[0] = pdistance
       m_Textures[0] = ptexture
       m_UntransformedPoints[0] = pz
       m_TransformedPoints[0] = pzt
        m_IterationPoints[0] = m_Iterations
        m_Solid = false
       m_wastrapped = true
       m_count = m_count - 1
     endif
   endfunc
   
 private:
   int m_count
 
 default:
   title = "Smooth First N"
   rating = recommended
   int param p_count
     caption = "Trap Count, N"
     default = 1
     min = 1
     hint = "The algorithm will stop trapping after trapping this many \
             values. Colouring will be from the last values trapped \
             even if less than this many traps occurred."
   endparam
 }
 


Constructor Summary
MMF_TrapModeSmoothNth()
           
MMF_TrapModeSmoothNth(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 mmf:MMF_TrapModeSmoothWithThreshold
IterateSilent, OldResult
 
Methods inherited from class common:TrapModeWithThreshold
GetThreshold, SetThreshold, UsesThreshold
 
Methods inherited from class common:TrapMode
GetDistance, GetIteration, GetTexture, GetTransformedPoint, GetUntransformedPoint, IsSolid, Result
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

MMF_TrapModeSmoothNth

public MMF_TrapModeSmoothNth(Generic pparent)

MMF_TrapModeSmoothNth

public MMF_TrapModeSmoothNth()
Method Detail

Init

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

Overrides:
Init in class MMF_TrapModeSmoothWithThreshold
Parameters:
pz - the initial z value

Iterate

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

Note that derived functions should always copy all used parameters to the "old" versions when they are changed as here.

m_wastrapped should be set to true in the derived function when the main (current) values get changed

Overrides:
Iterate in class MMF_TrapModeSmoothWithThreshold
Parameters:
pz - the z value
pzt - the transformed z value
pdistance - the trap distance
ptexture - tyhe texture value