Partial octree implementation
Some ideas:


Properly indent your code and strictly adhere to some style guide. (For example it's very uncommon to have class name starting with a lowercase letter.) I recommend you to read some style guide or study the code of some publicly available libraries. This is very important for readability and future maintainability of your code. It doesn't matter if you will be reading it or somebody else. Code is written once but read many times.
Define a custom class for vectors. (Having a function with 6 arguments is inconvenient and error prone and it is a signal for looking for alternative solutions).
Use this class to implement vector operations on it.
Variables that aren't modified should be declared val.
side could be made local to the index method.
center can be precomputed and reused.
Instead of modifying variables when computing adding a node, it's often more idiomatic to describe the new cell declaratively. Using a helper function can shorten the code.
Optimize recursive functions using tailrec, if possible.


After some refactoring:

case class Vector(x: Double, y: Double, z: Double) {
  def +(that: Vector) = Vector(this.x + that.x,
                               this.y + that.y,
                               this.z + that.z);
  def *(scalar: Double) = Vector(this.x * scalar,
                                 this.y * scalar,
                                 this.z * scalar);
}

class Octree(min: Vector, max: Vector) {
  val children: Array[Octree] = new Array[Octree](8)
  val center = (max + min) * 0.5

  def index(p: Vector): Int = {
    @inline
    def side(x: Double, y: Double): Int =
      if (x &lt; y) 1
      else 0
    (side(center.x, p.x)) |
    (side(center.y, p.y)&lt;&lt;1) |
    (side(center.z, p.z)&lt;&lt;2)
  }

  @annotation.tailrec
  final def add(point: Vector): Octree = {
    var i = index(point)
    debug(i)
    if (children(i) == null) {
      @inline
      def pick(b: Int, f: Vector =&gt; Double, l: Vector, r: Vector): Double =
        if (b == 0) f(l)
        else f(r)
      def split(v1: Vector, v2: Vector): Vector =
        Vector(pick(i &amp; 1, _.x, v1, v2),
               pick(i &amp; 2, _.y, v1, v2),
               pick(i &amp; 4, _.z, v1, v2));
      children(i) = new Octree(
        split(center, min),
        split(max, center));
      children(i)
    } else
      children(i).add(point)
  }

  @annotation.tailrec
  final def find(p: Vector): Octree = {
    var i = index(p)
    debug(i)
    if(children(i) == null)
      this
    else
      children(i).find(p)
  }

  private def debug(message: =&gt; Any) {
    // if you comment out the print statement, `message`
    // won't be evaluated, so even if it's computationally intensive,
    // you don't need to comment out `debug` from the code.
    print(message.toString)
  }
}