Aw float set

From ActiveWiki
Jump to navigation Jump to search


Minimum requirements
Added in version 2.1
SDKbuild 13


int aw_float_set (AW_ATTRIBUTE a, float value);

Description

Sets a floating point attribute.

Callback

None (returns immediately)

Arguments

a
Attribute (defined in Aw.h).
value
Value to set.

Argument attributes

None

Return values

RC_SUCCESS
RC_NOT_INITIALIZED
RC_NO_INSTANCE
RC_READ_ONLY
RC_INVALID_ATTRIBUTE
RC_TYPE_MISMATCH
Not a floating point attribute.

Returned attributes

None

Usage

Set the world's directional light to point straight up.

int rc;

aw_float_set (AW_WORLD_LIGHT_X, 0.0f);
aw_float_set (AW_WORLD_LIGHT_Y, -1.0f);
aw_float_set (AW_WORLD_LIGHT_Z, 0.0f);

rc = aw_world_attributes_change ();
if (rc != RC_SUCCESS)
  printf ("Unable to change world attributes (reason %d)\n", rc);

See also