mt
Class MT_TextureBlock

Object
  extended by common:Generic
      extended by common:TrapShape
          extended by mt:MT_TextureBlock

class 
TrapShape:MT_TextureBlock

From TrapShapeBlock in common.ulb


Ultra Fractal Source

Toggle UF Source Code Display

 class MT_TextureBlock(common.ulb:TrapShape) {
 ;
 ; From TrapShapeBlock in common.ulb
 ;
 public:
   import "mt.ulb"
   func MT_TextureBlock(Generic pparent)
     TrapShape.TrapShape(pparent)
 
     m_TextureTransform = new @f_texturetransform(this)
     m_Texture = new @f_texture(this)
     m_TextureTransfer = new @f_texturetransfer(this)
   endfunc
 
   func Init(complex pz)
     TrapShape.Init(pz)
     
     m_TextureTransform.Init(pz)
     m_Texture.Init(pz)
     m_TextureTransfer.Init(pz)
   endfunc
 
   float func Iterate(complex pz)
     complex zt = m_TextureTransform.Iterate(pz)
     float distance = m_Texture.Iterate(zt)
     distance = m_TextureTransfer.Iterate(distance)
     return distance
   endfunc
   
   complex func GetTransformedPoint()
     return m_Texture.GetTransformedPoint()
   endfunc
 
   float func GetTextureValue()
     return m_Texture.GetTextureValue()
   endfunc
   
 protected:
   UserTransform m_TextureTransform
   TrapShape m_Texture
   Transfer m_TextureTransfer
 
 default:
   title = "Texture Block"
   UserTransform param f_Texturetransform
     caption = "Texture Position"
     default = MT_TextureTransform
     expanded = false
   endparam
   TrapShape param f_texture
     caption = "Texture"
     default = MT_PerlinNoiseTexture
   endparam
   Transfer param f_texturetransfer
     caption = "Texture Transfer"
     default = NullTransfer
   endparam
 }
 


Constructor Summary
MT_TextureBlock()
           
MT_TextureBlock(Generic pparent)
           
 
Method Summary
 float GetTextureValue()
          Get texture value.
 complex GetTransformedPoint()
          Get transformed point.
 void Init(complex pz)
          call this before each sequence of values to be trapped
 float Iterate(complex pz)
          call this for each iteration being trapped
 
Methods inherited from class common:TrapShape
GetColorChannel, IterateSilent, SetThreshold
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

MT_TextureBlock

public MT_TextureBlock(Generic pparent)

MT_TextureBlock

public MT_TextureBlock()
Method Detail

Init

public void Init(complex pz)
Description copied from class: TrapShape
call this before each sequence of values to be trapped

Overrides:
Init in class TrapShape

Iterate

public float Iterate(complex pz)
Description copied from class: TrapShape
call this for each iteration being trapped

Overrides:
Iterate in class TrapShape

GetTransformedPoint

public complex GetTransformedPoint()
Description copied from class: TrapShape
Get transformed point.

Some trap modes and trap coloring modes require access to the "transformed" point. This is the final point that is actually used by the trap shape class to test against the trap. For most trap shape classes this will be exactly the same as the pz passed into Iterate(), and those classes can use this base class functionality. However, some trap shape classes (e.g. TrapShapeMerge, TrapShapeBlock) perform some internal transformations on pz before passing it to the trap shape; this gives them the opportunity to call their trap shape's function to get the final transformed point.

Overrides:
GetTransformedPoint in class TrapShape
Returns:
the last transformed point used (i.e. call GetTransformedPoint() after calling Iterate(), not before)

GetTextureValue

public float GetTextureValue()
Description copied from class: TrapShape
Get texture value.

Ordinarily, a trap shape does not have a native texture (it is flat). Some formulas may pair trap shapes with trap textures, and may need more information about trap textures when trap shapes are nested via TrapShapeMerge. This function provides support for accessing texture information.

Overrides:
GetTextureValue in class TrapShape
Returns:
the texture value for the last point used (i.e. call GetTextureValue() after calling Iterate(), not before)