reb
Class ImageTrapModeChangeAverage

Object
  extended by common:Generic
      extended by reb:ImageTrapMode
          extended by reb:ImageTrapModeWithThreshold
              extended by reb:ImageTrapModeChangeAverage

class 
ImageTrapModeWithThreshold:ImageTrapModeChangeAverage

trap mode average variant based upon a class of Damien Jones


Ultra Fractal Source

Toggle UF Source Code Display

 class ImageTrapModeChangeAverage(ImageTrapModeWithThreshold) {
 ; trap mode average variant based upon a class of Damien Jones
 public:
   import "common.ulb"
 
   func DImageTrapModeChangeAverage(Generic pparent)
     ImageTrapModeWithThreshold.ImageTrapModeWithThreshold(pparent)
   endfunc
   
   func Init(complex pz)
     ImageTrapModeWithThreshold.Init(pz)
     m_Solid = true
     m_PreviousDistance = 0
     m_PreviousTexture = 0
   endfunc
   
   func Iterate(complex pz, complex pzt, float pdistance, float ptexture, color pcolor)
     ImageTrapModeWithThreshold.Iterate(pz, pzt, pdistance, ptexture, pcolor)
     m_a = alpha(pcolor)
     if (pdistance < m_PreviousDistance && m_a >= m_AThreshold)
       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_ImagePoints[0] = pcolor
       edgefade(pdistance)
     endif
     m_PreviousDistance = pdistance
     m_previousTexture = ptexture
   endfunc
 
 protected:
   float m_PreviousDistance
   float m_PreviousTexture
   
 default:
   title = "Change Average"
 
   int param v_trapmodechangeaverage
     caption = "Version (TrapMode Change Average)"
     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_trapmodechangeaverage < 100
   endparam
 }
 


Constructor Summary
ImageTrapModeChangeAverage()
           
 
Method Summary
 void DImageTrapModeChangeAverage(Generic pparent)
           
 void Init(complex pz)
          call this at the beginning of each sequence
 void Iterate(complex pz, complex pzt, float pdistance, float ptexture, color pcolor)
          call this for each point
 
Methods inherited from class reb:ImageTrapModeWithThreshold
EdgeFade, GetAThreshold, GetThreshold, SetAThreshold, SetThreshold, UsesAThreshold, UsesThreshold
 
Methods inherited from class reb:ImageTrapMode
GetColor, GetDistance, GetIteration, GetTexture, GetTransformedPoint, GetUntransformedPoint, IsSolid, IterateSilent, Result
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

ImageTrapModeChangeAverage

public ImageTrapModeChangeAverage()
Method Detail

DImageTrapModeChangeAverage

public void DImageTrapModeChangeAverage(Generic pparent)

Init

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

Overrides:
Init in class ImageTrapMode

Iterate

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

Overrides:
Iterate in class ImageTrapMode