Standard
Class Standard_TrapModeAverage

Object
  extended by common:Generic
      extended by common:TrapMode
          extended by common:TrapModeWithThreshold
              extended by Standard:Standard_TrapModeBase
                  extended by Standard:Standard_TrapModeAverage

class 
Standard_TrapModeBase:Standard_TrapModeAverage



Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_TrapModeAverage(Standard_TrapModeBase) {
 public:
   func Init(complex pz)
     Standard_TrapModeBase.Init(pz)
     fTrapCount = 0
   endfunc
 
   func Iterate(complex pz, complex pzt, float pdistance, float ptexture)
     Standard_TrapModeBase.Iterate(pz, pzt, pdistance, ptexture)
     if pdistance < m_Threshold
       SetTrapInfo(0, m_UntransformedPoints[0] + pz, \
         m_TransformedPoints[0] + pzt, m_Distances[0] + pdistance)
       fTrapCount = fTrapCount + 1
       m_Solid = false
     endif
   endfunc
 
   func Result()
     ; Like the original, this doesn't test whether fTrapCount is 0.
     m_UntransformedPoints[0] = m_UntransformedPoints[0] / fTrapCount
     m_TransformedPoints[0] = m_TransformedPoints[0] / fTrapCount
     m_Distances[0] = m_Distances[0] / fTrapCount
   endfunc
 
 private:
   int fTrapCount
 
 default:
   title = "Average"
 }
 


Constructor Summary
Standard_TrapModeAverage()
           
 
Method Summary
 void Init(complex pz)
          Calls the inherited Init() and also sets m_Solid to true because this is the initial condition for most trap modes.
 void Iterate(complex pz, complex pzt, float pdistance, float ptexture)
          call this for each point
 void Result()
          call this to compute final results
 
Methods inherited from class Standard:Standard_TrapModeBase
SetTrapInfo
 
Methods inherited from class common:TrapModeWithThreshold
GetThreshold, SetThreshold, UsesThreshold
 
Methods inherited from class common:TrapMode
GetDistance, GetIteration, GetTexture, GetTransformedPoint, GetUntransformedPoint, IsSolid, IterateSilent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

Standard_TrapModeAverage

public Standard_TrapModeAverage()
Method Detail

Init

public void Init(complex pz)
Description copied from class: Standard_TrapModeBase
Calls the inherited Init() and also sets m_Solid to true because this is the initial condition for most trap modes.

Overrides:
Init in class Standard_TrapModeBase

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

Result

public void Result()
Description copied from class: TrapMode
call this to compute final results

Overrides:
Result in class TrapMode