// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Bounds of a planned point cloud // Not compiled or tested in-world // Setup: Place in a spare prim. Edit POINTS with vector values. Owner touch prints results without altering the scene. // Stop / restore: Disable or remove. No prim properties are changed. // Notes: This examines the supplied list, not scene objects. The center is the bounds midpoint, not the average or mass center. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Owner-only calculation. list POINTS=[<-2.0,1.0,0.0>,<4.0,-3.0,2.0>,<1.0,5.0,7.0>]; default { touch_start(integer detectedCount) { if (llDetectedKey(0)!=llGetOwner()) return; integer n=llGetListLength(POINTS); if(n==0) { llOwnerSay("No points."); return; } vector low=llList2Vector(POINTS,0); vector high=low; integer i; for(i=1;ihigh.x)high.x=p.x; if(p.y>high.y)high.y=p.y; if(p.z>high.z)high.z=p.z; } llOwnerSay("Min="+(string)low+"; max="+(string)high+"; size="+(string)(high-low)+"; centre="+(string)((high+low)*0.5)); } }