| Irrlicht.B3D: | Constants | Functions | Types | Modinfo | Source |

# iB3D: Blitz3D-style command set for Irrlicht.Core

## Constants Summary

CT_FPS , CT_MAYA , CT_NORMAL , IB3D_MOUSE_LEFT , IB3D_MOUSE_MIDDLE , IB3D_MOUSE_RIGHT , PM_BOX , PM_POLYGON , PM_SPHERE , PM_UNPICKABLE

## Functions Summary

FloatToFixedPoint | Retruns a float trimmed to a certain of decimal places.
ib3d_AddTriangle |
ib3d_AddVertex |
ib3d_AddZipFileArchive | Adds an zip archive to the file system.
ib3d_AmbientLight | Sets the ambient lighting color.
ib3d_CameraAspectRatio | Sets the aspect ratio for the camera.
ib3d_CameraClsColor | Sets camera background color.
ib3d_CameraClsMode | Sets the camera clear mode.
ib3d_CameraFogColor | Sets the camera fog color.
ib3d_CameraFogDensity |
ib3d_CameraFogMode | Sets the camera fog mode.
ib3d_CameraFogRange | Sets the camera fog range.
ib3d_CameraPick | Picks the entity positioned at the specified viewport coordinates.
ib3d_CameraProject | Projects the world coordinates x,y,z onto the screen.
ib3d_CameraProjMode | Sets the camera projection mode.
ib3d_CameraRange | Sets camera range.
ib3d_CameraViewport | Sets the camera viewport position and size.
ib3d_CameraZoom | Sets the zoom factor for a camera.
ib3d_CountChildren | Returns the of children of an entity.
ib3d_CountTriangles |
ib3d_CountVertices |
ib3d_CreateBrush | Creates a brush.
ib3d_CreateCamera | Creates a camera entity.
ib3d_CreateCube | Creates a cube entity.
ib3d_CreateLight | Creates a light.
ib3d_CreatePivot | Creates a pivot entity.
ib3d_CreateSphere | Creates a sphere entity.
ib3d_CreateSurface |
ib3d_DrawLine | Draws a 3d line on the screen from provided points.
ib3d_DrawLine3df | Draws a 3d line on the screen from provided instance of line3df.
ib3d_DrawText | Draws Text on the screen using the current font and color.
ib3d_DrawTriangle | Draws a 3d "wire" triangle on the screen from provided points.
ib3d_DrawTriangle3df | Draws a 3d "wire" triangle on the screen from provided instance of Triangle3df.
ib3d_EndGraphics | Uninitializes the graphics system.
ib3d_EntityAmbientColor | How much ambient light (a global light) is reflected by this entity.
ib3d_EntityBlend | Sets the blending mode of an entity.
ib3d_EntityColor | Sets the color of an entity.
ib3d_EntityDebugDataVisible | Shows debug data such as boundingboxes.
ib3d_EntityDiffuseColor | How much diffuse light coming from a light source is reflected by this entity.
ib3d_EntityDistance | Returns the distance between the passed entities.
ib3d_EntityEmissiveColor | Light emitted by this entity.
ib3d_EntityFX | Sets miscellaneous effects for an entity.
ib3d_EntityGetSpeed | Returns the current entity speed setting.
ib3d_EntityGetUserData | Retrieves user data stored with the entity.
ib3d_EntityInView | Returns if the passed entity is in view of the camera.
ib3d_EntityName | Returns the name of an entity.
ib3d_EntityParent | Attaches an entity to a parent.
ib3d_EntityPick | Returns the nearest entity 'ahead' of the specified entity.
ib3d_EntityPickMode | Sets the pick mode for an entity.
ib3d_EntityPitch | Returns the Pitch (X) angle of an entity.
ib3d_EntityRemoveUserData | Removes user data stored with the entity.
ib3d_EntityRoll | Returns the Roll (Z) angle of an entity.
ib3d_EntitySetOnPickedEventHandler | Sets the OnPicked event handler for an entity.
ib3d_EntitySetSpeed | Sets the speed at which an entity moves and rotates.
ib3d_EntitySetUserData | Associates an object with the entity.
ib3d_EntityShininess | Value affecting the size of specular highlights.
ib3d_EntitySpecularColor | How much specular light (highlights from a light) is reflected.
ib3d_EntityTexture | Applies a texture to an entity.
ib3d_EntityX | The X-coordinate of the entity.
ib3d_EntityY | The Y-coordinate of the entity.
ib3d_EntityYaw | Returns the Yaw (Y) angle of an entity.
ib3d_EntityZ | The Z-coordinate of the entity.
ib3d_FindChild | Returns the first child of the specified entity with the matching child name.
ib3d_FreeEntity | Frees up resources associated with the entity and removes it from the scene.
ib3d_GetChild | Returns a child of an entity.
ib3d_GetImageFont | Returns the current font used for ib3d_DrawText commands.
ib3d_GetParent | Returns an entities parent.
ib3d_GetSpeed | Returns the current speed setting of the iB3D engine.
ib3d_Graphics3D | Sets 3D Graphics mode and initializes the graphics system.
ib3d_Graphics3DParams | Sets 3D Graphics mode and initializes the graphics system from a creation parameters object.
ib3d_HideEntity | Hides an entity so that it is no longer visible and is no longer involved in collisions.
ib3d_KeyDown | Used to detect if a key is being held down.
ib3d_KeyHit | Returns the number of times a specified key has been hit since the last time you called the KeyHit() command.
ib3d_LastPickRay | Returns the ray used for the last pick call.
ib3d_LastProjected | Returns the viewport X,Y,Z of the last ib3d_CameraProject() call.
ib3d_LastTFormed | Returns the X,Y,Z components of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.
ib3d_LightAmbientColor | Sets the ambient color for a light.
ib3d_LightCastShadows | Determines if the light is to cast shadows or not.
ib3d_LightColor | Sets the color of a light.
ib3d_LightDiffuseColor | Sets the diffuse color for a light.
ib3d_LightRange | Sets the range of a light.
ib3d_LightSpecularColor | Sets the specular color for a light.
ib3d_LinePick | Returns the first entity between x,y,z to x+dx,y+dy,z+dz.
ib3d_LoadImageFont | Loads an image font.
ib3d_MouseX | Returns the X location of the mouse on the screen.
ib3d_MouseY | Returns the Y location of the mouse on the screen.
ib3d_MoveEntity | Moves an entity relative to its current position and orientation.
ib3d_NameEntity | Sets an entities name.
ib3d_PickedEntity | Returns the entity 'picked' by the most recently executed Pick command.
ib3d_PickedNX | Returns the X component of the normal of the most recently executed Pick command.
ib3d_PickedNY | Returns the Y component of the normal of the most recently executed Pick command.
ib3d_PickedNZ | Returns the Z component of the normal of the most recently executed Pick command.
ib3d_PickedPoint | Returns the world coordinate of the most recently executed Pick command.
ib3d_PickedTime | Returns the time taken to calculate the most recently executed Pick command.
ib3d_PickedTriangle | Returns the triangle that was 'picked' by the most recently executed Pick command.
ib3d_PickedX | Returns the world X coordinate of the most recently executed Pick command.
ib3d_PickedY | Returns the world Y coordinate of the most recently executed Pick command.
ib3d_PickedZ | Returns the world Z coordinate of the most recently executed Pick command.
ib3d_PointEntity | Points one entity at another.
ib3d_PositionEntity | Positions an entity at an absolute position in 3D space.
ib3d_ProjectedX | Returns the viewport X coordinate of the last ib3d_CameraProject() call.
ib3d_ProjectedY | Returns the viewport Y coordinate of the last ib3d_CameraProject() call.
ib3d_ProjectedZ | Returns the viewport Z coordinate of the last ib3d_CameraProject() call.
ib3d_RenderDrawCmds | Renders all draw commands for the current frame.
ib3d_RenderEntities | Renders all entities for the current frame.
ib3d_RenderGUI | Renders all GUI elements for the current frame.
ib3d_RenderWorld | Renders the current scene to the BackBuffer onto the rectangle defined by each cameras CameraViewport( ). Every camera not hidden by HideEntity( ) or with a CameraProjMode( ) of 0 is rendered.
ib3d_RenderWorldBegin | Initializes rendering for the current frame.
ib3d_RenderWorldEnd | Stops rendering of the current frame.
ib3d_RotateEntity | Rotates an entity so that it is at an absolute orientation.
ib3d_ScaleEntity | Scales an entity so that it is of an absolute size.
ib3d_SetFontColor | Sets the color that is used to draw text.
ib3d_SetImageFont | Sets the current font used for ib3d_DrawText commands.
ib3d_SetSpeed | Sets the speed at which the iB3D engine runs.
ib3d_ShadowColor | Sets the color of stencil buffers shadows.
ib3d_ShowEntity | Shows an entity.
ib3d_TFormedX | Returns the X component of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.
ib3d_TFormedY | Returns the Y component of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.
ib3d_TFormedZ | Returns the Z component of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.
ib3d_TFormPoint | Transforms between coordinate systems.
ib3d_TFormVector | Transforms the passed vector coordinates between coordinate systems.
ib3d_TrackEntity | Sets the camera to track an entity.
ib3d_TranslateEntity | Translates (moves) an entity relative to its current position and not its orientation.
ib3d_TriangleVertex |
ib3d_TurnEntity | Turns an entity relative to its current orientation.
ib3d_UpdateWorld | Animates all entities in the world, and performs collision checking.
ib3d_VertexBlue |
ib3d_VertexColor |
ib3d_VertexCoords |
ib3d_VertexGreen |
ib3d_VertexNormal |
ib3d_VertexNX |
ib3d_VertexNY |
ib3d_VertexNZ |
ib3d_VertexRed |
ib3d_VertexTexCoords |
ib3d_VertexU |
ib3d_VertexV |
ib3d_VertexX |
ib3d_VertexY |
ib3d_VertexZ |
round | Rounds a float to a certain of digits.
TriangleCenter | Returns the center point of a triangle based on 3 vertices.

