Function _IrrAddMayaCamera

au3Irr2

au3Irr2 Function Reference

_IrrAddMayaCamera

Adds a Maya style camera to into the scene.

#Include <au3Irrlicht2.au3>
_IrrAddMayaCamera($h_Node = $IRR_NO_OBJECT, $f_Rotate = 100.0, $f_Zoom = 100.0, $f_Move = 100.0)

 

Parameters

$h_Node Handle parent irr node, if no parent is needed then use $IRR_NO_OBJECT.
$f_Rotate Speed at which the camera revolves.
$f_Zoom Speed at which the camera zooms in and out.
$f_Move Speed at which the camera moves.

 

Return Value

Success: Handle of the camera object
Failure: False

 

Remarks

The user can click with the left, middle and right mouse buttons to move, zoom and rotate the camera.

 

Related

_IrrAddCamera, _IrrAddFPSCamera

 

Example


#include "au3Irrlicht2.au3"

Global $hMD2Mesh, $hMeshTexture, $hSceneNode, $hMayaCamera

_IrrStart()

$hMD2Mesh = _IrrGetMesh("./media/zumlin.md2")
$hMeshTexture = _IrrGetTexture("./media/zumlin.pcx")
$hSceneNode = _IrrAddMeshToScene($hMD2Mesh)
_IrrSetNodeMaterialTexture($hSceneNode, $hMeshTexture, 0)
_IrrSetNodeMaterialFlag($hSceneNode, $IRR_EMF_LIGHTING, $IRR_OFF)

$hMayaCamera = _IrrAddMayaCamera($hSceneNode)
_IrrSetCameraTarget($hMayaCamera, 0, 0, 0)

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

_IrrStop()