CreateBillboardGroup()

Syntax

Result = CreateBillboardGroup(#BillboardGroup, MaterialID, DefaultBillboardWidth, DefaultBillboardHeight [, x, y, z [, VisibilityMask [, Type]]])
Description
Creates a new empty billboard group.

Parameters

#BillboardGroup The number to identify the new billboard group. #PB_Any can be used to auto-generate this number.
MaterialID The material to use for all billboards added to this group, using the AddBillboard() function. To get a valid material id use MaterialID().
DefaultBillboardWidth The default width (in world units) of billboards added to this group. 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.
DefaultBillboardHeight The default height (in world units) of billboards added to this group. 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.
x, y, z (optional) The absolute position of the new billboard group in the world.
VisibilityMask (optional) A mask to select on which camera the billboard group should be displayed. If this mask match the mask specified in CreateCamera(), the billboard group will be displayed on the camera. See CreateEntity() to build correct masks. If this parameter is omitted or set to #PB_All, then the billboard group will be visible on all cameras.
Type (optional) The billboard type. It can be one of the following values:
  #PB_Billboard_Point: standard point billboard, always faces the camera completely and is always upright (default).
  #PB_Billboard_Oriented: billboards are oriented around a shared direction vector (used as Y axis) and only rotate around this to face the camera.
  #PB_Billboard_SelfOriented: billboards are oriented around their own direction vector (their own Y axis) and only rotate around this to face the camera.
  #PB_Billboard_Perpendicular: billboards are perpendicular to a shared direction vector (used as Z axis, the facing direction) and X, Y axis are determined by a shared up-vector.
  #PB_Billboard_SelfPerpendicular: billboards are perpendicular to their own direction vector (their own Z axis, the facing direction) and X, Y axis are determined by a shared up-vector.

Return value

Returns zero if the billboard group can't be created. If #PB_Any is used as '#BillboardGroup' parameter, the new billboard group number is returned.

See Also

FreeBillboardGroup(), AddBillboard(), BillboardGroupCommonDirection(), BillboardGroupCommonDirection()

Supported OS

All

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