Function _IrrAddBillBoardByAxisToGroup

au3Irr2

au3Irr2 Function Reference

_IrrAddBillBoardByAxisToGroup

Adds a billboard to a billboard group that is fixed to a particular axis.

#Include <au3Irrlicht2.au3>
_IrrAddBillBoardByAxisToGroup($h_BillboardGroup, $f_XSize, $f_YSize, $f_XPos, $f_YPos, $f_ZPos, $f_Roll, $u_Alpha, $u_Red , $u_Green, $u_Blue, $f_XAxis, $f_YAxis, $f_ZAxis)

 

Parameters

$h_BillboardGroup Handle to the Billboard Group as returned by _IrrAddBillBoardGroupToScene
$f_XSize Width of the billboard
$f_YSize Height of the billboard
$f_XPos X position of the billboard
$f_YPos Y position of the billboard
$f_ZPos Z position of the billboard
$f_Roll Specifies the number of degrees that the billboard is spun around its center
$u_Alpha Alpha color used for the billboard 0 - 255
$u_Red Red color used for the billboard 0 - 255
$u_Green Green color used for the billboard 0 - 255
$u_Blue Blue color used for the billboard 0 - 255
$f_XAxis X direction around which the billboard is spun to face the camera.
$f_YAxis Y direction around which the billboard is spun to face the camera.
$f_ZAxis Z direction around which the billboard is spun to face the camera

 

Return Value

Success: Handle to the billbord scene node address in the billbord group
Failure: False and @error 1

 

Remarks

These billboards are particularly useful for things like grass.
There are a number of properties that are used to specify the billboard.

 

Related

_IrrAddBillBoardGroupToScene, _IrrRemoveBillBoardFromGroup, _IrrGetBillBoardGroupCount, _IrrBillBoardForceUpdate

 

Example


#include "au3Irrlicht2.au3"

Global $hBillboardGroup
Global $hBillboardTexture
Global $aBillboard[6]
Global $hCamera

_IrrStart()

$hBillboardGroup = _IrrAddBillBoardGroupToScene()
For $i = 1 To 5
    $aBillboard[$i] = _IrrAddBillBoardByAxisToGroup($hBillboardGroup, 150, 100, -450 + ($i * 150), 0, 400, 0, 255, 255, 255, 255, 0, 1, 0)
Next
$hBillboardTexture = _IrrGetTexture("./media/au3irr2_logo.jpg")
_IrrSetNodeMaterialTexture($hBillboardGroup, $hBillboardTexture, 0)
_IrrSetNodeMaterialFlag($hBillboardGroup, $IRR_EMF_LIGHTING, $IRR_OFF)

$hCamera = _IrrAddFPSCamera($IRR_NO_OBJECT, 100.0, 0.1)
_IrrSetCameraClipDistance($hCamera, 128000)

_IrrHideMouse()

While _IrrRunning() And Sleep(10)
    _IrrBeginScene(0, 0, 255)
    _IrrDrawScene()
    _IrrEndScene()
WEnd