mt
Class MT_TextureColoring

Object
  extended by common:Generic
      extended by common:Coloring
          extended by common:GradientColoring
              extended by mt:MT_TextureColoring

class 
GradientColoring:MT_TextureColoring

Mark Townsend, May 2008


Ultra Fractal Source

Toggle UF Source Code Display

 class MT_TextureColoring(common.ulb:GradientColoring) {
 ;
 ; Mark Townsend, May 2008
 ;
 public:
   func MT_TextureColoring(Generic pparent)
     GradientColoring(pparent)
     fTexture = new @p_texture(this)
   endfunc
   
   func Init(complex pz, complex ppixel)
     GradientColoring.Init(pz, ppixel)
     fTexture.Init(pz)
   endfunc
 
   float func ResultIndex(complex pz)
     return fTexture.Iterate(pz)
   endfunc
 
 private:
   TrapShape fTexture
 
 default:
   title = "Texture"
   TrapShape param p_texture
     caption = "Texture"
     default = MT_PerlinNoiseTexture
   endparam
 }
 


Constructor Summary
MT_TextureColoring()
           
MT_TextureColoring(Generic pparent)
           
 
Method Summary
 void Init(complex pz, complex ppixel)
          Set up for a sequence of values
 float ResultIndex(complex pz)
          Produce a resulting color index after a sequence is finished
 
Methods inherited from class common:GradientColoring
IsGradient, IsSolid, Iterate, Result
 
Methods inherited from class common:Coloring
GetPixel
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

MT_TextureColoring

public MT_TextureColoring(Generic pparent)

MT_TextureColoring

public MT_TextureColoring()
Method Detail

Init

public void Init(complex pz,
                 complex ppixel)
Description copied from class: GradientColoring
Set up for a sequence of values

This function will be called at the beginning of each sequence of values (e.g. at the beginning of each fractal orbit).

Overrides:
Init in class GradientColoring
Parameters:
pz - first value for the sequence; for a normal coloring formula, this will be #z
ppixel - seed value for the sequence; for a normal coloring formula, this will be #pixel

ResultIndex

public float ResultIndex(complex pz)
Description copied from class: GradientColoring
Produce a resulting color index after a sequence is finished

This corresponds to the final: section in a coloring formula. Once it is called, no further calls to Iterate() should be made without calling Init() first.

Overrides:
ResultIndex in class GradientColoring
Returns:
the gradient index (corresponding to #index in a coloring formula)