anchor.diff:              { p with trafo = p.trafo * t }
   
           let bounds (p : Pickable) =
  -            PickShape.bounds(p.shape).Transformed(p.trafo)
  +            PickShape.bounds(p.shape) |> transformBounds p.trafo
   
           let private intersectTriangle (part : RayPart) (tri : Triangle3d) =
               match RayPart.Intersects(part, tri) with
  
positive.code:                 | Some t -> 
                      let pt = part.Ray.Ray.GetPointOnRay t
                      Some (RayHit(t, (p, pt)))
                  | None -> None
                  
          member x.Dispose() =
              bvh.Dispose()
  
negative.code:                 | None -> None
  
          let intersect (part : RayPart) (p : Pickable) =
              let local = RayPart(part.Ray.Ray |> transformRay p.trafo.Inverse |> FastRay3d, part.TMin, part.TMax)
  
              let inline getRealT (localT : Option<float>) =
                  match localT with
                  | Some localT ->
                      let localPoint = local.Ray.Ray.GetPointOnRay localT
                      let worldPoint = p.trafo.Forward.TransformPosProj localPoint
                      let real = Vec.dot (worldPoint - part.Ray.Ray.Origin) part.Ray.Ray.Direction / Vec.lengthSquared part.Ray.Ray.Direction
                      Some real
                  | None ->
                      None
  
              match p.shape with
                  | Box b -> RayPart.Intersects(local, b) |> getRealT
                  | Sphere s -> RayPart.Intersects(local, s) |> getRealT
                  | Cylinder c -> RayPart.Intersects(local, c) |> getRealT
                  | Triangle t -> RayPart.Intersects(local, t) |> getRealT
                  | Triangles kdtree ->
                      match KdTree.intersect intersectTriangle local kdtree with
                      | Some hit -> Some hit.T |> getRealT
                      | None -> None
                  | TriangleArray arr -> 
                      match arr |> Array.choose ( fun t -> RayPart.Intersects(local, t) ) with
                      | [||] -> None
                      | ts -> ts |> Array.min |> Some |> getRealT
                  | Custom(_,intersect) -> intersect local |> getRealT
  
      type PickObject(scope : Ag.Scope, pickable : IMod<Pickable>) =
          member x.Scope = scope
  