|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectcommon:Generic
common:TrapShape
kcc5:KCC_PlaneCurveTrapBase
class
This is the base class for the Plane Curve Traps.
All of the Plane Curve Trap types will derive from
this class.
class KCC_PlaneCurveTrapBase( common.ulb:TrapShape ) {
; This is the base class for the Plane Curve Traps.
; All of the Plane Curve Trap types will derive from
; this class.
;
public:
import "common.ulb"
; constructor
func KCC_PlaneCurveTrapBase( Generic pparent )
TrapShape.TrapShape( pparent )
endfunc
; call this before each sequence of values to be trapped
func Init( complex pz )
TrapShape.Init( pz )
endfunc
; call this for each iteration being trapped
float func Iterate( complex pz )
TrapShape.Iterate( pz )
minDist = abs( real( pz ) )
if( minDist < @width )
m_LastChannel = m_Iterations
m_Texture = minDist / @width
return minDist
else
return 1e20
endif
endfunc
complex func ApplyRatioAndSize( complex pz )
pz = pz / @size
float x = sqrt( @ratio ) * real( pz )
float y = 1 / sqrt( @ratio ) * imag( pz )
return x + flip( y )
endfunc
float func GetTextureValue()
return m_Texture
endfunc
protected:
float minDist
float m_Texture
default:
int param v_KCC_PlaneCurveTrapBase
caption = "Version (KCC_PlaneCurveTrapBase)"
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_KCC_PlaneCurveTrapBase < 100
endparam
float param size
caption = "Size"
default = 1.0
hint = "The size of the trap shape."
endparam
float param width
caption = "Width"
default = 0.1
hint = "The width of the trap."
endparam
; float param borderWidth
; caption = "Shape Border Width"
; default = 0.0
; hint = "The width of the border around each shape."
; ; visible = (@colorPreset == "Gradient") && (@colorMode != "Normal")
; ; visible = (GradientColors( @colors ) )
; endparam
; color param borderColor
; caption = "Border Color"
; default = rgb(0,0,0)
; hint = "Specifies the color assigned to the border of the shapes."
; visible = (@solidBorder == false)
; ; visible = (@solidBorder == false) && (@colorPreset == "Gradient") && \
; ; (@colorMode != "Normal") && (@borderWidth > 0.0)
; endparam
; bool param solidBorder
; caption = "Solid Border"
; hint = "If this is enabled orbits, the border around the shapes is \
; made solid."
; default = false
; ; visible = (@colorPreset == "Gradient") && (@colorMode != "Normal") && \
; ; (@borderWidth > 0.0)
; endparam
float param ratio
caption = "H/W Ratio"
default = 1.0
hint = "The ration of height to width."
endparam
param adv
caption = "Advanced Options"
hint = "Additional shaping parameters and functions."
default = false
endparam
}
| Constructor Summary | |
|---|---|
KCC_PlaneCurveTrapBase()
|
|
KCC_PlaneCurveTrapBase(Generic pparent)
constructor |
|
| Method Summary | |
|---|---|
complex |
ApplyRatioAndSize(complex pz)
|
float |
GetTextureValue()
Get texture value. |
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 |
| Methods inherited from class common:TrapShape |
|---|
GetColorChannel, GetTransformedPoint, IterateSilent, SetThreshold |
| Methods inherited from class common:Generic |
|---|
GetParent |
| Methods inherited from class Object |
|---|
|
| Constructor Detail |
|---|
public KCC_PlaneCurveTrapBase(Generic pparent)
public KCC_PlaneCurveTrapBase()
| Method Detail |
|---|
public void Init(complex pz)
Init in class TrapShapepublic float Iterate(complex pz)
Iterate in class TrapShapepublic complex ApplyRatioAndSize(complex pz)
public float GetTextureValue()
TrapShapeOrdinarily, a trap shape does not have a native texture (it is flat). Some formulas may pair trap shapes with trap textures, and may need more information about trap textures when trap shapes are nested via TrapShapeMerge. This function provides support for accessing texture information.
GetTextureValue in class TrapShape
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||