Adds a new object.
AW_CALLBACK_OBJECT_RESULT
AW_OBJECT_X specifies the east/west position of the object in centimeters, with west being positive. AW_OBJECT_Z specifies the north/south position of the object in centimeters, with north being positive. AW_OBJECT_Y specifies the altitude of the object in centimeters.
AW_OBJECT_YAW specifies the rotation around the y axis of the object in tenths of a degree.
In 3.3 or later worlds with AW_WORLD_ALLOW_3_AXIS_ROTATION enabled, AW_OBJECT_TILT specifies the rotation around the x axis, and AW_OBJECT_ROLL specifies the rotation around the z axis of the object.
If aw_object_add completes successfully, AW_OBJECT_NUMBER will contain the object number assigned automatically by the SDK. If you have the callback AW_CALLBACK_OBJECT_RESULT installed, AW_OBJECT_NUMBER will be set during the callback to indicate which object the callback is for. This can be useful in applications that issue multiple asynchronous building requests.
int rc;
aw_int_set (AW_OBJECT_X, 0);
aw_int_set (AW_OBJECT_Y, 0);
aw_int_set (AW_OBJECT_Z, 0);
aw_int_set (AW_OBJECT_YAW, 0);
aw_int_set (AW_OBJECT_TILT, 0);
aw_int_set (AW_OBJECT_ROLL, 0);
aw_string_set (AW_OBJECT_MODEL, "street1.rwx");
aw_string_set (AW_OBJECT_DESCRIPTION, "Cornerstone");
aw_string_set (AW_OBJECT_ACTION, "create sound xyz.mid");
if (rc = aw_object_add ())
printf ("Unable to add object (reason %d)\n", rc);
else
puts ("Object added");
aw_delete_all_objects
aw_object_change
aw_object_delete
aw_object_load