au3Irr2 Function Reference
_IrrAddMeshToSceneAsOcttreeAdds a mesh to the scene as a new 3D node, optimised with an Octtree.
#Include <au3Irrlicht2.au3>
_IrrAddMeshToSceneAsOcttree($h_Mesh)
Parameters
$h_Mesh | Handle of an mesh object |
Return Value
Success: Handle to the irrlicht node objectFailure: False
Remarks
This method optimise's the mesh with an Octtree, this is particularly useful for maps where there is a lot of geometry in the mesh but little of it can be seen at any one time.Optimizing your node with this function will result in a large increase in performance.
Related
None.
Example
#include "au3Irrlicht2.au3"
_IrrStart()
_IrrAddZipFile( "./media/map-20kdm2.pk3", $IRR_IGNORE_CASE, $IRR_IGNORE_PATHS )
$BSPMesh = _IrrGetMesh( "20kdm2.bsp" )
local $BSPNode = _IrrAddMeshToSceneAsOcttree( $BSPMesh )
local $camera = _IrrAddFPSCamera()
_IrrSetNodePosition( $camera, 1750, 149, 1369 )
WHILE _IrrRunning()
_IrrBeginScene(50, 50, 50)
_IrrDrawScene()
_IrrEndScene()
WEND
_IrrStop()