## Types Summary

ib3d_base | Base type for all ib3d types.
ib3d_EventReceiver | Event receiver for handling multiple inputs at one time.

## Constants

Const CT_FPS:Int
Description | FPS camera.

Const CT_MAYA:Int
Description | MAYA camera.

Const CT_NORMAL:Int
Description | Normal camera.

Const IB3D_MOUSE_LEFT:Int
Description | Constant for Left mouse button.

Const IB3D_MOUSE_MIDDLE:Int
Description | Constant for Middle mouse button.

Const IB3D_MOUSE_RIGHT:Int
Description | Constant for Right mouse button.

Const PM_BOX:Int
Description | PickMode BoundingBox.

Const PM_POLYGON:Int
Description | PickMode Polygon.

Const PM_SPHERE:Int
Description | PickMode Sphere (not used, will default to PM_BOX)

Const PM_UNPICKABLE:Int
Description | PickMode Unpickable (default)

## Functions

Function FloatToFixedPoint:String(f:Float,decimals:Int=3,bRound:Int=True)
Returns | the center point as a Vector3df.
Description | Retruns a float trimmed to a certain of decimal places.
Information | bRound rounds the float before trimming it.

Function ib3d_AddTriangle(surf:SURFACE,v0:Short,v1:Short,v2:Short)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_AddVertex:Int(surf:SURFACE,x:Float,y:Float,z:Float,nx:Float=0,ny:Float=0,nz:Float=0,u:Float=0,v:Float=0)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_AddZipFileArchive:Int(file:String,bIgnoreCase:Int=True,bIgnorePaths:Int=True)
Returns | Returns true if the archive was added successful, false if not.
Description | Adds an zip archive to the file system.
Information | Parameters file:String - Filename of the zip archive to add to the file system. bIgnoreCase:Int - If set to true, files in the archive can be accessed without writing all letters in the right case. Defaults to True. bIgnorePaths:Int - If set to true, files in the added archive can be accessed without its complete path. Defaults to True. After calling this, the Irrlicht Engine will search and open files directly from this archive too. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake3 .pk3 files, which are nothing different than .zip files.

Function ib3d_AmbientLight(red:Int=127,green:Int=127,blue:Int=127)
Description | Sets the ambient lighting color.
Information | Parameters red:Int - red ambient light value green:Int - green ambient light value blue:Int - blue ambient light value The green, red and blue values should be in the range 0-255. The default ambient light colour is 127,127,127. Ambient light is a light source that affects all points on a 3D object equally. So with ambient light only, all 3D objects will appear flat, as there will be no shading. Ambient light is useful for providing a certain level of light, before adding other lights to provide a realistic lighting effect. An ambient light level of 0,0,0 will result in no ambient light being displayed.

Function ib3d_CameraAspectRatio(CAMERA:CAMERA,ratio:Float=(4.0/3.0))
Description | Sets the aspect ratio for the camera.
Information | Parameters camera:CAMERA - camera instance ratio:Float - New apsect ratio. Defaults to 4.0/3.0.

Function ib3d_CameraClsColor(red:Int=0,green:Int=0,blue:Int=0)
Description | Sets camera background color.
Information | Parameters red:Int - red value of camera background color green:Int - green value of camera background color blue:Int - blue value of camera background color This sets the background color for all defined cameras.

Function ib3d_CameraClsMode(bClsColor:Int=True,bClsZBuf:Int=True)
Description | Sets the camera clear mode.
Information | Parameters bClsColor:Int - True to clear the color buffer. Default is True. bClsZBuf - True to clear the Z-Buffer. Default is True. This sets the camera clear mode for all cameras.

Function ib3d_CameraFogColor(CAMERA:CAMERA,red:Int,green:Int,blue:Int)
Description | Sets the camera fog color.
Information | Parameters camera:CAMERA - camera instance red:Int - red value of fog green:Int - green value of fog blue:Int - blue value of fog

Function ib3d_CameraFogDensity(CAMERA:CAMERA,density:Float=0.01)
Returns |
Description |
Information | Parameters camera:CAMERA - camera instance -

Function ib3d_CameraFogMode(CAMERA:CAMERA,mode:Int=FM_NONE)
Description | Sets the camera fog mode.
Information | Parameters camera:CAMERA - camera instance mode:Int - the new fog mode.

Function ib3d_CameraFogRange(CAMERA:CAMERA,near:Float=50.0,far:Float=100.0)
Description | Sets the camera fog range.
Information | Parameters camera:CAMERA - camera instance near:Float - Distance in front of the camera that the fogging effect will start. All 3D objects before this point will not be faded. Defaults to 50. far:Float - Distance in front of the camera that the fogging effect will end. All 3D objects beyond this point will be completely faded out. Defaults to 100.

Function ib3d_CameraPick:ib3d_Entity(CAMERA:CAMERA,viewport_x:Int,viewport_y:Int)
Returns | the picked entity.
Description | Picks the entity positioned at the specified viewport coordinates.
Information | Parameters camera:CAMERA - camera instance viewport_x:Int - 2D viewport coordinate viewport_z:Int - 2D viewport coordinate Returns the entity picked, or Null if none there. An entity must have its EntityPickMode set to a non-PM_UNPICKABLE (0) value value to be 'pickable'.

Function ib3d_CameraProject(CAMERA:CAMERA,x:Float,y:Float,z:Float)
Description | Projects the world coordinates x,y,z onto the screen.
Information | Parameters camera:CAMERA - the camera rendering the projection. x:Float - world x coordinate to project y:Float - world y coordinate to project z:Float - world z coordinate to project

Function ib3d_CameraProjMode(CAMERA:CAMERA,mode:Int=1)
Description | Sets the camera projection mode.
Information | Parameters camera:CAMERA - camera instance mode:Int - projection mode (default is 1) Using projection mode 0, nothing is displayed on the screen, and this is the fastest method of hiding a camera. Using camera projection mode 1, the graphics are displayed in their 'correct' form - and this is the default mode for a camera. Camera projection mode 2 is a special type of projection, used for displaying 3D graphics on screen, but in a 2D form - that is, no sense of perspective will be given to the graphics. Two identical objects at varying distances from the camera will both appear to be the same size. Orthographic projection is useful for 3D editors, where a sense of perspective is unimportant, and also certain games.

Function ib3d_CameraRange(CAMERA:CAMERA,near:Float=1,far:Float=1000)
Description | Sets camera range.
Information | Parameters camera:CAMERA - camera instance near:Float - Distance in front of the camera that 3D objects start being drawn. Defaults to 1. far:Float - Distance in front of the camera that 3D objects stop being drawn. Defaults to 1000.

Function ib3d_CameraViewport(CAMERA:CAMERA,x:Int,y:Int,width:Int,height:Int)
Description | Sets the camera viewport position and size.
Information | Parameters camera:CAMERA - camera instance to set the viewport for x:Int - x coordinate of top left hand corner of viewport y:Int - y coordinate of top left hand corner of viewport width:Int - width of viewport height:Int - height of viewport The camera viewport is the area of the 2D screen that the 3D graphics as viewed by the camera are displayed in. Setting the camera viewport allows you to achieve spilt-screen and rear-view mirror effects.

Function ib3d_CameraZoom(CAMERA:CAMERA,zoom:Float=1.0)
Description | Sets the zoom factor for a camera.
Information | Parameters camera:CAMERA - camera instance zoom:Float - The new zoom factor. Defaults to 1.0.

Function ib3d_CountChildren:Int(entity:ib3d_Entity)
Returns | of children.
Description | Returns the of children of an entity.
Information | Parameters entity:ib3d_Entity - entity instance

Function ib3d_CountTriangles:Int(surf:SURFACE)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_CountVertices:Int(surf:SURFACE)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_CreateBrush:BRUSH(red:Float=255,green:Float=255,blue:Float=255)
Description | Creates a brush.
Information | Parameters entity:ib3d_Entity - entity instance

