The integer constant PRIM_TYPE_TORUS has the value 4

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

Syntax

integer PRIM_TYPE_TORUS = 4;

Usage

[ PRIM_TYPE, PRIM_TYPE_TORUS, 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 ]

integerhole_shapePRIM_HOLE_* flag
vectorcutx and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)
floathollowranges from 0.0 (solid) to 0.95 (maximum hollowed)
vectortwistranges from -1.0 (-360 degree in the edit window) to 1.0 (+360 degree in the edit window) for both x and y (z is ignored)
vectorhole_sizex ranges from 0.05 to 1.0; y ranges from 0.05 (large hole) to 0.50 (no hole)
vectortop_shearranges from -0.5 to 0.5 for both x and y (z is ignored)
vectoradvanced_cutx and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)
vectortaperranges from -1.0 to 1.0 for both x and y (z is ignored)
floatrevolutionsranges from 1.0 to 4.00
floatradius_offsetdepends on holesize.y and revolutions
floatskewranges from -1.0 to 1.0
hole_shape FlagsShapehole_shape FlagsShape
PRIM_HOLE_DEFAULT0x00DefaultPRIM_HOLE_SQUARE0x20Square
PRIM_HOLE_CIRCLE0x10CirclePRIM_HOLE_TRIANGLE0x30Triangle

[ 1, PRIM_TYPE_TORUS, vector cut, float hollow, float twist_end, float hole_size_y, vector top_shear, vector advanced_cut ]

vectorcutx and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)
floathollowranges from 0.0 (solid) to 0.95 (maximum hollowed)
floattwist_endranges from -0.5 (-180 degree in the edit window) to 0.5 (+180 degree in the edit window)
floathole_size_yranges from 0.05 (large hole) to 0.50 (no hole)
vectortop_shearranges from -0.5 to 0.5 for both x and y (z is ignored)
vectoradvanced_cutx and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)

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

Examples

// this makes a nice expanding spiral 
vector cut= <0.00000, 1.00000, 0.00000>; 
float hollow = 0.0;                    // 0.0 to 0.95
vector twist = <0, 0.0, 0.0>;          // -1.0 to 1.0
vector holesize = <1.0, 0.05, 0.0>;    // max X:1.0 Y:0.5
vector topshear = <0.0, 0.0, 0.0>;     // -0.5 to 0.5
vector profilecut = <0.0, 0.0, 0.0>;   // 0.0 to 1.0
vector taper_a = <0.0, 0.0, 0.0>;      // 0.0 to 1.0
float revolutions = 3.0;               // 1.0 to 4.0
float radiusoffset = 1.0;              // -1.0 to 1.0
float skew = 0.0;                      // 
llSetPrimitiveParams( [PRIM_TYPE, PRIM_TYPE_TORUS, PRIM_HOLE_DEFAULT,
                        cut, hollow, twist, holesize, topshear,
                        profilecut, taper_a, revolutions, 
                        radiusoffset, skew] );

See also

Constants

Functions

Events