User:Strife Onizuka/Sandbox/Switch/Const/Test

From Second Life Wiki
< User:Strife Onizuka‎ | Sandbox‎ | Switch‎ | Const
Revision as of 17:59, 17 May 2007 by Strife Onizuka (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

integer PRIM_TYPE_CYLINDER = 1;

The integer constant PRIM_TYPE_CYLINDER has the value 1

PRIM_TYPE_CYLINDER is a parameter of PRIM_TYPE used to make prim into a cylinder and to change specific proprieties that define the shape of that cylinder.


[ PRIM_TYPE, PRIM_TYPE_CYLINDER, 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 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

Functions and Events

Constants

•  PRIM_TYPE
•  CHANGED_SHAPE

Functions

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

Events

•  changed

Examples

llSetPrimitiveParams([PRIM_TYPE, 
                        PRIM_TYPE_CYLINDER, 
                            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
                      ]);