Difference between revisions of "PRIM TYPE CYLINDER"

From Second Life Wiki
Jump to navigation Jump to search
m
 
(my first Wiki creation. :))
Line 1: Line 1:
{{#if:
==(integer) PRIM_TYPE_CYLINDER = 0x01==
{{:PRIM_TYPE}}
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.Each vector parameter below only uses the first two values in the vector, the .z part is irrelevant currently.
}}{{LSL Constant
 
|name=PRIM_TYPE_CYLINDER
 
|type=integer
[ PRIM_TYPE, [[integer]] hole_shape, [[vector]] cut, [[float]] hollow, [[vector]] twist, [[vector]] top_size, [[vector]] top_shear ]
|value=1
 
|desc=PRIM_TYPE_CYLINDER is a parameter of [[PRIM_TYPE]] used to make prim into a cylinder and to change specific properties that define the shape of that cylinder.
 
|pa={{LSL Constant/List|i_front=[ {{LSL_Const|PRIM_TYPE|integer|9}}, [[PRIM_TYPE_CYLINDER]], |i_end= ]
{| border="1" cellpadding="5" cellspacing="0"
|text={{LSL_Constants/PrimitiveParams/hole_shape}}
|hole_shape
|toc=PRIM_TYPE
|Constants
|i1_type=integer|i1_name=hole_shape
|Shape
|i2_type=vector|i2_name=cut
|-
|i3_type=float|i3_name=hollow
|PRIM_HOLE_DEFAULT
|i4_type=vector|i4_name=twist_box|i4_disp=twist
|0x00        
|i5_type=vector|i5_name=z_taper|i5_disp=top_size
|Default
|i6_type=vector|i6_name=top_shear
|-
}}
|PRIM_HOLE_SQUARE
|pb={{LSL Constant/List|i_front=[ 1, [[PRIM_TYPE_CYLINDER]], |i_end= ]
|0x20        
|text=This is the old PRIM_TYPE format for cylinders (PRIM_TYPE used to be 1 instead of 9). Use the new format unless you are maintaining old code.
|Square
|toc=PRIM_TYPE_LEGACY
|-
|i1_type=vector|i1_name=cut
|PRIM_HOLE_CIRCLE
|i2_type=float|i2_name=hollow
|0x10        
|i3_type=float|i3_name=twist_end|i3_disp=twist
|Circle
|i4_type=vector|i4_name=top_size
|-
|i5_type=vector|i5_name=top_shear
|PRIM_HOLE_TRIANGLE
}}
|0x30        
|examples=
|Triangle
<lsl>llSetPrimitiveParams([PRIM_TYPE,  
|}
 
 
===example===
----
<pre>
llSetPrimitiveParams([PRIM_TYPE,  
                         PRIM_TYPE_CYLINDER,  
                         PRIM_TYPE_CYLINDER,  
                             PRIM_HOLE_DEFAULT, // hole_shape
                             PRIM_HOLE_DEFAULT,  
                             <0.00, 1.0, 0.0>,  // cut
                             <0.00, 1.0, 0.0>,  // cut
                             0.0,                // hollow
                             0.0,                // hollow
                             <0.0, 0.0, 0.0>,    // twist
                             <0.0, 0.0, 0.0>,    // twist
                             <1.0, 1.0, 0.0>,    // top_size
                             <1.0, 1.0, 0.0>,    // top size
                             <0.0, 0.0, 0.0>    // top_Shear
                             <0.0, 0.0, 0.0>    // top Shear
                       ]);</lsl>
                       ]);
|constants=
</pre>
{{LSL ConstRow|PRIM_TYPE}}
 
{{LSL ConstRow|CHANGED_SHAPE}}
 
|functions=
===See Also===
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}
----
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}}
[[llSetPrimitiveParams]] [[llGetPrimitiveParams]] [[llSetLinkPrimitiveParams]]
{{LSL DefineRow||[[llGetPrimitiveParams]]|}}
|events=
{{LSL DefineRow||[[changed]]|}}
|location
|cat1=Prim
|cat2
|cat3
|cat4
}}

Revision as of 04:46, 17 May 2007

(integer) PRIM_TYPE_CYLINDER = 0x01

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.Each vector parameter below only uses the first two values in the vector, the .z part is irrelevant currently.


[ PRIM_TYPE, integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ]


hole_shape Constants Shape
PRIM_HOLE_DEFAULT 0x00 Default
PRIM_HOLE_SQUARE 0x20 Square
PRIM_HOLE_CIRCLE 0x10 Circle
PRIM_HOLE_TRIANGLE 0x30 Triangle


example


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


See Also


llSetPrimitiveParams llGetPrimitiveParams llSetLinkPrimitiveParams