Difference between revisions of "LlScaleByFactor"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 42: Line 42:
         int count = prims;
         int count = prims;
         do {
         do {
             get += [PRIM_LINK_TARGET, count, PRIM_POS_LOCAL, PRIM_SIZE];
             get += [PRIM_LINK_TARGET, count, PRIM_SIZE, PRIM_POS_LOCAL];
         } while(--count);
         } while(--count);
         get = llGetPrimitiveParams(get);
         get = llGetPrimitiveParams(get);

Revision as of 00:49, 6 January 2014

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: integer llScaleByFactor( float scaling_factor );

Attempts to resize the entire object by scaling_factor, maintaining the size-position ratios of the prims.
Returns an integer boolean, STATUS_* flag or ERR_* flag?

• float scaling_factor The multiplier to be used with the prim sizes and their local positions.

Examples

See Also

Functions

•  llScaleByFactor
•  llGetMaxScaleFactor

Deep Notes

This function is roughly equivalent to the following: <lsl> float VectorAbsStatistics(integer flag, vector a){

   return llListStatistics(flag, [llFabs(a.x), llFabs(a.y), llFabs(a.z)]);

}

integer ScaleByFactor(float scale) {

   vector root = llGetScale() * scale;
   if(VectorAbsStatistics(LIST_STAT_MAX, root) > 64

History

Search JIRA for related Issues

Signature

//function integer llScaleByFactor( float scaling_factor );