Function ib3d_CreateCamera:CAMERA(parent:ib3d_Entity=Null,camType:Int=CT_NORMAL)
Returns | A new camera instance.
Description | Creates a camera entity.
Information | Parameters parent:ib3d_Entity - parent entity of camera camType:Int - Type of camera to create. Defaults to CT_NORMAL. Without at least one camera, you won't be able to see anything in your 3D world. With more than one camera, you will be to achieve effect such as split-screen modes and rear-view mirrors. By default a camera renders to the screen. If you wish to display 3D graphics on an image or a texture then change the render target of the camera. The optional parent parameter allow you to specify a parent entity for the camera so that when the parent is moved the child camera will move with it. However, this relationship is one way; applying movement commands to the child will not affect the parent. Specifying a parent entity will still result in the camera being created at position 0,0,0 rather than at the parent entity's position.

Function ib3d_CreateCube:PRIMITIVE(parent:ib3d_Entity=Null)
Returns | The new cube entity.
Description | Creates a cube entity.
Information | Parameters parent:ib3d_Entity - parent entity of cube

Function ib3d_CreateLight:LIGHT(parent:ib3d_Entity=Null)
Returns | A new instance of a light.
Description | Creates a light.
Information | Parameters parent:ib3d_Entity - parent entity of light The light will cast dynamic light on all other entities in the scene, which have the material flag EMF_LIGHTING turned on. (This is the default setting in most entities).

Function ib3d_CreatePivot:PIVOT(parent:ib3d_Entity=Null)
Returns | The new pivot entity.
Description | Creates a pivot entity.
Information | Parameters parent:ib3d_Entity - parent entity of pivot A pivot entity is an invisible point in 3D space that's main use is to act as a parent entity to other entities. The pivot can then be used to control lots of entities at once, or act as new centre of rotation for other entities. To enforce this relationship; use EntityParent or make use of the optional parent entity parameter available with all entity load/creation commands. Indeed, this parameter is also available with the CreatePivot command if you wish for the pivot to have a parent entity itself.

Function ib3d_CreateSphere:PRIMITIVE(segments:Int=8,parent:ib3d_Entity=Null)
Returns | The new sphere entity.
Description | Creates a sphere entity.
Information | Parameters segments:Int - sphere detail. (Defaults to 8) parent:ib3d_Entity - parent entity of cube The sphere will be centred at 0,0,0 and will have a radius of 1. The segments value must be in the range 2-100 inclusive, although this is only checked in debug mode. A common mistake is to leave debug mode off and specify the parent parameter (usually an eight digit memory address) in the place of the segments value. As the amount of polygons used to create a sphere is exponentially proportional to the segments value, this will result in Blitz trying to create a sphere with unimaginable amounts of polygons! Depending on how unlucky you are, your computer will then crash. Example segments values: 8: 224 polygons - bare minimum amount of polygons for a sphere 16: 960 polygons - smooth looking sphere at medium-high distances 32: 3968 polygons - smooth sphere at close distances The optional parent parameter allow you to specify a parent entity for the sphere so that when the parent is moved the child sphere will move with it. However, this relationship is one way; applying movement commands to the child will not affect the parent. Specifying a parent entity will still result in the sphere being created at position 0,0,0 rather than at the parent entity's position.

Function ib3d_CreateSurface:SURFACE(mesh:MESH,surface_type:Int=SF_NORMAL)
Returns |
Description |
Information | Parameters mesh:MESH - an instance of a mesh to add the surface to

Function ib3d_DrawLine(x1:Float,y1:Float,z1:Float,x2:Float,y2:Float,z2:Float,red:Int=255,green:Int=255,blue:Int=255)
Description | Draws a 3d line on the screen from provided points.
Information | Parameters x1:Float - X location for the start of the line y1:Float - Y location for the start of the line z1:Float - Z location for the start of the line x2:Float - X location for the end of the line y2:Float - Y location for the end of the line z2:Float - Z location for the end of the line red:Int - red component of the color to draw the line with. Defaults to 255. green:Int - green component of the color to draw the line with. Defaults to 255. blue:Int - blue component of the color to draw the line with. Defaults to 255.

Function ib3d_DrawLine3df(line:Line3df,red:Int=255,green:Int=255,blue:Int=255)
Description | Draws a 3d line on the screen from provided instance of line3df.
Information | Parameters line:Line3df - line to draw red:Int - red component of the color to draw the line with. Defaults to 255. green:Int - green component of the color to draw the line with. Defaults to 255. blue:Int - blue component of the color to draw the line with. Defaults to 255.

Function ib3d_DrawText(text:String,x:Int,y:Int)
Description | Draws Text on the screen using the current font and color.
Information | Parameters text:String - the text to draw x:Int - X location for the upper left of the text y:Int - Y location for the upper left of the text

Function ib3d_DrawTriangle(x1:Float,y1:Float,z1:Float,x2:Float,y2:Float,z2:Float,x3:Float,y3:Float,z3:Float,red:Int=255,green:Int=255,blue:Int=255)
Description | Draws a 3d "wire" triangle on the screen from provided points.
Information | Parameters x1:Float - X location for point 1 of the triangle y1:Float - Y location for point 1 of the triangle z1:Float - Z location for point 1 of the triangle x2:Float - X location for point 2 of the triangle y2:Float - Y location for point 2 of the triangle z2:Float - Z location for point 2 of the triangle x3:Float - X location for point 3 of the triangle y3:Float - Y location for point 3 of the triangle z3:Float - Z location for point 3 of the triangle red:Int - red component of the color to draw the triangle with. Defaults to 255. green:Int - green component of the color to draw the triangle with. Defaults to 255. blue:Int - blue component of the color to draw the triangle with. Defaults to 255.

Function ib3d_DrawTriangle3df(triangle:Triangle3df,red:Int=255,green:Int=255,blue:Int=255)
Description | Draws a 3d "wire" triangle on the screen from provided instance of Triangle3df.
Information | Parameters triangle:Triangle3df - triangle to draw red:Int - red component of the color to draw the triangle with. Defaults to 255. green:Int - green component of the color to draw the triangle with. Defaults to 255. blue:Int - blue component of the color to draw the triangle with. Defaults to 255.

Function ib3d_EndGraphics()
Description | Uninitializes the graphics system.
Information | Destroys all windows and objects since the ib3d_Graphics3D() call.

Function ib3d_EntityAmbientColor(entity:ib3d_Entity,red:Float,green:Float,blue:Float,MaterialIDX:Int=0)
Description | How much ambient light (a global light) is reflected by this entity.
Information | Parameters entity:ib3d_Entity - entity instance red:Float - red value for ambient light green:Float - green value for ambient light blue:Float - blue value for ambient light MaterialIDX:Int - Index of the material to set the ambient color for. Defaults to 0. The default is full white, meaning objects are completely globally illuminated. Reduce this if you want to see diffuse or specular light effects.

Function ib3d_EntityBlend(entity:ib3d_Entity,E_MATERIAL_TYPE:Int=EMT_SOLID,MaterialIDX:Int=-1)
Description | Sets the blending mode of an entity.
Information | Parameters entity:ib3d_Entity - entity instance E_MATERIAL_TYPE:Int - the blending mode. Defaults to EMT_SOLID. MaterialIDX:Int - the material to set the blend on. Default is -1 for all materials. Blend Modes: EMT_SOLID Standard solid material. Only first texture is used= which is supposed To be the diffuse material. EMT_SOLID_2_LAYER Solid material with 2 texture layers. The second is blended onto the first using the alpha value of the vertex colors. This material is currently Not implemented in OpenGL but it works with DirectX. EMT_LIGHTMAP Material Type with standard lightmap technique: There should be 2 textures: The first texture layer is a diffuse map the second is a light map. Vertex light is ignored. EMT_LIGHTMAP_ADD Material Type with lightmap technique like EMT_LIGHTMAP but lightmap And diffuse texture are Not modulated= but added instead. EMT_LIGHTMAP_M2 Material Type with standard lightmap technique: There should be 2 textures: The first texture layer is a diffuse map the second is a light map. Vertex light is ignored. The texture colors are effectively multiplyied by 2 For brightening. like known in DirectX as D3DTOP_MODULATE2X. EMT_LIGHTMAP_M4 Material Type with standard lightmap technique: There should be 2 textures: The first texture layer is a diffuse map the second is a light map. Vertex light is ignored. The texture colors are effectively multiplyied by 4 For brightening. like known in DirectX as D3DTOP_MODULATE4X. EMT_LIGHTMAP_LIGHTING Like EMT_LIGHTMAP but also supports dynamic lighting. EMT_LIGHTMAP_LIGHTING_M2 Like EMT_LIGHTMAP_M2 but also supports dynamic lighting. EMT_LIGHTMAP_LIGHTING_M4 Like EMT_LIGHTMAP_4 but also supports dynamic lighting. EMT_DETAIL_MAP Detail mapped material. The first texture is diffuse color map, the second is added to this and usually displayed with a bigger scale value so that it adds more detail. The detail map is added to the diffuse map using ADD_SIGNED, so that it is possible to add and substract color from the diffuse map. For example a value of (127,127,127) will not change the appearance of the diffuse map at all. Often used for terrain rendering. EMT_SPHERE_MAP Makes the material look like it was reflection the environment around it. To make this possible= a texture called 'sphere map' is used= which must be set as Texture1. EMT_REFLECTION_2_LAYER A reflecting material with an optional additional non reflecting texture layer. The reflection map should be set as Texture 1. Please note that this material Type is currently Not 100% implemented in OpenGL. It works in DirectX8 And 9. EMT_TRANSPARENT_ADD_COLOR A transparent material. Only the first texture is used. The New color is calculated by simply adding the source color And the dest color. This means If For example a billboard using a texture with black background And a red circle on it is drawed with this material the result is that only the red circle will be drawn a little bit transparent And everything which was black is 100% transparent And Not visible. This material Type is useful For e.g. particle effects. EMT_TRANSPARENT_ALPHA_CHANNEL Makes the material transparent based on the texture alpha channel. Only first texture is used. If you are using this material with small textures And 3d Object= it is a good idea To load the texture in 32 bit mode (video::IVideoDriver::setTextureCreationFlag()). EMT_TRANSPARENT_ALPHA_CHANNEL_REF Makes the material transparent based on the texture alpha channel. If the alpha channel value is greater than 127, a pixel is written To the target, otherwise not. This material does Not use alpha blending And is a lot faster than EMT_TRANSPARENT_ALPHA_CHANNEL. It is ideal For drawing stuff like leafes of plants, because the borders are Not blurry but sharp. Only first texture is used. If you are using this material with small textures And 3d Object, it is a good idea To load the texture in 32 bit mode (video::IVideoDriver::setTextureCreationFlag()). EMT_TRANSPARENT_VERTEX_ALPHA Makes the material transparent based on the vertex alpha value. EMT_TRANSPARENT_REFLECTION_2_LAYER A transparent reflecting material with an optional additional non reflecting texture layer. The reflection map should be set as Texture 1. The transparency depends on the alpha value in the vertex colors. A texture which will Not reflect can be set als Texture 2. Please note that this material Type is currently Not 100% implemented in OpenGL. It works in DirectX8. EMT_NORMAL_MAP_SOLID A solid normal map renderer. First texture is the color map the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of Type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 And pixel shader 1.1 capable hardware And falls back on a fixed Function lighted material If this hardware is Not available. Only two lights are supported by this shader= If there are more= the nearest two are chosen. Currently= this shader is only implemented For the D3D8 And D3D9 renderers. EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR A transparent normal map renderer. First texture is the color map the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of Type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 And pixel shader 1.1 capable hardware And falls back on a fixed Function lighted material If this hardware is Not available. Only two lights are supported by this shader= If there are more= the nearest two are chosen. Currently= this shader is only implemented For the D3D8 And D3D9 renderers. EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA A transparent (based on the vertex alpha value) normal map renderer. First texture is the color map the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of Type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 And pixel shader 1.1 capable hardware And falls back on a fixed Function lighted material If this hardware is Not available. Only two lights are supported by this shader= If there are more= the nearest two are chosen. Currently= this shader is only implemented For the D3D8 And D3D9 renderers. EMT_PARALLAX_MAP_SOLID Just like EMT_NORMAL_MAP_SOLID, but uses parallax mapping too, which looks a lot more realistic. This only works when the hardware supports at least vertex shader 1.1 And pixel shader 1.4. First texture is the color map, the second should be the normal map. The normal map texture should contain the height value in the alpha component. The IVideoDriver::makeNormalMapTexture() Method writes this value automaticly when creating normal maps from a heightmap when using a 32 bit texture. The height scale of the material (affecting the bumpiness) is being controlled by the SMaterial::MaterialTypeParam member. If set To zero, the Default value (0.02f) will be applied. Otherwise the value set in SMaterial::MaterialTypeParam is taken. This value depends on with which scale the texture is mapped on the material. Too high Or low values of MaterialTypeParam can result in strange artifacts. EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR A material just like EMT_PARALLAX_MAP_SOLID, but it is transparent, using EMT_TRANSPARENT_ADD_COLOR as base material. EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA A material just like EMT_PARALLAX_MAP_SOLID, but it is transparent, using EMT_TRANSPARENT_VERTEX_ALPHA as base material.

Function ib3d_EntityColor(entity:ib3d_Entity,red:Float,green:Float,blue:Float,MaterialIDX:Int=0)
Description | Sets the color of an entity.
Information | Parameters entity:ib3d_Entity - entity instance red:Float - red value of entity green:Float - green value of entity blue:Float - blue value of entity MaterialIDX:Int - Entity material to set the color for. Defaults to 0. The Red, Green and Blue values should be in the range 0-255 with 0 being darkest and 255 brightest. The default entity color is 255,255,255 (White).

Function ib3d_EntityDebugDataVisible(entity:ib3d_Entity,bShowDebugData:Int)
Description | Shows debug data such as boundingboxes.
Information | Parameters entity:ib3d_Entity - entity instance bShowDebugData:Int - True if to show, False to hide. Default is False. Not all entities support this feature.

Function ib3d_EntityDiffuseColor(entity:ib3d_Entity,red:Float,green:Float,blue:Float,MaterialIDX:Int=0)
Description | How much diffuse light coming from a light source is reflected by this entity.
Information | Parameters entity:ib3d_Entity - entity instance red:Float - red value for diffuse light green:Float - green value for diffuse light blue:Float - blue value for diffuse light MaterialIDX:Int - Index of the material to set the diffuse color for. Defaults to 0. The default is full white.

Function ib3d_EntityDistance:Double(entity:ib3d_Entity,other:ib3d_Entity)
Returns | The distance.
Description | Returns the distance between the passed entities.
Information | Parameters entity:ib3d_Entity - entity instance other:ib3d_Entity - other entity to check distance from

Function ib3d_EntityEmissiveColor(entity:ib3d_Entity,red:Float,green:Float,blue:Float,MaterialIDX:Int=0)
Description | Light emitted by this entity.
Information | Parameters entity:ib3d_Entity - entity instance red:Float - red value for emissive light green:Float - green value for emissive light blue:Float - blue value for emissive light MaterialIDX:Int - Index of the material to set the emissive color for. Defaults to 0. Default is to emitt no light.

Function ib3d_EntityFX(entity:ib3d_Entity,E_MATERIAL_FLAG:Int,bNewVal:Int,MaterialIDX:Int=-1)
Description | Sets miscellaneous effects for an entity.
Information | Parameters entity:ib3d_Entity - entity instance E_MATERIAL_FLAG:Int - the effect to set bNewVal:Int - the new value for the effect MaterialIDX:Int - the material to set the effect on. Default is -1 for all materials. Material flags: EMF_WIREFRAME: Draw as wireframe Or filled triangles? Default: False EMF_POINTCLOUD: Draw as point cloud Or filled triangles? Default: False EMF_GOURAUD_SHADING: Flat Or Gouraud shading? Default: True EMF_LIGHTING: Will this material be lighted? Default: True EMF_ZBUFFER: Is the ZBuffer enabled? Default: True EMF_ZWRITE_ENABLE: May be written To the zbuffer Or is it readonly. Default: True. NOTE: This flag is ignored, If the material Type is a transparent type. EMF_BACK_FACE_CULLING: Is backfaceculling enabled? Default: True EMF_BILINEAR_FILTER: Is bilinear filtering enabled? Default: True EMF_TRILINEAR_FILTER: Is trilinear filtering enabled? Default: False. NOTE: If the trilinear filter flag is enabled, the bilinear filtering flag is ignored. EMF_ANISOTROPIC_FILTER: Is anisotropic filtering? Default: False. NOTE: In Irrlicht you can use anisotropic texture filtering in conjunction with bilinear Or trilinear texture filtering To improve rendering results. Primitives will look less blurry with this flag switched on. EMF_FOG_ENABLE: Is fog enabled? Default: False EMF_NORMALIZE_NORMALS: Normalizes normals.You can enable this if you need to scale a dynamic lighted model. Usually, its normals will get scaled too then and it will get darker. If you enable the EMF_NORMALIZE_NORMALS flag, the normals will be normalized again, and the model will look as bright as it should.

Function ib3d_EntityGetSpeed:Float(entity:ib3d_Entity)
Returns | The current speed setting.
Description | Returns the current entity speed setting.
Information | Parameters entity:ib3d_Entity - entity instance

Function ib3d_EntityGetUserData:Object(entity:ib3d_Entity,key:String)
Returns | a user data object or Null if not found.
Description | Retrieves user data stored with the entity.
Information | Parameters entity:ib3d_Entity - entity instance key:String - Key for the user data

Function ib3d_EntityInView:Int(CAMERA:CAMERA,entity:ib3d_Entity)
Returns | 0 if entity is not in view. 1 if in partial view. 2 if in full view.
Description | Returns if the passed entity is in view of the camera.
Information | Parameters camera:CAMERA - camera instance to set the viewport for entity:ib3d_Entity - The entity to check.

Function ib3d_EntityName:String(entity:ib3d_Entity)
Returns | Entity name.
Description | Returns the name of an entity.
Information | Parameters entity:ib3d_Entity - entity instance

Function ib3d_EntityParent(entity:ib3d_Entity,parent:ib3d_Entity,globl:Int=True)
Description | Attaches an entity to a parent.
Information | Parameters entity:ib3d_Entity - entity instance parent:ib3d_Entity - parent entity globl:Int - True for the child entity to maintain its global position and orientation. Defaults to True.

Function ib3d_EntityPick:ib3d_Entity(entity:ib3d_Entity,range:Float=1000.00)
Returns | the picked entity.
Description | Returns the nearest entity 'ahead' of the specified entity.
Information | Parameters entity:ib3d_Entity - entity instance range:Float - range to pick. Defaults to 1000.00 An entity must have a non-zero EntityPickMode to be pickable.

Function ib3d_EntityPickMode(entity:ib3d_Entity,mode:Int=PM_UNPICKABLE,obscurer:Int=True)
Description | Sets the pick mode for an entity.
Information | Parameters entity:ib3d_Entity - entity instance mode:Int - type of geometry used for picking. Defaults to PM_UNPICKABLE. Geometry Types: PM_UNPICKABLE, PM_POLYGON, PM_BOX NOTE: PM_SPHERE is not available in iB3D. if passed PM_BOX will be used.

Function ib3d_EntityPitch:Float(entity:ib3d_Entity,globl:Int=False)
Returns | The current Pitch.
Description | Returns the Pitch (X) angle of an entity.
Information | Parameters entity:ib3d_Entity - entity instance globl:Int - Pass true if the returned value should be relative to 0 rather than the parent entity. Default is False. The pitch angle is the X angle. NOTE: this value differs from B3D proper.

Function ib3d_EntityRemoveUserData(entity:ib3d_Entity,key:String)
Description | Removes user data stored with the entity.
Information | Parameters entity:ib3d_Entity - entity instance key:String - Key for the user data

Function ib3d_EntityRoll:Float(entity:ib3d_Entity,globl:Int=False)
Returns | The current Roll.
Description | Returns the Roll (Z) angle of an entity.
Information | Parameters entity:ib3d_Entity - entity instance globl:Int - Pass true if the returned value should be relative to 0 rather than the parent entity. Default is False. The roll angle is the Z angle NOTE: this value differs from B3D proper.

Function ib3d_EntitySetOnPickedEventHandler(entity:ib3d_Entity,handler:ONPICKEDEVENTHANDLER)
Description | Sets the OnPicked event handler for an entity.
Information | Parameters entity:ib3d_Entity - entity instance handler:ONPICKEDEVENTHANDLER - instance of an OnPicked event handler When the entity is the result of a pick command, the handler will be called.

Function ib3d_EntitySetSpeed(entity:ib3d_Entity,new_speed:Float=1.0)
Description | Sets the speed at which an entity moves and rotates.
Information | Parameters entity:ib3d_Entity - entity instance new_speed:Float - speed to alter the entity with. Default is 1.0. WIP - This setting affects Move and Turn commands. Each move/turn is multiplied by the speed setting. This setting is independent of the engine speed and the animation speed.

Function ib3d_EntitySetUserData(entity:ib3d_Entity,key:String,data:Object)
Description | Associates an object with the entity.
Information | Parameters entity:ib3d_Entity - entity instance key:String - Key used to access the user data data:Object - data to store in the entity. Passing Null will remove the user data.

Function ib3d_EntityShininess(entity:ib3d_Entity,shininess:Float=0.0,MaterialIDX:Int=0)
Description | Value affecting the size of specular highlights.
Information | Parameters entity:ib3d_Entity - entity instance shininess:Float - Size of the specular highlight. Defaults to 0. MaterialIDX:Int - the material to set the shininess on. Default is 0. If set to 0, no specular highlights are being used. To activate, simply set the shininess of a material to a value other than 0.

Function ib3d_EntitySpecularColor(entity:ib3d_Entity,red:Float,green:Float,blue:Float,MaterialIDX:Int=0)
Description | How much specular light (highlights from a light) is reflected.
Information | Parameters entity:ib3d_Entity - entity instance red:Float - red value for specular light green:Float - green value for specular light blue:Float - blue value for specular light MaterialIDX:Int - Index of the material to set the specular color for. Defaults to 0. The default is to reflect white specular light. See ib3d_EntityShininess how to enable specular lights.

Function ib3d_EntityTexture(entity:ib3d_Entity,texture:TEXTURE,frame:Int=0,index:Int=0)
Description | Applies a texture to an entity.
Information | Parameters entity:ib3d_Entity - entity instance frame:Int - frame of texture. Default to 0. index:Int - index of texture. Should be in the range of 0-3. Defaults to 0. NOTE: frame and animated textures are not currently supported.

Function ib3d_EntityX:Float(entity:ib3d_Entity,globl:Int=False)
Returns | The X-coordinate.
Description | The X-coordinate of the entity.
Information | Parameters entity:ib3d_Entity - entity instance globl:Int - Pass true to get the coordinate in world coordinates, False to get coordinates in relation to the parent. Default is False. NOTE: If the entity has no parent then local and global coordinates are the same. In this case you can think of the 3d world as the parent. Global coordinates refer to the 3d world. Blitz 3D uses a left-handed system: X+ is to the right Y+ is up Z+ is forward ( into the screen ) Every entity also has its own Local coordinate system. The global system never changes. But the local system is carried along as an entity moves and turns. This same concept is used in the entity movement commands: ib3d_MoveEntity(entity,0,0,1) No matter what the orientation this moves one unit forward.

Function ib3d_EntityY:Float(entity:ib3d_Entity,globl:Int=False)
Returns | The Y-coordinate.
Description | The Y-coordinate of the entity.
Information | Parameters entity:ib3d_Entity - entity instance globl:Int - Pass true to get the coordinate in world coordinates, False to get coordinates in relation to the parent. Default is False. NOTE: If the entity has no parent then local and global coordinates are the same. In this case you can think of the 3d world as the parent. Global coordinates refer to the 3d world. Blitz 3D uses a left-handed system: X+ is to the right Y+ is up Z+ is forward ( into the screen ) Every entity also has its own Local coordinate system. The global system never changes. But the local system is carried along as an entity moves and turns. This same concept is used in the entity movement commands: ib3d_MoveEntity(entity,0,0,1) No matter what the orientation this moves one unit forward.

Function ib3d_EntityYaw:Float(entity:ib3d_Entity,globl:Int=False)
Returns | The current Yaw.
Description | Returns the Yaw (Y) angle of an entity.
Information | Parameters entity:ib3d_Entity - entity instance globl:Int - Pass true if the returned value should be relative to 0 rather than the parent entity. Default is False. The yaw angle is the Y angle NOTE: this value differs from B3D proper.

Function ib3d_EntityZ:Float(entity:ib3d_Entity,globl:Int=False)
Returns | The Z-coordinate.
Description | The Z-coordinate of the entity.
Information | Parameters entity:ib3d_Entity - entity instance globl:Int - Pass true to get the coordinate in world coordinates, False to get coordinates in relation to the parent. Default is False. NOTE: If the entity has no parent then local and global coordinates are the same. In this case you can think of the 3d world as the parent. Global coordinates refer to the 3d world. Blitz 3D uses a left-handed system: X+ is to the right Y+ is up Z+ is forward ( into the screen ) Every entity also has its own Local coordinate system. The global system never changes. But the local system is carried along as an entity moves and turns. This same concept is used in the entity movement commands: ib3d_MoveEntity(entity,0,0,1) No matter what the orientation this moves one unit forward.

Function ib3d_FindChild:ib3d_Entity(entity:ib3d_Entity,name:String)
Returns | a child entity or null if none found.
Description | Returns the first child of the specified entity with the matching child name.
Information | Parameters entity:ib3d_Entity - entity instance name:String - name of the child to find within the entity

Function ib3d_FreeEntity(entity:ib3d_Entity Var)
Description | Frees up resources associated with the entity and removes it from the scene.
Information | Parameters entity:ib3d_Entity - entity instance

Function ib3d_GetChild:ib3d_Entity(entity:ib3d_Entity,index:Int)
Returns | a child entity or null if none found.
Description | Returns a child of an entity.
Information | Parameters entity:ib3d_Entity - entity instance index:int - index of child entity. Should be in range of 1...ib3d_CountChildren(entity) inclusive

Function ib3d_GetImageFont:FONT()
Returns | instance of the current font.
Description | Returns the current font used for ib3d_DrawText commands.

Function ib3d_GetParent:ib3d_Entity(entity:ib3d_Entity)
Returns | Parent entity.
Description | Returns an entities parent.
Information | Parameters entity:ib3d_Entity - entity instance

Function ib3d_GetSpeed:Float()
Returns | The current engine speed in
Description | Returns the current speed setting of the iB3D engine.

Function ib3d_Graphics3D:Int(width:Int,height:Int,depth:Int=16,mode:Int=0,stencilBufferShadows:Int=True,vsync:Int=False,deviceType:Int=EDT_OPENGL)
Returns | True if success.
Description | Sets 3D Graphics mode and initializes the graphics system.
Information | Parameters width:Int - Width of screen resolution. height:Int - Height of screen resolution. depth:Int - Bits per pixel in fullscreen mode. Ignored if windowed mode. Defaults to 16. mode:Int - Mode of display. Defaults to 0. 0: windowed (if possible) in debug mode, fullscreen in non-debug mode 1: fullscreen always 2. windowed always 3: windowed/scaled always stencilBufferShadows:Int - Specifies if the stencil buffer should be enabled. Set this to true, if you want the engine be able to draw stencil buffer shadows. Note that not all devices are able to use the stencil buffer. If they don't no shadows will be drawn. Defaults to True. vsync:Int - Specifies vertical syncronisation: If set to true, the driver will wait for the vertical retrace period, otherwise not. Defaults to False. deviceType:Int - Type of the device. Defaults to EDT_OPENGL. Available Types: EDT_OPENGL, EDT_BURNINGVIDEO, EDT_DIRECT3D9, EDT_DIRECT3D8.

Function ib3d_Graphics3DParams:Int(params:SIrrlichtCreationParameters)
Returns | True if success.
Description | Sets 3D Graphics mode and initializes the graphics system from a creation parameters object.
Information | Parameters params:SIrrlichtCreationParameters - parameters to use for the creation.

Function ib3d_HideEntity(entity:ib3d_Entity)
Description | Hides an entity so that it is no longer visible and is no longer involved in collisions.
Information | Parameters entity:ib3d_Entity - entity instance The main purpose of hide entity is to allow you to create entities at the beginning of a program, hide them, then copy them and show as necessary in the main game. This is more efficient than creating entities mid-game. If you wish to hide an entity so that it is no longer visible but still involved in collisions, then use EntityAlpha 0 instead. This will make an entity completely transparent. HideEntity affects the specified entity and all of its child entities, if any exist.

Function ib3d_KeyDown:Int(scancode:Int)
Returns | False if the key is not held down, True if the key is held down.
Description | Used to detect if a key is being held down.
Information | Parameters scancode:Int - corresponding key scancode

Function ib3d_KeyHit:Int(scancode:Int)
Returns | Times key was hit.
Description | Returns the number of times a specified key has been hit since the last time you called the KeyHit() command.
Information | Parameters scancode:Int - corresponding key scancode

Function ib3d_LastPickRay:Line3df()
Returns | the ray as a Line3df.
Description | Returns the ray used for the last pick call.
Information | Returns the ray used for the last pick call or null if a pick command has not been used.

Function ib3d_LastProjected(CAMERA:CAMERA,x:Float Var, y:Float Var, z:Float Var)
Returns | X,Y,Z is returned via the parameters passed in.
Description | Returns the viewport X,Y,Z of the last ib3d_CameraProject() call.
Information | Parameters x:Float Var - return X value y:Float Var - return Y value z:Float Var - return Z value

Function ib3d_LastTFormed(x:Float Var,y:Float Var,z:Float Var)
Description | Returns the X,Y,Z components of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.
Information | Parameters x:Float - variable to store the X coordinate of last TForm command y:Float - variable to store the Y coordinate of last TForm command z:Float - variable to store the Z coordinate of last TForm command

Function ib3d_LightAmbientColor(light:LIGHT,red:Float,green:Float,blue:Float)
Description | Sets the ambient color for a light.
Information | Parameters light:LIGHT - instance of a light red:Float - red value for ambient color green:Float - green value for ambient color blue:Float - blue value for ambient color Default is 0,0,0.

Function ib3d_LightCastShadows(light:LIGHT,bCastShadows:Int)
Description | Determines if the light is to cast shadows or not.
Information | Parameters light:LIGHT - instance of a light bCastShadows:Int - True if light is to cast shadows. Default is True.

Function ib3d_LightColor(light:LIGHT,red:Float,green:Float,blue:Float)
Returns |
Description | Sets the color of a light.
Information | Parameters light:LIGHT - instance of a light red:Float - red value for light color green:Float - green value for light color blue:Float - blue value for light color NOTE: negative values are not supported.

Function ib3d_LightDiffuseColor(light:LIGHT,red:Float,green:Float,blue:Float)
Description | Sets the diffuse color for a light.
Information | Parameters light:LIGHT - instance of a light red:Float - red value for diffuse color green:Float - green value for diffuse color blue:Float - blue value for diffuse color Default is 255,255,255.

Function ib3d_LightRange(light:LIGHT,range:Float=1000.0)
Description | Sets the range of a light.
Information | Parameters light:LIGHT - instance of a light range:Float - range of light. Default is 1000.0 The range of a light is how far it reaches. Everything outside the range of the light will not be affected by it.

Function ib3d_LightSpecularColor(light:LIGHT,red:Float,green:Float,blue:Float)
Description | Sets the specular color for a light.
Information | Parameters light:LIGHT - instance of a light red:Float - red value for specular color green:Float - green value for specular color blue:Float - blue value for specular color Default is 255,255,255.

Function ib3d_LinePick:ib3d_Entity(x:Float,y:Float,z:Float,dx:Float,dy:Float,dz:Float)
Returns | the picked entity.
Description | Returns the first entity between x,y,z to x+dx,y+dy,z+dz.
Information | Parameters x# - x coordinate of start of line pick y# - y coordinate of start of line pick z# - z coordinate of start of line pick dx# - distance x of line pick dy# - distance y of line pick dz# - distance z of line pick Returns the entity picked, or Null if none there. An entity must have its EntityPickMode set to a non-PM_UNPICKABLE (0) value value to be 'pickable'. NOTE: the B3D parameter radius is not supported in iB3D.

Function ib3d_LoadImageFont:FONT(file:String,size:Int,style:Int=FS_NONE)
Returns | instance of the loaded font.
Description | Loads an image font.
Information | Parameters file:String - filename of the font to load size:Int - PT size of this font style:Int - style of this font. defaults to FS_NONE. Font styles are: FS_NONE, FS_BOLDFONT, FS_ITALICFONT.

Function ib3d_MouseX:Int()
Returns | X location.
Description | Returns the X location of the mouse on the screen.

Function ib3d_MouseY:Int()
Returns | Y location.
Description | Returns the Y location of the mouse on the screen.

Function ib3d_MoveEntity(entity:ib3d_Entity,x:Float,y:Float,z:Float)
Description | Moves an entity relative to its current position and orientation.
Information | Parameters entity:ib3d_Entity - entity instance x:Float - x amount entity will be moved by y:Float - y amount entity will be moved by z:Float - z amount entity will be moved by What this means is that an entity will move in whatever direction it is facing. So for example if you have an game character is upright when first loaded into Blitz3D and it remains upright (i.e. turns left or right only), then moving it by a z amount will always see it move forward or backward, moving it by a y amount will always see it move up or down, and moving it by an x amount will always see it strafe.

Function ib3d_NameEntity(entity:ib3d_Entity,name:String)
Description | Sets an entities name.
Information | Parameters entity:ib3d_Entity - entity instance name:String - name of entity

Function ib3d_PickedEntity:ib3d_Entity()
Returns | The last picked entity.
Description | Returns the entity 'picked' by the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick or LinePick. Returns Null if no entity was picked.

Function ib3d_PickedNX:Float()
Returns | X normal value.
Description | Returns the X component of the normal of the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick or LinePick.

Function ib3d_PickedNY:Float()
Returns | Y normal value.
Description | Returns the Y component of the normal of the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick or LinePick.

Function ib3d_PickedNZ:Float()
Returns | Z normal value.
Description | Returns the Z component of the normal of the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick or LinePick.

Function ib3d_PickedPoint:Vector3df()
Returns | Coordinate as a Vector3df.
Description | Returns the world coordinate of the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick or LinePick. The coordinate represents the exact point of where something was picked.

Function ib3d_PickedTime:Int()
Returns | Time taken in milliseconds.
Description | Returns the time taken to calculate the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick or LinePick.

Function ib3d_PickedTriangle:Triangle3df()
Returns | Triangle picked as Triangle3df.
Description | Returns the triangle that was 'picked' by the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick Or LinePick. NOTE: This is different than B3D.

