// a helper to show the world-axis-aligned bounding box for an object public static BoundingBoxHelper Create(Renderer renderer, Object3D o, Color? color = null) { var c = color.HasValue ? color.Value : new Color(0x888888); var geo = new BoxGeometry(1, 1, 1); var mat = new MeshBasicMaterial(renderer) { Diffuse = c, UseWireframe = true }; var boundingBoxHelper = new BoundingBoxHelper(geo, mat); boundingBoxHelper.o = o; boundingBoxHelper.box = Box3.Empty; return boundingBoxHelper; }
// a helper to show the world-axis-aligned bounding box for an object public static BoundingBoxHelper Create(Renderer renderer, Object3D o, Color?color = null) { var c = color.HasValue ? color.Value : new Color(0x888888); var geo = new BoxGeometry(1, 1, 1); var mat = new MeshBasicMaterial(renderer) { Diffuse = c, UseWireframe = true }; var boundingBoxHelper = new BoundingBoxHelper(geo, mat); boundingBoxHelper.o = o; boundingBoxHelper.box = Box3.Empty; return(boundingBoxHelper); }