[Opensim-users] Proposal for a new OSSL function

Chris mewtwo0641 at gmail.com
Fri Mar 13 19:10:08 UTC 2015


Getting an object's size would be a really nice addition; but going by 
how llGetScale() functions I believe it would be limited to getting just 
the root prim's size rather than overall size if I'm thinking about this 
correctly.

On 3/13/2015 2:03 PM, R.Gunther wrote:
> One thing that llGetObject detail is missing is to get the prim size. 
> so if this command get add. i hope the add the object size too.
>
>
> On 2015-03-13 20:00, Chris wrote:
>> Hello all,
>>
>> I have a proposal for a new OSSL function that could possibly prove 
>> useful: osGetObjectNameDetails()
>>
>> I would have sent this to the opensim-dev mailing list but I'm unsure 
>> now of where this is located and how to sign up for that list since 
>> the old mailing list locations are now gone. Can someone please point 
>> me in the right direction? :)
>>
>> This proposal has also been posted at 
>> http://opensimulator.org/wiki/OSSL_Proposals
>>
>> Thank you in advance for the consideration!
>>
>> ----------
>> Function:
>> ----------
>>
>> list osGetObjectNameDetails(list names, list params);
>> list osGetObjectNameDetails(list names, float range, list params);
>>
>> -------------
>> Description:
>> -------------
>>
>> Would work similarly to llGetObjectDetails() but has the advantage of 
>> specifying for an object's name (or list of names) instead of by key. 
>> If more than one name match is found then the return list will have 
>> those matches (or groups of matches if more than one parameter is 
>> supplied) sorted in order from nearest to furthest from the prim 
>> calling osGetObjectNameDetails. By default this would scan the entire 
>> region but optionally a range can be specified to only search within 
>> a certain radius similar to llSensor().
>>
>> This has potential, for most single item situations at least, 
>> eliminate the need for an llSensor() call and also eliminate the need 
>> for a sensor event thus reducing code complexity and make for very 
>> easy and very quick data collection to be further processed upon.
>>
>> ---------
>> Example:
>> ---------
>>
>> list objDetails;
>>
>> default
>> {
>>     state_entry()
>>     {
>>         //Example 1:
>>         //For this example assume this prim is located at <128, 125, 
>> 30> and we have two objects named 'Chair'.
>>         //'Chair' #1 is located at <128, 128, 30> and owned by avatar 
>> UUID 5f9c7c6c-f2c9-4196-8d8d-07cdeb71821a
>>         //'Chair' #2 is located at <128, 130, 30> and owned by avatar 
>> UUID 1c612fb2-748c-4a1a-ad57-27f488210c06
>>
>>         objDetails = osGetObjectNameDetails(["Chair"], OBJECT_NAME | 
>> OBJECT_POS | OBJECT_OWNER);
>>
>>         llOwnerSay(llDumpList2String(objDetails, ", "));
>>
>>         //llOwnerSay() output should be: Chair, <128, 128, 30>, 
>> 5f9c7c6c-f2c9-4196-8d8d-07cdeb71821a, Chair, <128, 130, 30>, 
>> 1c612fb2-748c-4a1a-ad57-27f488210c06
>>
>> //------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
>>
>>
>>         //Example 2:
>>         //For this example assume everything stays the same as in 
>> Example 1 except that we're specifying a range.
>>
>>         objDetails = osGetObjectNameDetails(["Chair"], 5.0, 
>> OBJECT_NAME | OBJECT_POS | OBJECT_OWNER);
>>
>>         llOwnerSay(llDumpList2String(objDetails, ", "));
>>
>>         //llOwnerSay() output should be: Chair, <128, 128, 30>, 
>> 5f9c7c6c-f2c9-4196-8d8d-07cdeb71821a
>>
>> //------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
>>
>>
>>         //Example 3:
>>         //For this example assume this prim is located at <128, 125, 
>> 30> and we have two objects: 'Chair 1' and 'Chair 2'.
>>         //'Chair 1' is located at <128, 128, 30> and owned by avatar 
>> UUID 5f9c7c6c-f2c9-4196-8d8d-07cdeb71821a
>>         //'Chair 2' is located at <128, 130, 30> and owned by avatar 
>> UUID 1c612fb2-748c-4a1a-ad57-27f488210c06
>>
>>         objDetails = osGetObjectNameDetails(["Chair 1", "Chair 2"], 
>> OBJECT_NAME | OBJECT_POS | OBJECT_OWNER);
>>
>>         llOwnerSay(llDumpList2String(objDetails, ", "));
>>
>>         //llOwnerSay() output should be: Chair 1, <128, 128, 30>, 
>> 5f9c7c6c-f2c9-4196-8d8d-07cdeb71821a, Chair 2, <128, 130, 30>, 
>> 1c612fb2-748c-4a1a-ad57-27f488210c06
>>
>> //------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
>>
>>
>>         //Example 4:
>>         //For this example assume everything stays the same as in 
>> Example 3 except that we're specifying a range.
>>
>>         objDetails = osGetObjectNameDetails(["Chair 1", "Chair 2"], 
>> 5.0, OBJECT_NAME | OBJECT_POS | OBJECT_OWNER);
>>
>>         llOwnerSay(llDumpList2String(objDetails, ", "));
>>
>>         //llOwnerSay() output should be: Chair 1, <128, 128, 30>, 
>> 5f9c7c6c-f2c9-4196-8d8d-07cdeb71821a
>>     }
>> }
>>
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users


-- 
OpenSim: 10 Region Standalone on 0.7.6 Dev
Physics: Open Dynamics Engine
OS: Windows 7 (x64)
CPU: AMD FX 8320 8-Core 3.5 GHz
Memory: 16 GB DDR3
Database: MySQL 5.1.63 (x64)



More information about the Opensim-users mailing list