CreateBillboardGroup()

Syntax

Result = CreateBillboardGroup(#BillboardGroup, MaterialID, DefaultBillboardWidth, DefaultBillboardHeight [, x, y, z])
Description
Creates a new empty billboard group. If #PB_Any is used as '#BillboardGroup' parameter, the new billboard group number will be returned as 'Result'.

The specified material will be used by all the billboards that are added to the group. A valid 'MaterialID' can be easily got using the MaterialID() command. The default size of future billboards must be specified with the 'DefaultBillboardWidth' and 'DefaultBillboardHeight' parameters. Although the size of each billboard can be set separately with the ResizeBillboard() command, it is important to keep in mind that it will have a negative impact on performance if all billboards are not the same size. The optional x,y and z parameters can be specified to set the position of the newly created group in the world. If #BillboardGroup was already created, it will be automatically freed (with its belonging billboards) and replaced by the new one.

Parameters

#BillboardGroup - The number which you want to use to refer to the newly created billboard group in calls to the other commands in this library.

MaterialID - The ID number of the material to use for all billboards added to this group, using the AddBillboard() command. The material ID can easily found using the MaterialID() command.

DefaultBillboardWidth - The default width, in world units, of billboards added to this group.

DefaultBillboardHeight - The default height, in world units, of billboards added to this group.

The following three parameters are optional, but all must be specified together.

x - The absolute X position of the new billboard group, in the world.

y - The absolute Y position of the new billboard group, in the world.

z - The absolute Z position of the new billboard group, in the world.

Return value

Result - The value returned by this command is used to find out the billboard group could be created or not. If the value is zero then the billboard group could not be created. If the value is non-zero then it was created successfully.

Supported OS

Windows, Linux

<- CountBillboards() - Billboard Index - FreeBillboardGroup() ->