Пример #1
0
        public void AddChild(float min, float max, Object obj)
        {
            Box b = new Box(new Vec3(Vec3.Max), new Vec3(Vec3.Min));

            obj.GetBoundingBoxInternal(Matrix4.Identity, b);
            boundingBox.AddPointToBoundingBox(b.Minimum);
            boundingBox.AddPointToBoundingBox(b.Maximum);
            children.Add(new LoDChild(min, max, obj));
        }
Пример #2
0
 public override void GetBoundingBoxInternal(Matrix4 transformation, Box box)
 {
     Vec3[, ,] points = boundingBox.GetPoints();
     for (int x = 0; x < 2; ++x)
     {
         for (int y = 0; y < 2; ++y)
         {
             for (int z = 0; z < 2; ++z)
             {
                 box.AddPointToBoundingBox((points[x, y, z] * transformation));
             }
         }
     }
     //box.AddPointToBoundingBox(
     //return boundingBox;
     //throw new Exception("The method or operation is not implemented.");
 }