|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Generic common:Transform common:UserTransform common:TransformMerge
class
This is a wrappoer transform which allows you to use multiple
transforms (up to 10) wherever a single transform is allowed.
If you need more than ten transforms, put a TransformMerge
object in one or more of the slots.
class TransformMerge(UserTransform) { ; This is a wrappoer transform which allows you to use multiple ; transforms (up to 10) wherever a single transform is allowed. ; If you need more than ten transforms, put a TransformMerge ; object in one or more of the slots. public: func TransformMerge(Generic pparent) UserTransform.UserTransform(pparent) m_Enables[0] = @p_transform1enable m_Enables[1] = @p_transform2enable m_Enables[2] = @p_transform3enable m_Enables[3] = @p_transform4enable m_Enables[4] = @p_transform5enable m_Enables[5] = @p_transform6enable m_Enables[6] = @p_transform7enable m_Enables[7] = @p_transform8enable m_Enables[8] = @p_transform9enable m_Enables[9] = @p_transform10enable m_Elements[0] = new @f_transform1(this) m_Elements[1] = new @f_transform2(this) m_Elements[2] = new @f_transform3(this) m_Elements[3] = new @f_transform4(this) m_Elements[4] = new @f_transform5(this) m_Elements[5] = new @f_transform6(this) m_Elements[6] = new @f_transform7(this) m_Elements[7] = new @f_transform8(this) m_Elements[8] = new @f_transform9(this) m_Elements[9] = new @f_transform10(this) endfunc func Init(complex pz) UserTransform.Init(pz) int j = 0 while (j < 10) if (m_Enables[j]) m_Elements[j].Init(pz) endif j = j + 1 endwhile endfunc complex func Iterate(complex pz) int j = 0 while (j < 10) if (m_Enables[j]) pz = m_Elements[j].Iterate(pz) endif j = j + 1 endwhile return pz endfunc func IterateSilent() int j = 0 while (j < 10) if (m_Enables[j]) m_Elements[j].IterateSilent() endif j = j + 1 endwhile endfunc bool func IsSolid() int j = 0 while (j < 10) if (m_Enables[j]) if (m_Elements[j].IsSolid()) return true endif endif j = j + 1 endwhile return false endfunc protected: bool m_Enables[10] UserTransform m_Elements[10] default: title = "Transform Merge" int param v_transformmerge caption = "Version (TransformMerge)" 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_transformmerge < 100 endparam bool param p_showempty caption = "Show all slots" default = true hint = "Sets whether all slots should be shown, even if they are empty or disabled. By unchecking this box, you can quickly hide any transform slots that are empty or that you've disabled. Check the box again to show them." endparam bool param p_transform1enable caption = "Enable Transform 1" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform1 != NullTransform) endparam UserTransform param f_transform1 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform1 != NullTransform && @p_transform1enable) || @p_showempty) endparam bool param p_transform2enable caption = "Enable Transform 2" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform2 != NullTransform) endparam UserTransform param f_transform2 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform2 != NullTransform && @p_transform2enable) || @p_showempty) endparam bool param p_transform3enable caption = "Enable Transform 3" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform3 != NullTransform) endparam UserTransform param f_transform3 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform3 != NullTransform && @p_transform3enable) || @p_showempty) endparam bool param p_transform4enable caption = "Enable Transform 4" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform4 != NullTransform) endparam UserTransform param f_transform4 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform4 != NullTransform && @p_transform4enable) || @p_showempty) endparam bool param p_transform5enable caption = "Enable Transform 5" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform5 != NullTransform) endparam UserTransform param f_transform5 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform5 != NullTransform && @p_transform5enable) || @p_showempty) endparam bool param p_transform6enable caption = "Enable Transform 6" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform6 != NullTransform) endparam UserTransform param f_transform6 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform6 != NullTransform && @p_transform6enable) || @p_showempty) endparam bool param p_transform7enable caption = "Enable Transform 7" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform7 != NullTransform) endparam UserTransform param f_transform7 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform7 != NullTransform && @p_transform7enable) || @p_showempty) endparam bool param p_transform8enable caption = "Enable Transform 8" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform8 != NullTransform) endparam UserTransform param f_transform8 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform8 != NullTransform && @p_transform8enable) || @p_showempty) endparam bool param p_transform9enable caption = "Enable Transform 9" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform9 != NullTransform) endparam UserTransform param f_transform9 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform9 != NullTransform && @p_transform9enable) || @p_showempty) endparam bool param p_transform10enable caption = "Enable Transform 10" default = true hint = "Enables this transform. You can use this to temporarily disable a transform without unloading its parameters." visible = (@f_transform10 != NullTransform) endparam UserTransform param f_transform10 caption = "Transform" default = NullTransform hint = "Sets the transform for this slot. You can make a slot empty again by loading the NullTransform class into it." visible = ((@f_transform10 != NullTransform && @p_transform10enable) || @p_showempty) endparam }
Constructor Summary | |
---|---|
TransformMerge()
|
|
TransformMerge(Generic pparent)
|
Method Summary | |
---|---|
void |
Init(complex pz)
Set up for a sequence of values |
boolean |
IsSolid()
Test whether a sequence is solid-colored or not. |
complex |
Iterate(complex pz)
Transform a single point within a sequence |
void |
IterateSilent()
Update internal counters without transforming a point |
Methods inherited from class common:Generic |
---|
GetParent |
Methods inherited from class Object |
---|
|
Constructor Detail |
---|
public TransformMerge(Generic pparent)
public TransformMerge()
Method Detail |
---|
public void Init(complex pz)
Transform
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.
Init
in class Transform
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.public complex Iterate(complex pz)
Transform
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.
Iterate
in class Transform
pz
- the complex value to be transformed
public void IterateSilent()
Transform
For some Transform classes, the actual transformation being performed changes for each value in the sequence (e.g. TrapTransform, which can rotate each iteration by a different amount). In some cases the calling code may determine in advance that a particular point does not need to be transformed (perhaps because it is not being used) but it still needs to be accounted for. This function is used in place of Iterate() for those situations; the Transform should update any internal state that changes between iterations within a sequence. Since no value is being transformed, no parameters are passed and no return value is provided.
IterateSilent
in class Transform
public boolean IsSolid()
Transform
This function takes the place of the #solid flag in a native UF transformation formula. Since this is an object which may be used in a context other than a transformation formula, #solid may not be available to us. Instead, Iterate() should set an internal flag m_Solid and the calling code should use IsSolid() to test the value of this flag. For some Transform classes this test may be very involved, which is why it is available as a function rather than simply giving the calling code access to the m_Solid variable directly.
IsSolid
in class Transform
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |