# IrrlichtWrapper for PureBasic

Authors :

## Michael Taupitz (neotoma)

## Marius Eckardt (Thalius)

## Frank Dodd (initial version)

This is the documentation for the IrrlichtWrapper. It wrapps the great Irrlicht-Engine, so it can be used by PureBasic.

- 2D

- Irr2DFontDraw - Draw Text to the Display.
- IrrAddTextureFromImage - Create a Texture from an Irrlicht Image
- IrrChangeTextureAlpha - Changes the Alpha
- IrrColorKeyTexture - Color Key the Image
- IrrColorKeyTextureFromPoint - Color Key the Image
- IrrCreateImageFromData - Create an Irrlicht Image from Memory
- IrrDraw2DImage - Draw the Image
- IrrDraw2DImageElement - Draws a part of a texture into the rectangle optionally using a alpha and color.
- IrrGetCellTabledTexture - Get a Texture from a Cell
- IrrGetFont - Load a Bitmap based Font.
- IrrGetTexture - Load a Texture
- IrrImageBitsPerPixel - Returns the BitDepth of an Irrlicht Image.
- IrrImageBytesPerPixel - Returns bytes per pixel of an Irrlicht Image.
- IrrImageDataSizeInBytes - Returns image data size in bytes.
- IrrImageDataSizeInPixels - Returns image data size in pixels.
- IrrImageGetColorFormat - Returns the Colorformat of an Irrlicht Image
- IrrImageGetPitch - Returns pitch of image
- IrrImageGetPixel - Returns a pixel
- IrrImageHeight - Returns the Height of an Irrlicht Image.
- IrrImageLock - Lock an Irrlicht Image
- IrrImageUnLock - UnLock an Irrlicht Image
- IrrImageWidth - Returns the Width of an Irrlicht Image.
- IrrLoadCellTabledTexture - Load a Cell
- IrrRemoveCellTabledTexture - Removes a Cell
- IrrTextureGetColorFormat - Returns the color format of texture.
- IrrTextureGetDriverType - Returns driver type of texture.
- IrrTextureGetName - Returns name of texture.
- IrrTextureGetPitch - Returns pitch of texture in bytes.
- IrrTextureHasMipMaps - Returns whether the texture has MipMaps.
- IrrTextureHeight - Returns height of the Texture.
- IrrTextureLock - Lock function.
- IrrTextureOriginalHeight - Returns original height of the Texture.
- IrrTextureOriginalWidth - Returns original width of the Texture.
- IrrTextureRegenerateMipMaps - Regenerates the mip map levels of the texture.
- IrrTextureUnlock - Unlock function.
- IrrTextureWidth - Returns width of the Texture.

- Animation

- IrrGetNodeAnimationFrame - Returns the current displayed frame number.
- IrrPlayNodeMD2Animation - Starts a default MD2 animation
- IrrPlayNodeMD2AnimationByName - Starts a named MD2 animation
- IrrSetNodeAnimationFrame - Sets the current frame number
- IrrSetNodeAnimationLooped - Sets looping mode
- IrrSetNodeAnimationRange - set the frames to playback in the animation
- IrrSetNodeAnimationSpeed - set the playback animation speed

- Animators

- IrrAddCallbackAnimator - add a callback animator to a node
- IrrAddCollisionAnimator - Adds a collision animator to a node
- IrrAddDeleteAnimator - deletes the node after the specified number of milliseconds
- IrrAddFlyCircleAnimator - fly circular path.
- IrrAddFlyStraightAnimator - fly straight path.
- IrrAddRotationAnimator - rotate node
- IrrAddSplineAnimator - add a spline animator to a node
- IrrAddTextureAnimator - add a texture animator to a node
- IrrRemoveAnimator - remove an animator from a node

- AnimSprite

- IrrAddAnimSprite - Adds a AnimSprite
- IrrAnimSpriteCatch - Catch a Image/Texture for AnimSprite
- IrrAnimSpriteDraw - Draw the Sprite at the Position and Scale
- IrrAnimSpriteGetLoop - Get animation loop
- IrrAnimSpriteGetMaxFrames - Get Number of Frames
- IrrAnimSpriteGetSize - Get the Size of the Sprite
- IrrAnimSpriteGetSpeed - Get animation speed
- IrrAnimSpriteLoad - Load Image/Texture for AnimSprite
- IrrAnimSpritePlayBackward - Set playing
- IrrAnimSpritePlayForward - Set playing
- IrrAnimSpriteResetLoop - reset animation
- IrrAnimSpriteSetColor - Set the Color
- IrrAnimSpriteSetFrame - set animation to a frame
- IrrAnimSpriteSetLoop - Set animation to loop / no loop
- IrrAnimSpriteSetPosition - Set the Position of the Anim
- IrrAnimSpriteSetScaleToRect - Set the Scaling/Rect of the Anim
- IrrAnimSpriteSetSpeed - Set animation speed
- IrrAnimSpriteSetStartEndFrame - Define the Range of the Animation

- Camera

- IrrAddCamera - add a camera to the scene
- IrrAddCameraMaya - add a maya
- IrrAddFPSCamera - add a basic first person perspective camera to the scene
- IrrGetCameraAspectRatio - Get the aspect ratio
- IrrGetCameraClipDistance - get the distance at which the camera starts to clip polys
- IrrGetCameraFOV - gets the field of view
- IrrGetCameraNearValue - Get the value of the near clipping plane.
- IrrGetCameraOrthogonal - Returns if a camera is orthogonal.
- IrrGetCameraTarget - get the lookat
- IrrGetCameraUpVector - Get the up vector of the camera.
- IrrSetActiveCamera - set the active camera in the scene
- IrrSetActiveCamera - get the active camera in the scene
- IrrSetCameraAspectRatio - Sets the aspect ratio
- IrrSetCameraClipDistance - set the distance at which the camera starts to clip polys
- IrrSetCameraFOV - sets the field of view
- IrrSetCameraNearValue - Sets the value of the near clipping plane.
- IrrSetCameraOrthogonal - Sets if this camera should return if it is orthogonal.
- IrrSetCameraTarget - change lookat
- IrrSetCameraUpVector - Sets the up vector of the camera.

- Collision

- IrrAddCollisionGroupToCombination - Adds a collision object to group of collision objects
- IrrCreateCombinedCollisionGroup - creates a meta
- IrrGetCollisionGroupFromBox - creates a collision selector from triangles in a nodes bounding box
- IrrGetCollisionGroupFromComplexMesh - creates a collision selector from a complex Node like a Map
- IrrGetCollisionGroupFromTerrain - creates a collision selector from a terrain node
- IrrRemoveAllCollisionGroupsFromCombination - remove all triangle selectors from the meta selector

- Events

- IrrGuiEventAvailable - discover if a gui event is available
- IrrKeyEventAvailable - Determine if a key event is available
- IrrMouseEventAvailable - Discover if a mouse event is available
- IrrReadGuiEvent - discover if a gui event is available
- IrrReadKeyEvent - read the oldest key event in the buffer
- IrrReadMouseEvent - Read the oldest mouse event in the buffer

- Examples

- 01_HelloWorld -

- Filing

- IrrAddPakFile - Adds an pak archive to the file system.
- IrrAddUnzipFile - Adds an unzipped archive to the file system.
- IrrAddZipFile - Adds an zip archive to the file system.
- IrrChangeWorkingDirectory - set irrlicht current working directory
- IrrGetWorkingDirectory - get irrlicht current working directory

- FX

- IrrFXCreateDreamFilter - Create DreamEffect.
- IrrFXCreateGlow - Create GlowingEffect.
- IrrFXCreateNightVision - Create NightVision
- IrrFXRenderDreamFilter - Render DreamEffect.
- IrrFXRenderGlow - Create GlowingEffect.
- IrrFXRenderNightVision - Render NightVision

- GUI

