reb
Class ImageTrapColoringDistance
Object
common:Generic
reb:ImageTrapColoring
reb:ImageTrapColoringDistance
class
- ImageTrapColoring:ImageTrapColoringDistance
Returns a trap distance which has been weighted by a texture
The inherited function CResult() returns a color from a ColorTrap class
if one is being used.
Ultra Fractal Source
Toggle UF Source Code Display
class ImageTrapColoringDistance(ImageTrapColoring) {
; Returns a trap distance which has been weighted by a texture <br>
; <p>
; The inherited function CResult() returns a color from a ColorTrap class
; if one is being used.
public:
import "common.ulb"
; constructor
func ImageTrapColoringDistance(Generic pparent)
ImageTrapColoring.ImageTrapColoring(pparent)
endfunc
; use in the Result section of a direct coloring formula.
float func Result(ImageTrapMode ptrapmode)
ImageTrapColoring.Result(ptrapmode)
if (@p_autoscale)
return (ptrapmode.GetDistance(0) + ptrapmode.GetTexture(0)) / ptrapmode.GetThreshold()
else
return ptrapmode.GetDistance(0) + ptrapmode.GetTexture(0)
endif
endfunc
default:
title = "Distance"
int param v_distance
caption = "Version (Distance)"
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_distance < 100
endparam
bool param p_autoscale
caption = "Auto-scale Coloring"
default = true
hint = "If checked, coloring will be automatically scaled to match the trap threshold."
endparam
}
Method Summary |
float |
Result(ImageTrapMode ptrapmode)
use in the Result section of a direct coloring formula. |
Methods inherited from class Object |
|
ImageTrapColoringDistance
public ImageTrapColoringDistance(Generic pparent)
- constructor
ImageTrapColoringDistance
public ImageTrapColoringDistance()
Result
public float Result(ImageTrapMode ptrapmode)
- use in the Result section of a direct coloring formula.
- Overrides:
Result
in class ImageTrapColoring