Difference between revisions of "PRIM TYPE PRISM"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 14: Line 14:
|i5_type=vector|i5_name=z_taper|i5_disp=top_size
|i5_type=vector|i5_name=z_taper|i5_disp=top_size
|i6_type=vector|i6_name=top_shear
|i6_type=vector|i6_name=top_shear
|toc=PRIM_TYPE
}}
}}
|pb={{LSL Constant/List|i_front=[ 1, [[PRIM_TYPE_PRISM]], |i_end= ]
|pb={{LSL Constant/List|i_front=[ 1, [[PRIM_TYPE_PRISM]], |i_end= ]
Line 22: Line 23:
|i4_type=vector|i4_name=top_size
|i4_type=vector|i4_name=top_size
|i5_type=vector|i5_name=top_shear
|i5_type=vector|i5_name=top_shear
|toc=PRIM_TYPE_LEGACY
}}
}}
|examples=
|examples=

Revision as of 11:06, 23 May 2008

Description

Constant: integer PRIM_TYPE_PRISM = 2;

The integer constant PRIM_TYPE_PRISM has the value 2

PRIM_TYPE_PRISM is a parameter of PRIM_TYPE used to make prim into a prism and to change specific properties that define the shape of that prism.

PRIM_TYPE

[ PRIM_TYPE, PRIM_TYPE_PRISM, integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ]
• integer hole_shape PRIM_HOLE_* flag
• vector cut x and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)
• float hollow ranges from 0.0 (solid) to 0.95 (maximum hollowed)
• vector twist ranges from -1.0 (-180 degree in the edit window) to 1.0 (+180 degree in the edit window) for both x and y (z is ignored)
• vector top_size ranges from 0.0 to 1.0 to 2.0 for both x and y (z is ignored)!
• vector top_shear ranges from -0.5 to 0.5 for both x and y (z is ignored)
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

PRIM_TYPE_LEGACY

[ 1, PRIM_TYPE_PRISM, vector cut, float hollow, float twist, vector top_size, vector top_shear ]
• vector cut x and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)
• float hollow ranges from 0.0 (solid) to 0.95 (maximum hollowed)
• float twist ranges from -0.5 (-180 degree in the edit window) to 0.5 (+180 degree in the edit window)
• vector top_size ranges from 0.0 to 1.0 for both x and y (z is ignored)!
• vector top_shear ranges from -0.5 to 0.5 for both x and y (z is ignored)

This is the old PRIM_TYPE format for prisms (PRIM_TYPE used to be 1 instead of 9). Use the new format unless you are maintaining old code.

Related Articles

Constants

•  PRIM_TYPE
•  CHANGED_SHAPE

Functions

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

Events

•  changed

Examples

<lsl>llSetPrimitiveParams([PRIM_TYPE,

                       PRIM_TYPE_PRISM, 
                           PRIM_HOLE_DEFAULT,  // hole_shape
                           <0.00, 1.0, 0.0>,   // cut
                           0.0,                // hollow
                           <0.0, 0.0, 0.0>,    // twist
                           <1.0, 1.0, 0.0>,    // top_size
                           <0.0, 0.0, 0.0>     // top_Shear
                     ]);</lsl>

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_TYPE_PRISM = 2;