Difference between revisions of "Prims"
Jump to navigation
Jump to search
Gally Young (talk | contribs) m (add link to primitve) |
m (that's the one that needs to be merged with Primitive) |
||
Line 1: | Line 1: | ||
{{Otheruses4|primitives|[[LSL]] related information|:Category:LSL Prim}} | |||
The '''prims definition''' can be found [[primitive|here]]. | The '''prims definition''' can be found [[primitive|here]]. | ||
Revision as of 03:42, 24 April 2009
The prims definition can be found here.
Introduction
Primitives in Second Life are constructed by starting with a basic two dimensional shape, modifying it, and extruding it in to the third dimension along a path while applying modifications to the extrusion. The most basic example is a cube which starts out as a 2D square and extrudes along a linear path with no modifications to make a cube. A cylinder starts out as as circle and extrudes along the same linear path. If the circle was extruded along a circular path you would create a ring, and if a half-circle is extruded along another type of circular path you create a sphere.
2D Shape (Profile)
- ProfileCurve
- Two combined enums: the lower 4 bits define the outer profile shape, and the high 4 bits define the type of hole if ProfileHollow is non-zero
Profile Shape: Circle = 0x00 Square = 0x01 Isometric Triangle = 0x02 Equilateral Triangle = 0x03 Right Triangle = 0x04 Half Circle = 0x05
Hole Shape: Same = 0x00 Circle = 0x10 Square = 0x20 Triangle = 0x30
2D Shape (Profile) Modifications
- ProfileBegin
- Where the cut (if any) in the profile begins
- ProfileEnd
- Where the cut (if any) in the profile ends
- ProfileHollow
- How much of the profile is hollowed out, as a percent of the original bounding box. If non-zero this creates a hole using the shape defined in the higher bits of ProfileCurve
Extrusion (Path)
- PathCurve
- Enum for the extrusion path. For whatever reason only the upper bits are used in this field:
Line = 0x10 Circle = 0x20 Circle2 = 0x30 Test = 0x40 // ??? Flexible = 0x80
Extrusion (Path) Modifications
- PathBegin
- PathEnd
- PathScaleX
- PathScaleY
- PathShearX
- PathShearY
- PathTwistBegin
- PathTwist
- PathRadiusOffset
- PathTaperX
- PathTaperY
- PathRevolutions
- PathSkew