Standard
Class Standard_HeightTransfer

Object
  extended by common:Generic
      extended by common:Transfer
          extended by Standard:Standard_HeightTransfer

class 
Transfer:Standard_HeightTransfer

This implements the standard height transfer functionality for the Slope formulas in Standard.ufm.


Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_HeightTransfer(common.ulb:Transfer) {
 ; This implements the standard height transfer functionality for the Slope
 ; formulas in Standard.ufm.
 public:
   float func Iterate(float pr)
     float x = pr * @zscale
     if @xfer == "log"
       x = log(x)
     elseif @xfer == "sqrt"
       x = sqrt(x)
     elseif @xfer == "cuberoot"
       x = x^(1/3)
     elseif @xfer == "exp"
       x = exp(x)
     elseif @xfer == "sqr"
       x = sqr(x)
     elseif @xfer == "cube"
       x = x^3
     elseif @xfer == "sin"
       x = sin(x)
     elseif @xfer == "cos"
       x = cos(x)
     elseif @xfer == "tan"
       x = tan(x)
     endif
     return x * @zscale2
   endfunc
 
 default:
   title = "Height Transfer"
   param xfer
     caption = "Transfer Function"
     default = 0
     enum = "linear" "log" "sqrt" "cuberoot" "exp" "sqr" "cube" "sin" "cos" "tan"
     hint = "This function will be applied to the height value \
             before a slope is calculated."
   endparam
   param zscale
     caption = "Height Pre-Scale"
     default = 1.0
     exponential = true
     hint = "Specifies the ratio between height and distance.  Higher \
             values will exaggerate differences between high and low. \
             In general, you will want to use smaller numbers here."
   endparam
   param zscale2
     caption = "Height Post-Scale"
     default = 0.01
     exponential = true
     hint = "Specifies the ratio between height and distance; like \
             Height Pre-Scale, except that this value is applied after \
             the transfer function."
   endparam
 }
 


Constructor Summary
Standard_HeightTransfer()
           
 
Method Summary
 float Iterate(float pr)
          call this to process another value in the sequence
 
Methods inherited from class common:Transfer
Init, IterateSilent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

Standard_HeightTransfer

public Standard_HeightTransfer()
Method Detail

Iterate

public float Iterate(float pr)
Description copied from class: Transfer
call this to process another value in the sequence

Overrides:
Iterate in class Transfer