Difference between revisions of "PRIM COLOR"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{#if: {{LSL_Constants/PrimitiveParams}} }}{{LSL Constant |name=PRIM_COLOR |type=integer |value=18 |desc=RGB |examples= |constants= |functions= {{LSL DefineRow||llSetPrimitiveParams|}}...)
 
Line 1: Line 1:
{{#if:
<onlyinclude>{{#if:{{#vardefine:return|[&nbsp;{{HoverLink|ZERO_VECTOR|{{LSL VR|0.0|0.0|0.0}} vector color}}, {{HoverText|0.0|float alpha}}&nbsp;]}}
{{LSL_Constants/PrimitiveParams}}
{{#vardefine:color_const|{{LSL Const|PRIM_COLOR|integer|18|c=Used to get/set the color and alpha of a prim's face}}}}
{{#vardefine:facetable|{{#var:facetable}}
{{!}}-
{{!}} [ {{#var:color_const}} ]
{{!}} {{#var:return}} }}
}}</onlyinclude>{{#if:
{{LSL_Function/color|color}}
{{LSL_Function/alpha|alpha}}
{{LSL_Function/face|face|{{#var:color_const}}|!footer=*|return={{#var:return}}}}
}}{{LSL Constant
}}{{LSL Constant
|name=PRIM_COLOR
|name=PRIM_COLOR
|type=integer
|type=integer
|value=18
|value=18
|desc=RGB
|desc=Used to get/set the color and alpha of a prim's face.
|examples=
|examples=
|constants=
|constants=
|pa={{LSL Constant/List|i_front=[&#32;{{#var:color_const}},&#32;|i_end=&nbsp;]
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]
|i1_type=integer|i1_name=face
|i2_type=float|i2_name=color
|i3_type=float|i3_name=alpha}}
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([&nbsp;{{#var:color_const}},&#32;|i_end=&nbsp;]);|
|r_front=Returns the list [&nbsp;|r_end=&nbsp;]
|text='''Caveats:'''
{{#var:caveats}}
|i1_type=integer|i1_name=face
|r1_type=float|r1_name=color
|r2_type=float|r2_name=alpha
}}
|functions=
|functions=
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}
Line 16: Line 37:
|location
|location
|cat1=Prim
|cat1=Prim
|cat2
|cat2=Color
|cat3
|cat3
|cat4
|cat4
}}
}}

Revision as of 14:56, 17 April 2008

Description

Constant: integer PRIM_COLOR = 18;

The integer constant PRIM_COLOR has the value 18

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

[ PRIM_COLOR, integer face, float color, float alpha ]

[ 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([ PRIM_COLOR, integer face ]);

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:

Caveats

All Issues ~ Search JIRA for related Bugs

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;