- IrrDisplayMouse - show and hide the mouse pointer
- IrrGuiAddButton - Adds a button.
- IrrGuiAddCheckBox - Adds a checkbox.
- IrrGuiAddComboBox - Adds a ComboBox.
- IrrGuiAddContextMenu - Adds a ContextMenu
- IrrGuiAddEditBox - Adds a EditBox.
- IrrGuiAddFileOpenDialog - Adds a FileOpenDialog.
- IrrGuiAddImage - Adds a Image.
- IrrGuiAddImageFromFile - Adds a Image with a Texture
- IrrGuiAddImageFromTexture - Adds a Image with a Texture
- IrrGuiAddInOutFader - Element for fading out or in.
- IrrGuiAddListBox - add a ListBox object to the GUI
- IrrGuiAddMenu - add a Menu object to the GUI
- IrrGuiAddMessageBox - add a MessageBox object to the GUI
- IrrGuiAddScrollBar - add a ScrollBar object to the GUI
- IrrGuiAddStaticText - Adds a static text.
- IrrGuiAddTab - add a Tab object to the GUI
- IrrGuiAddTabControl - add a TabControl object to the GUI
- IrrGuiAddToolBar - add a ToolBar object to the GUI
- IrrGuiAddWindow - add a Window object to the GUI
- IrrGuiButtonGetUseAlphaChannels - Returns if the alpha channel
- IrrGuiButtonIsPressed - Returns if the button is currently pressed.
- IrrGuiButtonSetImage - Sets an image
- IrrGuiButtonSetImage2 - Sets an image
- IrrGuiButtonSetIsPushButton - Sets if the button should behave like a push button.
- IrrGuiButtonSetOverrideFont - Sets another skin independent font
- IrrGuiButtonSetPressed - Sets the pressed state
- IrrGuiButtonSetPressedImage - Sets an image
- IrrGuiButtonSetPressedImage2 - Sets an image
- IrrGuiButtonSetUseAlphaChannel - Sets if the alpha channel should be used
- IrrGuiCheckBoxIsChecked - Returns #true if box is checked.
- IrrGuiCheckBoxSetChecked - Set checked state
- IrrGuiComboBoxAddItem - adds an item and returns the index of it
- IrrGuiComboBoxClear - deletes all items in the combo box
- IrrGuiComboBoxGetItem - returns string of an item
- IrrGuiComboBoxGetItemCount - Returns amount of items in box.
- IrrGuiComboBoxGetSelected - returns id of selected item.
- IrrGuiComboBoxSetSelected - sets the selected item.
- IrrGuiCreateSkin - Creates a new GUI Skin based on a template
- IrrGuiFaderFadeIn - Starts the fade in process.
- IrrGuiFaderFadeOut - Starts the fade out process.
- IrrGuiFaderGetColor - Gets the color
- IrrGuiFaderIsReady - Is process done
- IrrGuiFaderSetColor - Sets the color
- IrrGuiGetRootGUIElement - returns the gui rootelement
- IrrGuiGetSkin - Returns pointer to the current gui skin.
- IrrGuiGetText - get text of an element
- IrrGuiSetSkin - set the current gui skin.
- IrrGuiSetText - Set text for a GUI

- IrrKlang

- IrrKlangAddSound - Adds sound source
- IrrKlangCatchSound - Adds sound source from memory
- IrrKlangGetDefault3DSoundMaxDistance - Returns the default maximal distance for 3D sounds.
- IrrKlangGetDefault3DSoundMinDistance - Returns the default minimal distance for 3D sounds.
- IrrKlangGetSoundSource - Get the SoundSource by Index
- IrrKlangGetSoundSourceByName - Get the SoundSource by Name
- IrrKlangGetSoundSourceCount - returns amount of loaded sound sources
- IrrKlangGetSoundVolume - Get the volume level from 0 to 1
- IrrKlangIsCurrentlyPlaying - Returns if a sound with the specified source is currently playing.
- IrrKlangIsCurrentlyPlayingByName - Returns if a sound with the specified name is currently playing.
- IrrKlangIsMultiThreaded - Returns if irrKlang is running in the same thread as the application or is using multithreading.
- IrrKlangListenerPosition - Set the Listener 3D position
- IrrKlangPlay2D - plays a sound
- IrrKlangPlay3D - plays a 3D sound
- IrrKlangRemoveAllSoundSources - Removes all sound sources from the engine.
- IrrKlangRemoveSoundSource - Removes a sound source from the engine
- IrrKlangSetAllSoundsPaused - pauses or unpauses all currently playing sounds
- IrrKlangSetDefault3DSoundMaxDistance - Sets the default maximal distance for 3D sounds.
- IrrKlangSetDefault3DSoundMinDistance - Sets the default minimal distance for 3D sounds.
- IrrKLangSetSoundVolume - Set the volume level from 0 to 1
- IrrKlangSoundGetIsPaused - returns if the sound is paused
- IrrKlangSoundGetMaxDistance - Returns the maximal distance
- IrrKlangSoundGetMinDistance - Returns the minimal distance
- IrrKlangSoundGetPan - returns the pan of the sound
- IrrKlangSoundGetPlayLength - returns the play length of the sound
- IrrKlangSoundGetPlayPosition - returns the current play position of the sound
- IrrKlangSoundGetPosition - returns the position of the sound in 3d space
- IrrKlangSoundGetSoundSource - returns source of the sound
- IrrKlangSoundGetVolume - returns volume of the sound
- IrrKlangSoundIsFinished - returns if the sound has finished playing.
- IrrKlangSoundIsLooped - returns if the sound has been started to play looped
- IrrKlangSoundSetIsPaused - set the sound to paused or unpaused
- IrrKlangSoundSetMaxDistance - Sets the maximal distance if this is a 3D sound.
- IrrKlangSoundSetMinDistance - Sets the minimal distance if this is a 3D sound.
- IrrKlangSoundSetPan - sets the pan of the sound
- IrrKlangSoundSetPosition - sets the position of the sound in 3d space
- IrrKlangSoundSetVolume - sets the volume of the sound (0.0
- IrrKlangSoundStop - Will stop the sound and free its resources.
- IrrKlangSSForceReloadAtNextUse - Forces the sound to be reloaded at next replay.
- IrrKlangSSGetDefaultMaxDistance - returns the default maxmial distance
- IrrKlangSSGetDefaultMinDistance - returns the default minmial distance
- IrrKlangSSGetForcedStreamingForceThreshold - Returns the threshold size
- IrrKlangSSGetName - returns the name of the sound source (usually, this is the file name)
- IrrKlangSSGetPlayLength - returns the play length of the sound in milliseconds.
- IrrKlangSSGetStreamMode - returns the detected or set type of the sound
- IrrKlangSSSetDefaultMaxDistance - sets the default maximal distance for 3D sounds
- IrrKlangSSSetDefaultMinDistance - sets the default minimal distance for 3D sounds
- IrrKlangSSSetForcedStreamingThreshold - Sets the threshold size
- IrrKlangStart - Load a Texture
- IrrKlangStop - Stop/Delete IrrKlang
- IrrKlangStopAllSounds - Stop all sounds

- Irrlicht

- IrrBeginScene - Start Rendering
- IrrCreateEventReceiver - Create a Callback
- IrrCreateRenderTargetTexture - Creates a render target texture.
- IrrDestroyEventReceiver - Destroy a EventReceiver
- IrrDrawGUI - Draw the GUI
- IrrDrawScene - Draw the Scene
- IrrEndScene - Ends the Rendering
- IrrGetCursorPosition - Get position of the Cursor
- IrrGetCursorRelativePosition - Get position of the Cursor
- IrrGetDesktopDepth - Return the Desktop
- IrrGetDesktopResolution - Return the Desktop
- IrrGetEventReceiver - Get current EventReceiver
- IrrGetExposedVideoData - Get the video datas
- IrrGetFPS - Frames per Second
- IrrGetPrimitivesDrawn - Drawn primitives
- IrrGetPrimitivesDrawn - Setw Window Caption
- IrrGetVersion - Returns the version of the engine.
- IrrGetVideoModeCount - Returns amount of video modes.
- IrrGetVideoModeDepth - Returns the depth of a video mode.
- IrrGetVideoModeResolution - Returns the depth of a video mode.
- IrrGetViewPort - Gets the viewport.
- IrrIsWindowActive - Returns if the window is active.
- IrrPostEventFromUser - Post a User
- IrrQueryFeature - Queries the features of the driver.
- IrrRunning - Is Irrlicht alive
- IrrSaveScreenshot - Saves the Scene as Image
- IrrSetEventReceiver - Set the current EventReceiver
- IrrSetRenderTarget - Creates a render target texture.
- IrrSetResizeAble - Enable or Disable Resizing the Window
- IrrSetTextureCreationFlag - Enables or disables a texture creation flag.
- IrrSetViewPort - Sets a new viewport.
- IrrStart - Start the Irrlicht
- IrrStartEx - Start the Irrlicht
- IrrStop - Stops Irrlicht
- IrrWinGetHWnd - Get the Window

- IrrlichtWrapper

- IrrDropPointer - Drops a Pointer of a Irrlicht

- Light

- IrrAddLight - Adds a dynamic light scene node to the scene graph.
- IrrGetLightRadius - get the radius of the light.
- IrrSetAmbientLight - Sets the dynamic ambient light color.
- IrrSetLightAmbientColor - Sets the ambient light color.
- IrrSetLightDiffuseColor - Sets the diffuse light color.
- IrrSetLightPosition - Sets the position of the light
- IrrSetLightRadius - set the radius of the light.
- IrrSetLightSpecularColor - Sets the specular light color.
- IrrSetLightType - Sets the light type

- Mesh

- IrrCreateMesh - Create a own Mesh
- IrrGetMesh - Load a Mesh
- IrrGetMeshIndexCount - get Mesh
- IrrGetMeshVertexCount - Get count of Vertices
- IrrGetMeshVertices - Get Vertices
- IrrGetStaticFromMesh - Get the Static of a Animated Mesh
- IrrMakePlanarTextureMapping - Creates a planar texture mapping on the mesh.
- IrrRemoveMesh - remove a mesh
- IrrSetMeshIndices - Set Indices
- IrrSetMeshVertices - Set Vertices

- Nodes

- IrrAddChildToParent - Get the Joint as Node
- IrrAddNodeShadow - add a stencil shadow to an node
- IrrCloneNode - clone node
- IrrDebugDataVisible - change debuginfo for this node
- IrrGetB3DJointNode - Get the Joint as Node
- IrrGetDirectXJointNode - Get the Joint as Node
- IrrGetMS3DJointNode - Get the Joint as Node
- IrrGetNodeAbsolutePosition - Get absolute position of the Node
- IrrGetNodeCenter - Get the Center of a Node
- IrrGetNodeCenterTransformed - Get the Center of a Node
- IrrGetNodeChildAt - Get a child at a position in list
- IrrGetNodeChildCount - returns the number of Cilds for the node
- IrrGetNodeExtent - returns extend of the node
- IrrGetNodeExtentTransformed - returns extend of the node
- IrrGetNodeID - get the ID of this node
- IrrGetNodeMaterial - get the material
- IrrGetNodeMaterialCount - get the material count
- IrrGetNodeName - get the Name of this node
- IrrGetNodeParent - get the parent of this node
- IrrGetNodePosition - Get position of the Node
- IrrGetNodeRotation - Get rotation of the Node
- IrrGetNodeScale - Get scale of the Node
- IrrGetNodeVisibility - get whether a node is visible or not
- IrrGetToTargetPitchRoll - get the material count
- IrrIsNodeDebugData - returns the debugFlag
- IrrMoveNodeForward - moves a node forward to the direction it faces
- IrrMoveNodeRight - moves a node right
- IrrMoveNodeUp - moves a node up
- IrrRemoveAllChilds - removes all childs of a SceneNode
- IrrRemoveNode - delete this node from the scene
- IrrRotateNodeByCenter - rotates around a point
- IrrRotateNodeByNode - rotates around a other node
- IrrSetNodeAllMaterialAmbientColor - change the Ambient
- IrrSetNodeAllMaterialDiffuseColor - change the Shinines
- IrrSetNodeAllMaterialEmissiveColor - change the Emissive
- IrrSetNodeAllMaterialShininess - change the Shinines
- IrrSetNodeAllMaterialSpecularColor - change the Specular
- IrrSetNodeAutomaticCulling - Enables or disables automatic culling based on the bounding box
- IrrSetNodeDebugData - Sets if debug data like bounding boxes should be drawn.
- IrrSetNodeID - set the ID of this node
- IrrSetNodeMaterialFlag - Sets Material flag
- IrrSetNodeMaterialShininess - set the shininess of a material
- IrrSetNodeMaterialTexture - Sets the texture
- IrrSetNodeMaterialType - Sets Material type
- IrrSetNodeName - set the Name of this node
- IrrSetNodePosition - Sets position of the Node
- IrrSetNodeRotation - Sets rotation of the Node
- IrrSetNodeScale - Sets scale of the Node
- IrrSetNodeVertexColors - Sets the alpha vertex color value
- IrrSetNodeVisibility - set whether a node is visible or not

- Particles

- IrrAddGravityParticleAffector - Add an affector to the particle system to alter their position with gravity
- IrrAddParticleCylinderEmitter - Add a Cylinder
- IrrAddParticleEmitter - Add an ParticleEmitter
- IrrAddParticleRingEmitter - Add a Ring
- IrrAddParticleSphereEmitter - Add a Sphere
- IrrAddRotationParticleAffector - Add an affector to rotate the particle around a pivot
- IrrAddStopParticleAffector - Add an affector to the particle system to stop emitting
- IrrRemoveAffectors - Remove all Affectors
- IrrSetParticleSize - set the size of a particle in the particle system

- Physics

- IrrPhysicsAddDynamicCube - add a dynamic cube
- IrrPhysicsAddDynamicSphere - add a dynamic sphere
- IrrPhysicsAddMesh - add a Mesh
- IrrPhysicsAddStaticCube - add a static cube
- IrrPhysicsAddStaticMesh - add a static Mesh
- IrrPhysicsAddStaticSphere - add a static sphere
- IrrPhysicsAddTerrain - add a Terrain
- IrrPhysicsClose - close physics engine
- IrrPhysicsInit - init physics engine
- IrrPhysicsUpdate - update physics world

- Scene

- IrrAddBillBoardToScene - Adds a Billboard
- IrrAddConeSceneNode - Add a Cone
- IrrAddCubeSceneNode - Add a Cube
- IrrAddCylinderSceneNode - Add a Cylinder
- IrrAddDiamondSceneNode - Add a Diamant
- IrrAddEmptySceneNode - Add a TextSceneNode
- IrrAddHillPlaneMesh - Add a HillPlane
- IrrAddHillPlaneSceneNode - Add a Plane with Hills...
- IrrAddLensFlareSceneNode - Add a Lensflare
- IrrAddMeshToScene - Add a loaded Mesh to the Irrlicht SceneManager
- IrrAddMeshToSceneAsOcttree - Adds a Mesh as Octtree
- IrrAddParticleSystemExtToScene - Adds a Extended Particle
- IrrAddParticleSystemToScene - Adds a Particle
- IrrAddPlaneSceneNode - Add a Plane
- IrrAddSkyBoxToScene - Add a skybox to the irrlicht based on six pictures
- IrrAddSkyDomeToScene - Add a SkyDome
- IrrAddSphereSceneNode - Add a Sphere
- IrrAddTextSceneNode - Add a TextSceneNode
- IrrAddWaterSceneNode - Add a WaterSceneNode
- IrrClearScene - Clears the Scene
- IrrGetMeshIndices - Get Indices
- IrrGetRootSceneNode - Returns the Root
- IrrGetSceneNodeFromId - Returns the ScenenNode for this ID
- IrrGetSceneNodeFromName - Returns the ScenenNode for this Name
- IrrLoadScene - Loads a scene.
- IrrSaveScene - Saves the current scene into a file.
- IrrSetFog - Sets the fog mode.
- IrrSetShadowColor - Sets the color of stencil buffers shadows

- Terrain

- IrrTerrainGetCenter - Returns center of terrain.
- IrrTerrainGetIndexCount - Returns the number of indices
- IrrTerrainHeight - Get the Height of a point.
- IrrTerrainOverrideLODDistance - Override the default generation of distance thresholds.
- IrrTerrainSetCameraMovementDelta - Sets the movement camera threshold.
- IrrTerrainSetCameraRotationDelta - Sets the rotation camera threshold.
- IrrTerrainSetDynamicSelectorUpdate - Update its associated selector when change
- IrrTerrainSetLODOfPatch - Manually sets the LOD of a patch.

- XML

- IrrXmlCreateReader - Creates a XML Reader from a file
- IrrXmlFreeReader - Frees a XML
- IrrXmlGetAttributeCount - retrieves the Attribute
- IrrXmlGetAttributeName - retrieves the Attribute
- IrrXmlGetAttributeValue - retrieves the Attribute
- IrrXmlGetAttributeValueByName - retrieves the Attribute
- IrrXmlGetNodeData - retrieves the Node
- IrrXmlGetNodeName - retrieves the Node
- IrrXmlGetNodeType - retrieves the Node
- IrrXmlIsEmptyElement - checks if this Element is Empty
- IrrXmlRead - Read next xml