|Anonymous | Login | Signup for a new account||2020-11-28 23:30 PST|
|Main | My View | View Issues | Change Log | Roadmap | Summary | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004465||opensim||[REGION] Script Functions||public||2009-12-27 16:02||2011-08-20 05:51|
|Product Version||master (dev code)|
|Target Version||Fixed in Version|
|Summary||0004465: Optimization tweak for osGetLinkPrimitiveParams()|
|Description||Studying the source for this wonderful function (I use it a LOT), it appeared to me to be creating 2 superflous lists and a for loop - all being used to identify the desired prim of a linkset for which the method seeks a list of parameters. Unless I am not seeing something (and please inform me if I am), the attached patch will alleviate a lot of load by simply assigning the desired prim in a much more direct fashion.|
This method will return the desired list of parameters, OR an empty list should a non-existant link number be given.
|Additional Information||It should be noted that contrary to what one might expect from a method involving linked prims, this will return global, not local, parameters. Normal math must be applied to obtain local offsets/rotations (This remains unchanged by this patch).|
|Tags||No tags attached.|
|Git Revision or version number||head|
|Run Mode||Standalone (1 Region)|
|Environment||.NET / Windows32|
|Attached Files||osGetLinkPrimitiveParams.patch [^] (1,336 bytes) 2009-12-27 16:02 [Show Content]|
I'm not that familiar with this area but it appears from reading the code that
actually treats the linknumber as a link type (confusingly) and does case based reasoning on that, while
simply treats linknumber as, well, the number of a link. I'm imagining this will result in rather different behaviour.
Please feel free to tell me why I'm wrong. Some kind of unit test to demonstrate would be even better! (though I know that's probably a lot to ask here).
Christos Lightling (reporter)
That was pretty much my logic... you wish to get the Primitive Parameters of a specific linked Part.... so.... why not just tell it which linked part you want the parameters from?
Seems to work fine for me in live use. If I missed a specific reason for the original method, I'm all ears.
edited on: 2011-08-20 05:51
To say more specific ...
If you apply this patch, it will work fine if you expect the behavior like llGetLinkPrimitiveParams, specifying 1,2,3,4,.... and LINK_THIS as linknumber.
But osGetLinkPrimitiveParams works even if you specify LINK_SET, LINK_ALL_OTHERS and LINK_ALL_CHILDREN, which can return more than one prims. However, GetLinkNumPart() can only cover single prim. That will be the difference of current implementation and your patch, and it will be the answer for the submitter's question.
|2009-12-27 16:02||Christos Lightling||New Issue|
|2009-12-27 16:02||Christos Lightling||File Added: osGetLinkPrimitiveParams.patch|
|2009-12-27 16:02||Christos Lightling||Git Revision||=> head|
|2009-12-27 16:02||Christos Lightling||SVN Revision||=> 0|
|2009-12-27 16:02||Christos Lightling||Run Mode||=> Standalone (1 Region)|
|2009-12-27 16:02||Christos Lightling||Physics Engine||=> ODE|
|2009-12-27 16:02||Christos Lightling||Environment||=> .NET / Windows32|
|2009-12-27 16:02||Christos Lightling||Mono Version||=> None|
|2009-12-30 17:51||Revolution||Status||new => patch included|
|2010-01-07 11:05||Fly-Man-||Relationship added||child of 0003986|
|2010-01-29 15:52||justincc||Note Added: 0014903|
|2010-01-29 15:52||justincc||Status||patch included => patch feedback|
|2010-01-29 16:01||Christos Lightling||Note Added: 0014906|
|2011-08-20 05:51||makopoppo||Note Added: 0019648|
|2011-08-20 05:51||makopoppo||Note Edited: 0019648|
|Copyright © 2000 - 2012 MantisBT Group|