mmf
Class MMF_TrapModeSmoothChangeAverage

Object
  extended by common:Generic
      extended by common:TrapMode
          extended by mmf:MMF_TrapModeSmooth
              extended by mmf:MMF_TrapModeSmoothChangeAverage

class 
MMF_TrapModeSmooth:MMF_TrapModeSmoothChangeAverage

Total differences in distance within threshold.


Ultra Fractal Source

Toggle UF Source Code Display

 class MMF_TrapModeSmoothChangeAverage(MMF_TrapModeSmooth) {
 ; Total differences in distance within threshold.<br>
 public:
   import "common.ulb"
 
   func MMF_TrapModeSmoothChangeAverage(Generic pparent)
     MMF_TrapModeSmooth.MMF_TrapModeSmooth(pparent)
   endfunc
   
   func Init(complex pz)
     MMF_TrapModeSmooth.Init(pz)
     m_Solid = true
     m_PreviousDistance = 0.0
     m_PreviousTexture = 0.0
   endfunc
   
   func Iterate(complex pz, complex pzt, float pdistance, float ptexture)
     MMF_TrapModeSmooth.Iterate(pz, pzt, pdistance, ptexture)
     
     if (pdistance < m_PreviousDistance)
       m_Distances[0] = m_Distances[0] + m_PreviousDistance-pdistance
       m_Textures[0] = m_Textures[0] + m_PreviousTexture-ptexture
       m_UntransformedPoints[0] = m_UntransformedPoints[0] + pz
       m_TransformedPoints[0] = m_TransformedPoints[0] + pzt
       m_IterationPoints[0] = m_IterationPoints[0] + 1
       m_Solid = false
       m_wastrapped = true
     endif
     m_PreviousDistance = pdistance
     m_PreviousTexture = ptexture
   endfunc
 
 protected:
   float m_PreviousDistance
   float m_PreviousTexture
   
 default:
   title = "Smooth Change Average"
 }
 


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

Constructor Detail

MMF_TrapModeSmoothChangeAverage

public MMF_TrapModeSmoothChangeAverage(Generic pparent)

MMF_TrapModeSmoothChangeAverage

public MMF_TrapModeSmoothChangeAverage()
Method Detail

Init

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

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

Iterate

public void Iterate(complex pz,
                    complex pzt,
                    float pdistance,
                    float ptexture)
Description copied from class: MMF_TrapModeSmooth
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_TrapModeSmooth
Parameters:
pz - the z value
pzt - the transformed z value
pdistance - the trap distance
ptexture - tyhe texture value