PRIM_TYPE_BOX
integer PRIM_TYPE_BOX = 0;llSetLinkPrimitiveParamsFastPRIM_TYPE, PRIM_TYPE_BOX, integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shearllGetLinkPrimitiveParams, llGetPrimitiveParamsPRIM_TYPE → PRIM_TYPE_BOX, integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shearinteger hole_shape// Values: PrimTypeHolevector cut// Range <0,0,0> to <1,1,0>float hollow// Range 0–0.95vector twist// Range <-1,-1,0> to <1,1,0>vector top_size// Range <0,0,0> to <2,2,0>vector top_shear// Range <-0.5,-0.5,0> to <0.5,0.5,0>
Other PrimType values (7)
PRIM_TYPE_BOX is a parameter of PRIM_TYPE used to make prim into a box and to change specific properties that define the shape of that box.
PRIM_TYPE, PRIM_TYPE_BOX, 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)1
- 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)2
- 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)3
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
Caveats
Section titled “Caveats”- z_taper and client values are different, the ranges do not line up, conversion is required. This simple equation can be used:
answer = 1.0 - value. See top_size Explained for more information.
Examples
Section titled “Examples”Example 1
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TYPE, PRIM_TYPE_BOX, 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 ]);Deep notes
Section titled “Deep notes”| Range | Top Tapered | No Tapering | Bottom Tapered | |
|---|---|---|---|---|
| Client | [-1, 1] | 1.0 | 0.0 | -1.0 |
PRIM_TYPE | [0, 2] | 0.0 | 1.0 | 2.0 |
The client’s taper and PRIM_TYPE’s top_size use different ranges. When bottom tapering was added in 2006, top_size was widened to [0, 2] while the client redefined taper as [-1, 1].
See also
Section titled “See also”Constants
Section titled “Constants”Functions
Section titled “Functions”Events
Section titled “Events”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.
Footnotes
Section titled “Footnotes”-
Viewer
746d768339:llmath/llvolume.cpp:71-72;llmath/llvolume.cpp:3550;llmath/llvolume.cpp:3565↩ -
Viewer
746d768339:llmath/llvolume.cpp:75-76;llprimitive/llprimitive.cpp:60-61↩ -
Viewer
746d768339:llmath/llvolume.cpp:87-88;llmath/llvolume.cpp:3618-3621↩