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 to Result.

The specified material will be used by all the billboards that are added to the group. A valid 'MaterialID' can be easily obtained by using the MaterialID() function. 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() function, 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 (along with its associated 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 functions in this library.

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

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 function can be used to determing whether 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

All

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