Difference between revisions of "PRIM COLOR"

From Second Life Wiki
Jump to: navigation, search
m
m
Line 27: Line 27:
 
|i1_type=integer|i1_name=face
 
|i1_type=integer|i1_name=face
 
|i2_type=float|i2_name=color
 
|i2_type=float|i2_name=color
|i3_type=float|i3_name=alpha}}
+
|i3_type=float|i3_name=alpha
 
|toc=llSetPrimitiveParams
 
|toc=llSetPrimitiveParams
 +
}}
 
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([ {{#var:color_const}}, |i_end= ]);|
 
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([ {{#var:color_const}}, |i_end= ]);|
 
|r_front=Returns the list [ |r_end= ]
 
|r_front=Returns the list [ |r_end= ]

Revision as of 11:12, 23 May 2008

Description

Constant: integer PRIM_COLOR = 18;

The integer constant PRIM_COLOR has the value 18

Used to get or set the color and alpha of a prim's face.

llSetPrimitiveParams

[ PRIM_COLOR, integer face, float color, float alpha ]
• integer face face number or ALL_SIDES
• float color color in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white)
• float alpha from 0.0 (clear) to 1.0 (solid) (0.0 <= alpha <= 1.0)

When used with llSetPrimitiveParams & llSetLinkPrimitiveParams

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_COLOR, integer face ]);

Returns the list [ float color, float alpha ]

• integer face face number or ALL_SIDES

• float color color in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white)
• float alpha from 0.0 (clear) to 1.0 (solid) (0.0 <= alpha <= 1.0)

Caveats:

  • If face is ALL_SIDES then the PRIM_COLOR works on all sides.
  • If face indicates a face that does not exist the PRIM_COLOR return is [ ZERO_VECTOR, 0.0 ]

Related Articles

Functions

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

Events

•  changed

Articles

•  Color in LSL
•  Translucent Color

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_COLOR = 18;