reb
Class SphereArray

Object
  extended by common:Array
      extended by reb:SphereArray

class 
Array:SphereArray

class for sphere arrays


Ultra Fractal Source

Toggle UF Source Code Display

 class SphereArray(Array) {
 ; class for sphere arrays
 
 public:
 
   import "common.ulb"
 
 ; Sphere array constructor
 ; @param plength = size of the sphere array
   func SphereArray(int plength)
     setLength(sph, plength)
   endfunc
 
 ; Get array length
   int func GetArrayLength()
     return length(sph)
   endfunc
 
   ; Set array length
   func SetArrayLength(int plength)
     setLength(sph, plength)
   endfunc
 
   ; Copy Array
   ; @param dest = SphereArray object to copy all values into
   ; previous contents of dest will be discarded.
   func Copy(SphereArray &dest)
     int l = this.GetArrayLength()
     if (dest == 0)
       dest = new SphereArray(l)
     else
       dest.SetArrayLength(l)
     endif
     int j = 0
     while (j < l)
       dest.sph[j] = sph[j]
       j = j + 1
     endwhile
   endfunc  
 
   Sphere sph[]
   
 default:
   title = "Sphere Array"
   int param v_spherearray
     caption = "Version (Sphere Array)"
     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_spherearray < 100
   endparam
 }
 


Constructor Summary
SphereArray()
           
SphereArray(int plength)
          Sphere array constructor
 
Method Summary
 void Copy(SphereArray dest)
          Copy Array
 int GetArrayLength()
          Get array length
 void SetArrayLength(int plength)
          Set array length
 
Methods inherited from class Object
 

Constructor Detail

SphereArray

public SphereArray(int plength)
Sphere array constructor

Parameters:
plength - = size of the sphere array

SphereArray

public SphereArray()
Method Detail

GetArrayLength

public int GetArrayLength()
Get array length

Overrides:
GetArrayLength in class Array
Returns:
the number of elements in the array

SetArrayLength

public void SetArrayLength(int plength)
Set array length

Overrides:
SetArrayLength in class Array
Parameters:
plength - new length of the array

Copy

public void Copy(SphereArray dest)
Copy Array

Parameters:
dest - = SphereArray object to copy all values into previous contents of dest will be discarded.