Difference between revisions of "PRIM TYPE"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
m |
m |
||
Line 52: | Line 52: | ||
|desc=Gets or sets the {{LSLP|type_flag|type}} of the prim and associated type {{LSLP|type_parameters|parameters}}. | |desc=Gets or sets the {{LSLP|type_flag|type}} of the prim and associated type {{LSLP|type_parameters|parameters}}. | ||
|examples | |examples | ||
|pa={{LSL Constant/List|i_front=[ {{#var:type_const}}, |i_end= ] + {{ | |pa={{LSL Constant/List|i_front=[ {{#var:type_const}}, |i_end= ] + {{LSLPT|type_parameters|flag_parameters}} | ||
|text=Used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]. | |text=Used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]. | ||
Line 61: | Line 61: | ||
}} | }} | ||
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([ {{#var:type_const}}|i_end= ]);| | |pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([ {{#var:type_const}}|i_end= ]);| | ||
|r_front=Returns the list [ |r_end= ] + {{LSL Param|type_parameters|flag_parameters}} | |r_front=Returns the list <code>[ |r_end= ] + {{LSL Param|type_parameters|flag_parameters}}</code> | ||
|text=The values that follow after {{LSLP|type_flag|flag}}, the {{LSLP|type_parameters|flag_parameters}}, are dependent on the value of {{LSLP|flag}}, please refer to the individual PRIM_TYPE_* articles for further information. | |text=The values that follow after {{LSLP|type_flag|flag}}, the {{LSLP|type_parameters|flag_parameters}}, are dependent on the value of {{LSLP|flag}}, please refer to the individual PRIM_TYPE_* articles for further information. | ||
Revision as of 12:17, 8 June 2012
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer PRIM_TYPE = 9;The integer constant PRIM_TYPE has the value 9
Gets or sets the type of the prim and associated type parameters.
llSetPrimitiveParams
[ PRIM_TYPE, integer flag ] + flag_parameters• integer | flag | – | PRIM_TYPE_* flag |
Used with llSetPrimitiveParams & llSetLinkPrimitiveParams.
The values needed for flag_parameters is dependent on flag, please refer to the individual PRIM_TYPE_* articles for additional information.
Caveats
- PRIM_TYPE can only be used with LINK_SET if the object contains 10 or fewer prims. It can only be used with LINK_ALL_OTHERS or LINK_ALL_CHILDREN if the object contains 11 or fewer prims. If there are more prims, the operation will fail and an error will be shouted to DEBUG_CHANNEL. Work around this by looping through the prims with llSetLinkPrimitiveParamsFast.
- While it is possible to use PRIM_TYPE_SCULPT to animate an object, it is not recommended. For details see: Why UUID Flipping is Bad
llGetPrimitiveParams
llGetPrimitiveParams([ PRIM_TYPE ]);Returns the list [ integer flag ] + flag_parameters
• integer | flag | – | PRIM_TYPE_* flag |
The values that follow after flag, the flag_parameters, are dependent on the value of flag, please refer to the individual PRIM_TYPE_* articles for further information.
flag Constants | flag_parameters | ||||||
---|---|---|---|---|---|---|---|
PRIM_TYPE_BOX | 0 | [ integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ] | |||||
PRIM_TYPE_CYLINDER | 1 | [ integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ] | |||||
PRIM_TYPE_PRISM | 2 | [ integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ] | |||||
PRIM_TYPE_SPHERE | 3 | [ integer hole_shape, vector cut, float hollow, vector twist, vector dimple] | |||||
PRIM_TYPE_TORUS | 4 | [ integer hole_shape, vector cut, float hollow, vector twist, vector hole_size, vector top_shear, vector advanced_cut, vector taper, float revolutions, float radius_offset, float skew ] | |||||
PRIM_TYPE_TUBE | 5 | [ integer hole_shape, vector cut, float hollow, vector twist, vector hole_size, vector top_shear, vector advanced_cut, vector taper, float revolutions, float radius_offset, float skew ] | |||||
PRIM_TYPE_RING | 6 | [ integer hole_shape, vector cut, float hollow, vector twist, vector hole_size, vector top_shear, vector advanced_cut, vector taper, float revolutions, float radius_offset, float skew ] | |||||
PRIM_TYPE_SCULPT | 7 | [ string map, integer type ] |
hole_shape Flags | Shape | hole_shape Flags | Shape | ||
---|---|---|---|---|---|
PRIM_HOLE_DEFAULT | 0x00 | Default | PRIM_HOLE_SQUARE | 0x20 | Square |
PRIM_HOLE_CIRCLE | 0x10 | Circle | PRIM_HOLE_TRIANGLE | 0x30 | Triangle |
Caveats
Related Articles
Constants
• | CHANGED_SHAPE |
Functions
• | llSetPrimitiveParams | |||
• | llSetLinkPrimitiveParams | |||
• | llGetPrimitiveParams |
Events
• | changed |