reb
Class PointArray

Object
  extended by common:Array
      extended by reb:PointArray

class 
Array:PointArray

class for creating 3D point object arrays


Ultra Fractal Source

Toggle UF Source Code Display

 class PointArray(Array) {
 ; class for creating 3D point object arrays
 
 public:
   import "common.ulb"
 
 ; Constructor for plane arrays
 ; @param plength = sets the size of the array
   func PointArray(int plength)
     setLength(pt, plength)
   endfunc
 
 ; Get array length
   int func GetArrayLength()
     return length(pt)
   endfunc
 
 ; Set array length
   func SetArrayLength(int plength)
     setLength(pt, plength)
   endfunc
 
 ; Copy array
   func Copy(PointArray &dest)
     int l = this.GetArrayLength()
     if (dest == 0)
       dest = new PointArray(l)
     else
       dest.SetArrayLength(l)
     endif
     int j = 0
     while (j < l)
       dest.pt[j] = pt[j]
       j = j + 1
     endwhile
   endfunc
 
   Point pt[]
   
 default:
   title = "Point Array"
   int param v_pointarray
     caption = "Version (Point 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_pointarray < 100
   endparam
   
 }
 


Constructor Summary
PointArray()
           
PointArray(int plength)
          Constructor for plane arrays
 
Method Summary
 void Copy(PointArray dest)
          Copy array
 int GetArrayLength()
          Get array length
 void SetArrayLength(int plength)
          Set array length
 
Methods inherited from class Object
 

Constructor Detail

PointArray

public PointArray(int plength)
Constructor for plane arrays

Parameters:
plength - = sets the size of the array

PointArray

public PointArray()
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(PointArray dest)
Copy array