// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // List all eight corners of a rotated box // Not compiled or tested in-world // Setup: Use a spare owned prim. Set positive SIZE, CENTER and Euler ANGLES. Owner touch prints sample coordinates. // Stop / restore: Remove/disable. Nothing is rezzed or moved. // Notes: An oriented ideal box, not a mesh-bound query. The corner order follows three binary sign bits. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. vector SIZE=<4.0,2.0,3.0>; vector CENTER=<5.0,5.0,2.0>; vector ANGLES=<0.0,0.0,30.0>; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(SIZE.x<=0.0||SIZE.y<=0.0||SIZE.z<=0.0) { llOwnerSay("Positive size required."); return; } rotation r=llEuler2Rot(ANGLES*DEG_TO_RAD); integer i; for(i=0;i<8;++i) { float x=-0.5; float y=-0.5; float z=-0.5; if(i&1)x=0.5; if(i&2)y=0.5; if(i&4)z=0.5; llOwnerSay((string)i+": "+(string)(CENTER+*r)); } } }