|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectcommon:Generic
common:TrapShape
mmf:MMF_TrapShapeZold
class
This is a base class specifically for Trap Shapes that require
old values of z.
class MMF_TrapShapeZold(common.ulb:TrapShape) {
; This is a base class specifically for Trap Shapes that require
; old values of z.<br>
public:
import "common.ulb"
; @param pparent the parent, generally "this" for the parent, or zero
func MMF_TrapShapeZold(Generic pparent)
TrapShape.TrapShape(pparent)
endfunc
; call this before each sequence of values to be trapped<br>
; @param pz the initial z value
func Init(complex pz)
m_Iterations = 0
m_LastZ = m_zold = m_zolder = pz
m_zoldok = m_zolderok = false
endfunc
; call this for each iteration being trapped<p>
; It's up to the derived function to copy zold to zolder and
; pz to zold after using the values of zolder, zold and pz
; (without modifying them obviously).<p>
; And to (finally) copy zoldok to zolderok and set zoldok to true.<p>
; Note that if there's no result (due to no zold or zolder) then
; the function could return +infinity as the value to ensure the
; value is outside any threshold.<br>
; @param pz the z value
; @return trap distance
float func Iterate(complex pz)
m_Iterations = m_Iterations + 1
m_LastZ = pz
return real(pz)
endfunc
; Update internal counters without transforming a value<br>
; Flag for "got old z values" set to false<br>
func IterateSilent()
m_zoldok = m_zolderok = false
m_Iterations = m_Iterations + 1
endfunc
; Update internal counters without transforming a value<br>
; Keep updating old z values<br>
; @param pz the z value
func IterateSilentZold(complex pz)
m_zolder = m_zold
m_zold = pz
m_zolderok = m_zoldok
m_zoldok = true
m_Iterations = m_Iterations + 1
endfunc
protected:
complex m_zold
complex m_zolder
bool m_zoldok
bool m_zolderok
default:
int param v_mmftrapshapezold
caption = "Version (MMF TrapShapeZold)"
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_mmftrapshapezold < 100
endparam
}
| Constructor Summary | |
|---|---|
MMF_TrapShapeZold()
|
|
MMF_TrapShapeZold(Generic pparent)
|
|
| Method Summary | |
|---|---|
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 |
void |
IterateSilent()
Update internal counters without transforming a value Flag for "got old z values" set to false |
void |
IterateSilentZold(complex pz)
Update internal counters without transforming a value Keep updating old z values |
| Methods inherited from class common:TrapShape |
|---|
GetColorChannel, GetTextureValue, GetTransformedPoint, SetThreshold |
| Methods inherited from class common:Generic |
|---|
GetParent |
| Methods inherited from class Object |
|---|
|
| Constructor Detail |
|---|
public MMF_TrapShapeZold(Generic pparent)
pparent - the parent, generally "this" for the parent, or zeropublic MMF_TrapShapeZold()
| Method Detail |
|---|
public void Init(complex pz)
Init in class TrapShapepz - the initial z valuepublic float Iterate(complex pz)
It's up to the derived function to copy zold to zolder and pz to zold after using the values of zolder, zold and pz (without modifying them obviously).
And to (finally) copy zoldok to zolderok and set zoldok to true.
Note that if there's no result (due to no zold or zolder) then
the function could return +infinity as the value to ensure the
value is outside any threshold.
Iterate in class TrapShapepz - the z value
public void IterateSilent()
IterateSilent in class TrapShapepublic void IterateSilentZold(complex pz)
pz - the z value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||