reb
Class REB_LowPassFilter

Object
  extended by common:Generic
      extended by dmj5:DMJ_ConvolutionFilter
          extended by reb:REB_LowPassFilter

class 
DMJ_ConvolutionFilter:REB_LowPassFilter

Quick Filter that attenuates high frequency content


Ultra Fractal Source

Toggle UF Source Code Display

 class REB_LowPassFilter(dmj5.ulb:DMJ_ConvolutionFilter) {
   ; Quick Filter that attenuates high frequency content
     
 public:
   import "common.ulb"
   import "dmj5.ulb"
   
   ; contructor
   func REB_LowPassFilter(Generic pparent)
     DMJ_ConvolutionFilter.DMJ_ConvolutionFilter(pparent)
     
     int count = 3
     int elements = sqr(count)
     setLength(m_Offsets, elements)
     setLength(m_Weights, elements)
     m_Multiplier = 0.0
 
     int j = -1
     int k = 0
     int l = 0
     while j <= 1
       k = -1
       while (k <= 1)
         m_Offsets[l] = (@p_radius*j + flip(@p_radius*k))/100
         if @option == "Filter 1"
           m_Weights[l] = 1/9
         elseif @option == "Filter 2"
           m_Weights[l] = 1/10
           if j == 0 && k == 0
             m_weights[l] = 0.2
           endif
         elseif @option == "Filter 3"
           m_Weights[l] = 1/16
           if j == 0 && k == 0
             m_Weights[l] = 1/4
           elseif j == 0 || k == 0
             m_weights[l] = 1/8
           endif
         endif
         l = l + 1
         k = k + 1
       endwhile
       j = j + 1
     endwhile
     m_Multiplier = 1
   endfunc
   
 default:
   title = "Quick Low Pass Filter"
   heading
     text = "Quick filter that attenuates high frequency color information."
   endheading
   int param v_lowpass
     caption = "Version (Low Pass Filter)"
     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_lowpass < 100
   endparam
   float param p_radius
     caption = "Filter Radius"
     default = 0.1
   endparam
   param option
     caption = "Options"
     default = 0
     enum = "Filter 1" "Filter 2" "Filter 3"
   endparam
 }
 


Constructor Summary
REB_LowPassFilter()
           
REB_LowPassFilter(Generic pparent)
          contructor
 
Method Summary
 
Methods inherited from class dmj5:DMJ_ConvolutionFilter
Init
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

REB_LowPassFilter

public REB_LowPassFilter(Generic pparent)
contructor


REB_LowPassFilter

public REB_LowPassFilter()