Function ib3d_PickedX:Float()
Returns | X coordinate value.
Description | Returns the world X coordinate of the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick or LinePick. The coordinate represents the exact point of where something was picked.

Function ib3d_PickedY:Float()
Returns | Y coordinate value.
Description | Returns the world Y coordinate of the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick or LinePick. The coordinate represents the exact point of where something was picked.

Function ib3d_PickedZ:Float()
Returns | Z coordinate value.
Description | Returns the world Z coordinate of the most recently executed Pick command.
Information | Last pick command might have been CameraPick, EntityPick or LinePick. The coordinate represents the exact point of where something was picked.

Function ib3d_PointEntity(entity:ib3d_Entity,target:ib3d_Entity,roll:Float=0.0)
Description | Points one entity at another.
Information | Parameters entity:ib3d_Entity - entity instance target:ib3d_Entity - target entity roll:Float - roll angle of entity. Defaults to 0.0. NOTE: Completely hosed.... The optional roll parameter allows you to specify a roll angle as pointing an entity only sets pitch and yaw angles. If you wish for an entity to point at a certain position rather than another entity, simply create a pivot entity at your desired position, point the entity at this and then free the pivot.

Function ib3d_PositionEntity(entity:ib3d_Entity,x:Float,y:Float,z:Float,globl:Int=False)
Description | Positions an entity at an absolute position in 3D space.
Information | Parameters entity:ib3d_Entity - entity instance x:Float - x coordinate the entity will be positioned at y:Float - y coordinate the entity will be positioned at z:Float - z coordinate the entity will be positioned at globl:Int - True if the position should be relative to 0,0,0 rather than the entities parent position. Defaults to False. Entities are positioned using an x,y,z coordinate system. x, y and z each have their own axis, and each axis has its own set of values. By specifying a value for each axis, you can position an entity anywhere in 3D space. 0,0,0 is the centre of 3D space, and if the camera is pointing in the default positive z direction, then positioning an entity with a z value of above 0 will make it appear in front of the camera, whereas a negative z value would see it disappear behind the camera. Changing the x value would see it moving sideways, and changing the y value would see it moving up/down. Of course, the direction in which entities appear to move is relative to the position and orientation of the camera.

Function ib3d_ProjectedX:Float(CAMERA:CAMERA)
Returns | The X coordinate.
Description | Returns the viewport X coordinate of the last ib3d_CameraProject() call.
Information | Parameters camera:CAMERA - camera to return the last projected X for

Function ib3d_ProjectedY:Float(CAMERA:CAMERA)
Returns | The Y coordinate.
Description | Returns the viewport Y coordinate of the last ib3d_CameraProject() call.
Information | Parameters camera:CAMERA - camera to return the last projected Y for

Function ib3d_ProjectedZ:Float(CAMERA:CAMERA)
Returns | The Z coordinate.
Description | Returns the viewport Z coordinate of the last ib3d_CameraProject() call.
Information | Parameters camera:CAMERA - camera to return the last projected Z for

Function ib3d_RenderDrawCmds:Int()
Returns | True if draw commands were successfully rendered.
Description | Renders all draw commands for the current frame.
Information | Must be called between ib3d_RenderWorldBegin() and ib3d_RenderWorldEnd() calls and after ib3d_RenderEntities().

Function ib3d_RenderEntities:Int()
Returns | True if entities were successfully rendered.
Description | Renders all entities for the current frame.
Information | Must be called between ib3d_RenderWorldBegin() and ib3d_RenderWorldEnd() calls.

Function ib3d_RenderGUI:Int()
Returns | True if GUI elements were successfully rendered.
Description | Renders all GUI elements for the current frame.
Information | Must be called between ib3d_RenderWorldBegin() and ib3d_RenderWorldEnd() calls.

Function ib3d_RenderWorld(showGUI:Int=True,tween:Float=1)
Description | Renders the current scene to the BackBuffer onto the rectangle defined by each cameras CameraViewport( ). Every camera not hidden by HideEntity( ) or with a CameraProjMode( ) of 0 is rendered.
Information | Parameters showGUI:Int - Set to False to not render GUI elements. Defaults to True. tween:Float - Currently not available.

Function ib3d_RenderWorldBegin:Int()
Returns | True if the rendering for the frame was successfully intitialized.
Description | Initializes rendering for the current frame.
Information | Used instead of ib3d_RenderWorld() if you need more control over the rendering process (ie custom rendering after entities are rendered).

Function ib3d_RenderWorldEnd()
Description | Stops rendering of the current frame.
Information | This should only be used if ib3d_RenderWorldBegin() has been called.

Function ib3d_RotateEntity(entity:ib3d_Entity,pitch:Float,yaw:Float,roll:Float,globl:Int=False)
Returns |
Description | Rotates an entity so that it is at an absolute orientation.
Information | Parameters entity:ib3d_Entity - entity instance pitch:Float - angle in degress of pitch rotation yaw:Float - angle in degrees of yaw rotation roll:Float - angle in degrees of roll rotation globl:Int - True if the angle to be rotated should be relative to 0,0,0 rather than a parent entities orientation. Defaults to False. Pitch is the same as the x angle of an entity, and is equivalent to tilting forward/backwards. Yaw is the same as the y angle of an entity, and is equivalent to turning left/right. Roll is the same as the z angle of an entity, and is equivalent to tilting left/right.

Function ib3d_ScaleEntity(entity:ib3d_Entity,x:Float,y:Float,z:Float)
Description | Scales an entity so that it is of an absolute size.
Information | Parameters entity:ib3d_Entity - entity instance x:Float - x size of entity y:Float - y size of entity z:Float - z size of entity Scale values of 1,1,1 are the default size when creating/loading entities. Scale values of 2,2,2 will double the size of an entity. Scale values of 0,0,0 will make an entity disappear. Scale values of less than 0,0,0 will invert an entity and make it bigger.

Function ib3d_SetFontColor(red:Int=255,green:Int=255,blue:Int=255,alpha:Int=255)
Description | Sets the color that is used to draw text.
Information | Parameters red:Int - red color component. defaults to 255. green:Int - green color component. defaults to 255. blue:Int - blue color component. defaults to 255. alpha:Int - alpha color component. defaults to 255. Default color is white.

Function ib3d_SetImageFont(fnt:FONT=Null)
Description | Sets the current font used for ib3d_DrawText commands.
Information | Parameters fnt:FONT - the new font to use To use the default font pass null or call with no parameter.

Function ib3d_SetSpeed(new_speed:Float=1.0)
Description | Sets the speed at which the iB3D engine runs.
Information | Parameters new_speed:Float - new speed in at which the engine runs. Default is 1.0. Turn, Move, and animation speeds are dynamically adjusted based on this value.

Function ib3d_ShadowColor(alpha:Int=150,red:Int=0,green:Int=0,blue:Int=0)
Description | Sets the color of stencil buffers shadows.
Information | Parameters alpha:Int - alpha component of shadow. Defaults to 150. red:Int - red component of shadow. Defaults to 0. green:Int - green component of shadow. Defaults to 0. blue:Int - blue component of shadow. Defaults to 0.

Function ib3d_ShowEntity(entity:ib3d_Entity)
Description | Shows an entity.
Information | Parameters entity:ib3d_Entity - entity instance Once an entity has been hidden using ib3d_HideEntity, use show entity to make it visible and involved in collisions again. Note that ib3d_ShowEntity has no effect if the enitities parent object is hidden. Entities are shown by default after creating/loading them, so you should only need to use ib3d_ShowEntity after using ib3d_HideEntity. ib3d_ShowEntity affects the specified entity only - child entities are not affected.

Function ib3d_TFormedX:Float()
Returns | X component.
Description | Returns the X component of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.

Function ib3d_TFormedY:Float()
Returns | Y component.
Description | Returns the Y component of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.

Function ib3d_TFormedZ:Float()
Returns | Z component.
Description | Returns the Z component of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.

Function ib3d_TFormPoint:Vector3df(x:Float,y:Float,z:Float,source:ib3d_Entity,dest:ib3d_Entity)
Returns | Returns the transformed point as a vector3df.
Description | Transforms between coordinate systems.
Information | Parameters x:Float - X coordinate of a point in 3d space y:Float - Y coordinate of a point in 3d space z:Float - Z coordinate of a point in 3d space source:ib3d_Entity - instance of source entity, or Null for 3d world dest:ib3d_Entity - instance of destination entity, or Null for 3d world After using TFormPoint the new coordinates can be read with ib3d_TFormedX(), ib3d_TFormedY() and ib3d_TFormedZ(). See ib3d_EntityX() for details about local coordinates. Consider a sphere built with CreateSphere(). The 'north pole' is at (0,1,0). At first, local and global coordinates are the same. As the sphere is moved, turned and scaled the global coordinates of the point change. But it is always at (0,1,0) in the sphere's local space.

