Wiki Markup |
---|
h2. Name
*acp* — Set actor properties by actor number {alias:acp}
h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}
*acp* \[\* | *id* _actorid_] \[*del | opa | vis | ambient | diffuse | specular | power*]
{panel}
h2. Description
Graphics is made up by actors. One can toggle actors on and off or assign new graphical properties to them. The *acp* command tells how to assign new properties to an actor.
h2. Arguments
*\**
{indent}Operation is performed on last actor.
{indent}
*id* _actorid_
{indent}Operation is performed on actor id _actorid_. The actor-id actorid can be kept by setting a variable like this: set act_id [gvar actorid] after a display command.
{indent}
*del*
{indent}Delete the actor with id actorid.
{indent}
*opa* _value_
{indent}Opacity of the actor. The value is from 0.0 to 1.0 where 1.0 is fully visible.
{indent}
*vis 0 | 1*
{indent}Visibility of the actor. Visibility is 1 (=on) or 0 (=off).
{indent}
*ambient* _value_
{indent}Ambient light value between 0 and 1.
{indent}
*diffuse* _value_
{indent}Diffuse light value between 0 and 1.
{indent}
*specular* _value_
{indent}Specular light value between 0 and 1.
{indent}
*power* _value_
{indent}Power light value between 0 and 1.
{indent}
h2. Examples
h3. Ex.1: Display two grids and set low opacity on the first
{noformat:|borderWidth=1|bgColor=#eeeeee}
z ; # erase the screen
spe bgc whi ; # specify background color white
win 450000 460000 6450000 6460000 1000 3000 ; # specify the grid window
mak ran 11 ; # make 11 random points
grp 100 100 ; # grid with 100 x 100 in rows and columns.
col red ; # set red color
dis ; # display in solid
set actor_id [gvar actorid]
mak ran 11 ; # make 11 random points
grp 100 100 ; # grid with 100 x 100 in rows and columns.
col gre ; # set green color
dis ; # display in solid
acp id $actor_id opa .4 ; # set opacity .4 on the first grid
{noformat}
!att:_img_ref^cmd_acp.png|border=1!
_The above example produces this image of the two grids_
h2. See also
[spe act|spe - Specify parameters]
{pagebreak} |
Page Comparison
General
Content
Integrations