Skip to content

PRIM_TYPE_TORUS

constant
Constant
integer PRIM_TYPE_TORUS = 4;
Set with llSetLinkPrimitiveParamsFast
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
Get with llGetLinkPrimitiveParams, llGetPrimitiveParams
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
  1. integer hole_shape// Values: PrimTypeHole
  2. vector cut// Range <0,0,0> to <1,1,0>
  3. float hollow// Range 0–0.95
  4. vector twist// Range <-1,-1,0> to <1,1,0>
  5. vector hole_size// Range <0.05,0.05,0> to <1,0.5,0>
  6. vector top_shear// Range <-0.5,-0.5,0> to <0.5,0.5,0>
  7. vector advanced_cut// Range <0,0,0> to <1,1,0>
  8. vector taper// Range <-1,-1,0> to <1,1,0>
  9. float revolutions// Range 1–4
  10. float radius_offset
  11. float skew// Range -1–1
Other PrimType values (7)

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.

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
  • 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), or 0.70 when hole_shape is PRIM_HOLE_SQUARE1
  • vector twist — ranges 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)2
  • vector hole_size — x ranges from 0.05 to 1.0; y ranges from 0.05 (large hole) to 0.50 (no hole)3
  • vector top_shear — ranges from -0.5 to 0.5 for both x and y (z is ignored)4
  • vector advanced_cut — x and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)
  • vector taper — ranges from -1.0 to 1.0 for both x and y (z is ignored)5
  • float revolutions — ranges from 1.0 to 4.006
  • float radius_offset — depends on holesize.y and revolutions
  • float skew — ranges from -0.95 to 0.95; with more than 1.0 revolutions the magnitude is also raised to a minimum that grows with revolutions and hole_size.x7
From the LSL definitions: PrimTypeHole
integer PRIM_HOLE_DEFAULT = 0x00;  // Parameter used with certain PRIM_TYPE_* flags to make a hole of the same shape as the outer shape via the hole_shape parameterinteger PRIM_HOLE_CIRCLE = 0x10;  // Parameter used with certain PRIM_TYPE_* flags to make a circular hole via the hole_shape parameterinteger PRIM_HOLE_SQUARE = 0x20;  // Parameter used with certain PRIM_TYPE_* flags to make a squarish hole via the hole_shape parameterinteger PRIM_HOLE_TRIANGLE = 0x30;  // Parameter used with certain PRIM_TYPE_* flags to make a triangular hole via the hole_shape parameter
Example 1
// 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; //
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TYPE, PRIM_TYPE_TORUS, PRIM_HOLE_DEFAULT,
cut, hollow, twist, holesize, topshear,
profilecut, taper_a, revolutions,
radiusoffset, skew] );
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from PRIM TYPE TORUS, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.

  1. Viewer 746d768339: llmath/llvolume.cpp:71-73; llmath/llvolume.cpp:3550-3565 ↩

  2. Viewer 746d768339: llmath/llvolume.cpp:75-76; llprimitive/llprimitive.cpp:54-55 ↩

  3. Viewer 746d768339: llmath/llvolume.cpp:81-85 ↩

  4. Viewer 746d768339: llmath/llvolume.cpp:87-88; llmath/llvolume.cpp:3618-3621 ↩

  5. Viewer 746d768339: llmath/llvolume.cpp:93-94 ↩

  6. Viewer 746d768339: llmath/llvolume.cpp:90-91; llmath/llvolume.cpp:3645 ↩

  7. Viewer 746d768339: llmath/llvolume.cpp:96-97; llmath/llvolume.cpp:3704-3711 ↩