Function ib3d_TFormVector:Vector3df(x:Float,y:Float,z:Float,source:ib3d_Entity,dest:ib3d_Entity)
Returns | Returns the transformed point as a vector3df.
Description | Transforms the passed vector coordinates between coordinate systems.
Information | Parameters x:Float - X coordinate of a vector in 3d space y:Float - Y coordinate of a vector in 3d space z:Float - Z coordinate of a vector in 3d space source:ib3d_Entity - instance of source entity, or Null for 3d world dest:ib3d_Entity - instance of destination entity, or Null for 3d world After using TFormPoint the new coordinates can be read with ib3d_TFormedX(), ib3d_TFormedY() and ib3d_TFormedZ(). See ib3d_EntityX() for details about local coordinates. Similar to ib3d_TFormPoint, but operates on a vector. A vector can be thought of as 'displacement relative to current location'. For example, vector (1,2,3) means one step to the right, two steps up and three steps forward. This is analogous to ib3d_PositionEntity and ib3d_MoveEntity: ib3d_PositionEntity entity, x,y,z ; put entity at point (x,y,z) ib3d_MoveEntity entity, x,y,z ; add vector (x,y,z) to current position.

Function ib3d_TrackEntity(CAMERA:CAMERA,track:ib3d_Entity=Null)
Description | Sets the camera to track an entity.
Information | Parameters camera:CAMERA - camera instance to set the viewport for track:ib3d_Entity - The entity to track. Pass Null to disable tracking. Tracking causes the camera to to look independantly of the rotation of the camera.

Function ib3d_TranslateEntity(entity:ib3d_Entity,x:Float,y:Float,z:Float,globl:Int=False)
Description | Translates (moves) an entity relative to its current position and not its orientation.
Information | Parameters entity:ib3d_Entity - entity instance x:Float - x amount the entity will be translated by y:Float - y amount the entity will be translated by z:Float - z amount the entity will be translated by

Function ib3d_TriangleVertex:Int(surf:SURFACE,triangle_index:Int,corner:Short)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_TurnEntity(entity:ib3d_Entity,pitch:Float,yaw:Float,roll:Float,globl:Int=False)
Description | Turns an entity relative to its current orientation.
Information | Parameters entity:ib3d_Entity - entity instance pitch:Float - angle in degress the entity will be pitched yaw:Float - angle in degrees the entity will be yawed roll:Float - angle in degrees the entity will be rolled Pitch is the same as the x angle of an entity, and is equivalent to tilting forward/backwards. Yaw is the same as the y angle of an entity, and is equivalent to turning left/right. Roll is the same as the z angle of an entity, and is equivalent to tilting left/right.

Function ib3d_UpdateWorld(anim_speed:Float=1.0)
Description | Animates all entities in the world, and performs collision checking.
Information | Parameters anim_speed:Float - Allows you affect the animation speed of all entities at once. A value of 1 will animate entities at their usual animation speed, a value of 2 will animate entities at double their animation speed, and so on. Defaults to 1.0. NOTE: anim_speed is not yet available.

Function ib3d_VertexBlue:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexColor(surf:SURFACE,index:Int,red:Float,green:Float,blue:Float)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexCoords(surf:SURFACE,index:Int,x:Float,y:Float,z:Float)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexGreen:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexNormal(surf:SURFACE,index:Int,nx:Float,ny:Float,nz:Float)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexNX:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexNY:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexNZ:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexRed:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexTexCoords(surf:SURFACE,index:Int,u:Float,v:Float)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexU:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexV:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexX:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexY:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function ib3d_VertexZ:Float(surf:SURFACE,index:Int)
Returns |
Description |
Information | Parameters surf:SURFACE - an instance of a surface

Function round:Float(val:Float,dec:Int)
Returns | the rounded float.
Description | Rounds a float to a certain of digits.

Function TriangleCenter:Vector3df(pointA:Vector3df,pointB:Vector3df,pointC:Vector3df)
Returns | the center point as a Vector3df.
Description | Returns the center point of a triangle based on 3 vertices.
Information | based on forum code from big10p.

## Types

Type ib3d_base
Description | Base type for all ib3d types.

Type ib3d_EventReceiver Extends IEventReceiver
Description | Event receiver for handling multiple inputs at one time.

Methods Summary
FlushKeys | Changes all key states to False.
FlushMouse | Changes all mouse_button states to False.
IsKeyDown | Checks to see if a key is currently down.
IsKeyDownUp | Checks to see if a key state changed from down to up.
IsKeyUpDown | Checks to see if a key state changed from up to down.
IsMouseButtonDown | Checks to see if a mouse button is currently down.
IsMouseButtonDownUp | Checks to see if a mouse button state changed from down to up.
IsMouseButtonUpDown | Checks to see if a mouse button state changed from up to down.
KeyHitCnt | Returns the of times a key has been hit since the last clear.
MouseHitCnt | Returns the of times a mouse button has been hit since the last clear.
MouseX | Returns the X position of the mouse.
MouseY | Returns the Y position of the mouse.
MouseZ | Returns the Z (scrollwheel) position of the mouse.

Functions Summary
createReceiver | Creates the smooth event receiver.

Method FlushKeys()
Description | Changes all key states to False.

Method FlushMouse()
Description | Changes all mouse_button states to False.

Method IsKeyDown:Int(index:Int,bCheckShift:Int=False,bCheckCtrl:Int=False,bCheckMenu:Int=False)
Returns | True if the key is currently down.
Description | Checks to see if a key is currently down.
Information | Parameters index:Int - The key to check. bCheckShift:Int - True to only return true if a Shift key is pressed as well. Defaults to False. bCheckCtrl:Int - True to only return true if a CTRL key is pressed as well. Defaults to False. bCheckMenu:Int - True to only return true if a Menu (ALT) key is pressed as well. Defaults to False.

Method IsKeyDownUp:Int(index:Int,bClear:Int=True)
Returns | True if the state changed.
Description | Checks to see if a key state changed from down to up.
Information | Parameters index:Int - The key to check. bClear:Int - False to not clear the down up state. Defaults to True.

Method IsKeyUpDown:Int(index:Int,bClear:Int=True)
Returns | True if the state changed.
Description | Checks to see if a key state changed from up to down.
Information | Parameters index:Int - The key to check. bClear:Int - False to not clear the up down state. Defaults to True.

Method IsMouseButtonDown:Int(index:Int,bCheckShift:Int=False,bCheckCtrl:Int=False,bCheckMenu:Int=False)
Returns | True if the mouse button is currently down.
Description | Checks to see if a mouse button is currently down.
Information | Parameters index:Int - The mouse button to check to check. (see SER_MOUSE constants) bCheckShift:Int - True to only return true if a Shift key is pressed as well. Defaults to False. bCheckCtrl:Int - True to only return true if a CTRL key is pressed as well. Defaults to False. bCheckMenu:Int - True to only return true if a Menu (ALT) key is pressed as well. Defaults to False.

Method IsMouseButtonDownUp:Int(index:Int,bClear:Int=True)
Returns | True if the state changed.
Description | Checks to see if a mouse button state changed from down to up.
Information | Parameters index:Int - The mouse button to check to check. (see SER_MOUSE constants) bClear:Int - False to not clear the down up state. Defaults to True.

Method IsMouseButtonUpDown:Int(index:Int,bClear:Int=True)
Returns | True if the state changed.
Description | Checks to see if a mouse button state changed from up to down.
Information | Parameters index:Int - The mouse button to check to check. (see SER_MOUSE constants) bClear:Int - False to not clear the up down state. Defaults to True.

Method KeyHitCnt:Int(index:Int,bClear:Int=False)
Returns | Integer count.
Description | Returns the of times a key has been hit since the last clear.
Information | Parameters index:Int - The key to check. bClear:Int - Pass True to clear out the hit count. Defaults to False

Method MouseHitCnt:Int(index:Int,bClear:Int=False)
Returns | Integer count.
Description | Returns the of times a mouse button has been hit since the last clear.
Information | Parameters index:Int - The mouse button to check to check. (see SER_MOUSE constants) bClear:Int - Pass True to clear out the hit count. Defaults to False

Method MouseX:Int()
Returns | X position as an integer.
Description | Returns the X position of the mouse.

Method MouseY:Int()
Returns | Y position as an integer.
Description | Returns the Y position of the mouse.

Method MouseZ:Float()
Returns | The scrollwheel position represented as a Float between -1.0 and 1.0.
Description | Returns the Z (scrollwheel) position of the mouse.
Information | NOTE: I have found this to be pretty flaky so use with care.

Function createReceiver:ib3d_EventReceiver()
Returns | An instance of smooth event receiver.
Description | Creates the smooth event receiver.
Information | Pass the returned instance to the device to start receiving input.

## Module Information

Name | iB3D: Blitz3D-style command set for Irrlicht.Core
Description |
License | Public Domain
Authors | gman, _Jen, Wave (Delta), CoderLaureate (THashtable), Yan (Bit functions), eax for SViewFrustum::classifyBoxRelation()
CustomAttr |