mt
Class MT_TextureTransform
Object
common:Generic
common:Transform
common:UserTransform
mt:MT_TextureTransform
class
- UserTransform:MT_TextureTransform
From TrapTransform in common.ulb
Ultra Fractal Source
Toggle UF Source Code Display
class MT_TextureTransform(common.ulb:UserTransform) {
;
; From TrapTransform in common.ulb
;
public:
func MT_TextureTransform(Generic pparent)
UserTransform.UserTransform(pparent)
endfunc
func Init(complex pz)
UserTransform.Init(pz)
m_Rotation = (0,1) ^ (@p_texturerotation / 90.0)
m_Skew = (0,1) ^ (@p_textureskew / 90.0)
m_TextureCenter = @p_texturecenter
endfunc
complex func Iterate(complex pz)
; apply offset and rotation and size
pz = (pz - m_TextureCenter) * m_Rotation * recip(@p_texturescale)
; apply aspect
if (@p_textureaspect != 1.0)
pz = real(pz) + flip(imag(pz) * @p_textureaspect)
endif
; apply skew
pz = real(pz * m_Skew) + flip(imag(pz))
return pz
endfunc
protected:
complex m_Rotation
complex m_Skew
complex m_TextureCenter
default:
title = "Texture Position"
complex param p_texturecenter
caption = "Center"
default = (0,0)
hint = "This is the location of the texture in the complex plane."
endparam
float param p_texturescale
caption = "Scale"
default = 1.0
hint = "This can be used to resize the texture. "
endparam
float param p_texturerotation
caption = "Rotation"
default = 0.0
hint = "This is the angle, in degrees, that the texture should be rotated."
endparam
float param p_textureskew
caption = "Skew"
default = 0.0
hint = "This is the angle, in degrees, to skew the vertical axis of the texture."
endparam
float param p_textureaspect
caption = "Aspect Ratio"
default = 1.0
hint = "This is how square the texture is. You can distort the texture by using a value other than 1.0."
endparam
}
Methods inherited from class Object |
|
MT_TextureTransform
public MT_TextureTransform(Generic pparent)
MT_TextureTransform
public MT_TextureTransform()
Init
public void Init(complex pz)
- Description copied from class:
Transform
- 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). It will be called even if only one value is being
transformed (e.g. a normal transformation formula). Use
this to perform any setup that is exactly the same for
each value in the sequence being transformed.
- Overrides:
Init
in class Transform
- Parameters:
pz
- the value representing the sequence; for a normal transformation formula use, this will be #pixel. In some cases this may differ from the first value passed to Iterate() if the calling code applies some other transformations.
Iterate
public complex Iterate(complex pz)
- Description copied from class:
Transform
- Transform a single point within a sequence
After a sequence has been set up with Init(), this function
will be called once for each value in the sequence. Note
that all values in the sequence must be processed in order
(they cannot be processed out of order). If the sequence
contains only one value, Init() will still be called and
then Iterate() will be called just once.
- Overrides:
Iterate
in class Transform
- Parameters:
pz
- the complex value to be transformed
- Returns:
- the transformed value