Difference between revisions of "PRIM SLICE"

From Second Life Wiki
Jump to navigation Jump to search
m (Created page with "<onlyinclude>{{#if: {{#vardefine:slice_const|{{LSL Const|PRIM_SLICE|integer||c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's slice (a shape attribute)}}}} }}</onlyinclude>{{…")
 
m (<lsl> tag to <source>)
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<onlyinclude>{{#if:
<onlyinclude>{{#if:


{{#vardefine:slice_const|{{LSL Const|PRIM_SLICE|integer||c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's slice (a shape attribute)}}}}
{{#vardefine:slice_const|{{LSL Const|PRIM_SLICE|integer|35|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's slice (a shape attribute)}}}}


}}</onlyinclude>{{#if:
}}</onlyinclude>{{#if:
Line 8: Line 8:


}}{{LSL Constant
}}{{LSL Constant
|name=PRIM_NAME
|inject-2={{LSL PrimitiveParam Categorize|Prim}}
|name=PRIM_SLICE
|type=integer
|type=integer
|value=?
|value=35
|desc=Used to get or set the prim's name.
|desc=Used to get or set the prim's slice values (a shape attribute, equivalent to {{LSLP|cut|advanced_cut}}).
|pa={{LSL Constant/List|i_front=[[llSetPrimitiveParams]]([&#32;{{#var:slice_const}},&#32;|i_end=&nbsp;]);
|pa={{LSL Constant/List|i_front=[[llSetPrimitiveParams]]([&#32;{{#var:slice_const}},&#32;|i_end=&nbsp;]);
|text={{LSL Constant/PrimParamText|set}}
|text={{LSL Constant/PrimParamText|set}}
Line 24: Line 25:
}}
}}
|examples=
|examples=
<source lang="lsl2">
//updated findings show the difference can be as small as 0.02 not 0.05 (Tomos.Halsey)
default
{
    state_entry()
    {
        llSetLinkPrimitiveParams(LINK_THIS,[PRIM_SLICE,<0.0,0.02,0.0>]);
    }
}
</source>
|constants=
|constants=
|functions=
|functions=
Line 33: Line 44:
|events
|events
|location
|location
|cat1=Prim
|cat1
|cat2=PrimitiveParams
|cat2
|cat3
|cat4
}}
}}

Latest revision as of 16:56, 23 January 2015

Description

Constant: integer PRIM_SLICE = 35;

The integer constant PRIM_SLICE has the value 35

Used to get or set the prim's slice values (a shape attribute, equivalent to advanced_cut).

llSetPrimitiveParams

llSetPrimitiveParams([ PRIM_SLICE, vector slice ]);
• vector slice x and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)

The same syntax applies to llSetLinkPrimitiveParams and llSetLinkPrimitiveParamsFast but with an additional prefixed link parameter in the function call.

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_SLICE ]);

Returns the list [ vector slice ]

• vector slice x and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)

The same syntax applies to llGetLinkPrimitiveParams, but with an additional prefixed link parameter in the function call.

Examples

//updated findings show the difference can be as small as 0.02 not 0.05 (Tomos.Halsey)
default
{
    state_entry()
    {
        llSetLinkPrimitiveParams(LINK_THIS,[PRIM_SLICE,<0.0,0.02,0.0>]);
    }
}

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_SLICE = 35;