Standard
Class Standard_ColorTrapWrapper
Object
common:Generic
common:ColorTrap
Standard:Standard_ColorTrapWrapper
class
- ColorTrap:Standard_ColorTrapWrapper
Reproduces the options in Direct Orbit Traps in Standard.ucl.
Ultra Fractal Source
Toggle UF Source Code Display
class Standard_ColorTrapWrapper(common.ulb:ColorTrap) {
; Reproduces the options in Direct Orbit Traps in Standard.ucl.
public:
func Standard_ColorTrapWrapper(Generic pparent)
ColorTrap(pparent)
fShape = new @shape(this)
fColoring = new @coloring(this)
fGradient = new @gradient(this)
fMode = new Standard_TrapModeFirst(this)
fMode.SetThreshold(@threshold)
endfunc
func Init(complex pz)
fShape.Init(pz)
endfunc
color func Iterate(complex pz)
float distance = fShape.Iterate(pz)
fMode.Init(pz)
fMode.Iterate(pz, pz, distance, 0) ; No texture support here
if fMode.IsSolid()
return rgba(0, 0, 0, 0)
else
float index = fColoring.Result(fMode)
color current = fGradient.GetColor(index)
if @mergemodifier == "Distance"
current = rgba(red(current), green(current), blue(current), \
alpha(current) * (1 - distance / @threshold))
endif
return current
endif
endfunc
private:
TrapColoring fColoring
GradientWrapper fGradient
TrapModeWithThreshold fMode
TrapShape fShape
default:
title = "Trap Shape Wrapper"
TrapShape param shape
caption = "Trap Shape"
default = Standard_TrapShapePoint
hint = "Selects the shape of the orbit trap."
endparam
float param threshold
caption = "Trap Threshold"
default = 0.25
hint = "This is the overall size or thickness of the trap area."
endparam
TrapColoring param coloring
caption = "Trap Coloring"
default = Standard_TrapColoringDistance
hint = "Selects what information is used to produce an index into the \
gradient selected below."
endparam
GradientWrapper param gradient
caption = "Gradient"
default = DefaultGradient
hint = "Selects the colors to be used when converting the index returned \
by the trap coloring to a color. This defaults to the gradient \
of the current layer, but you could also select an object that \
creates its own synthesized gradient."
endparam
param mergemodifier
caption = "Additional Alpha"
default = 0
enum = "None" "Distance"
hint = "Specifies an additional alpha value to incorporate during merging."
endparam
}
Method Summary |
void |
Init(complex pz)
call this before each sequence of values to be trapped |
color |
Iterate(complex pz)
call this to produce a result
you should always override this function |
Methods inherited from class Object |
|
Standard_ColorTrapWrapper
public Standard_ColorTrapWrapper(Generic pparent)
Standard_ColorTrapWrapper
public Standard_ColorTrapWrapper()
Init
public void Init(complex pz)
- Description copied from class:
ColorTrap
- call this before each sequence of values to be trapped
- Overrides:
Init
in class ColorTrap
Iterate
public color Iterate(complex pz)
- Description copied from class:
ColorTrap
- call this to produce a result
you should always override this function
- Overrides:
Iterate
in class ColorTrap