dmj5
Class DMJ_TrapModeSignAverage
Object
common:Generic
common:TrapMode
dmj5:DMJ_TrapModeSignAverage
class
- TrapMode:DMJ_TrapModeSignAverage
Ultra Fractal Source
Toggle UF Source Code Display
class DMJ_TrapModeSignAverage(common.ulb:TrapMode) {
public:
import "common.ulb"
func DMJ_TrapModeSignAverage(Generic pparent)
TrapMode.TrapMode(pparent)
endfunc
func Init(complex pz)
TrapMode.Init(pz)
m_Solid = true
m_PreviousDistance = 0
endfunc
func Iterate(complex pz, complex pzt, float pdistance, float ptexture)
TrapMode.Iterate(pz, pzt, pdistance, ptexture)
if (pdistance < m_PreviousDistance)
m_Distances[0] = m_Distances[0] + 1
m_Textures[0] = m_Textures[0] + ptexture
m_UntransformedPoints[0] = m_UntransformedPoints[0] + pz
m_TransformedPoints[0] = m_TransformedPoints[0] + pzt
m_IterationPoints[0] = m_IterationPoints[0] + 1
m_Solid = false
else
m_IterationPoints[0] = m_IterationPoints[0] - 1
endif
m_PreviousDistance = pdistance
endfunc
func Result()
float ii = 1.0 / m_Iterations
m_Distances[0] = m_Distances[0] * ii
m_Textures[0] = m_Textures[0] * ii
m_UntransformedPoints[0] = m_UntransformedPoints[0] * ii
m_TransformedPoints[0] = m_TransformedPoints[0] * ii
endfunc
protected:
float m_PreviousDistance
default:
title = "Sign Average"
int param v_dmj_trapmodesignaverage
caption = "Version (DMJ_TrapModeSignAverage)"
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_dmj_trapmodesignaverage < 100
endparam
}
Method Summary |
void |
Init(complex pz)
call this at the beginning of each sequence |
void |
Iterate(complex pz,
complex pzt,
float pdistance,
float ptexture)
call this for each point |
void |
Result()
call this to compute final results |
Methods inherited from class Object |
|
DMJ_TrapModeSignAverage
public DMJ_TrapModeSignAverage(Generic pparent)
DMJ_TrapModeSignAverage
public DMJ_TrapModeSignAverage()
Init
public void Init(complex pz)
- Description copied from class:
TrapMode
- call this at the beginning of each sequence
- Overrides:
Init
in class TrapMode
Iterate
public void Iterate(complex pz,
complex pzt,
float pdistance,
float ptexture)
- Description copied from class:
TrapMode
- call this for each point
- Overrides:
Iterate
in class TrapMode
Result
public void Result()
- Description copied from class:
TrapMode
- call this to compute final results
- Overrides:
Result
in class TrapMode