Irrlicht.B3D: Constants Functions Types Modinfo Source  

iB3D: Blitz3D-style command set for Irrlicht.Core

Constants

Const CT_FPS:Int
DescriptionFPS camera.

Const CT_MAYA:Int
DescriptionMAYA camera.

Const CT_NORMAL:Int
DescriptionNormal camera.

Const PM_BOX:Int
DescriptionPickMode BoundingBox.

Const PM_POLYGON:Int
DescriptionPickMode Polygon.

Const PM_SPHERE:Int
DescriptionPickMode Sphere (not used, will default to PM_BOX)

Const PM_UNPICKABLE:Int
DescriptionPickMode Unpickable (default)

Functions

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

Function ib3d_AddTriangle(surf:SURFACE,v0:Short,v1:Short,v2:Short)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

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
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_AddZipFileArchive:Int(file:String,bIgnoreCase:Int=True,bIgnorePaths:Int=True)
ReturnsReturns true if the archive was added successful, false if not.
DescriptionAdds an zip archive to the file system.
InformationParameters
  • 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)
DescriptionSets the ambient lighting color.
InformationParameters
  • 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))
DescriptionSets the aspect ratio for the camera.
InformationParameters
  • 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)
DescriptionSets camera background color.
InformationParameters
  • 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)
DescriptionSets the camera clear mode.
InformationParameters
  • 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)
DescriptionSets the camera fog color.
InformationParameters
  • 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
InformationParameters
  • camera:CAMERA - camera instance
  • -
keyword:

Function ib3d_CameraFogMode(CAMERA:CAMERA,mode:Int=FM_NONE)
DescriptionSets the camera fog mode.
InformationParameters
  • camera:CAMERA - camera instance
  • mode:Int - the new fog mode.
keyword:

Function ib3d_CameraFogRange(CAMERA:CAMERA,near:Float=50.0,far:Float=100.0)
DescriptionSets the camera fog range.
InformationParameters
  • 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)
Returnsthe picked entity.
DescriptionPicks the entity positioned at the specified viewport coordinates.
InformationParameters
  • 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)
DescriptionProjects the world coordinates x,y,z onto the screen.
InformationParameters
  • 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)
DescriptionSets the camera projection mode.
InformationParameters
  • 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)
DescriptionSets camera range.
InformationParameters
  • 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)
DescriptionSets the camera viewport position and size.
InformationParameters
  • 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)
DescriptionSets the zoom factor for a camera.
InformationParameters
  • camera:CAMERA - camera instance
  • zoom:Float - The new zoom factor. Defaults to 1.0.

Function ib3d_CountChildren:Int(entity:ib3d_Entity)
Returns of children.
DescriptionReturns the of children of an entity.
InformationParameters
  • entity:ib3d_Entity - entity instance

Function ib3d_CountVertices:Int(surf:SURFACE)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_CreateBrush:BRUSH(red:Float=255,green:Float=255,blue:Float=255)
DescriptionCreates a brush.
InformationParameters
  • entity:ib3d_Entity - entity instance

Function ib3d_CreateCamera:CAMERA(parent:ib3d_Entity=Null,camType:Int=CT_NORMAL)
ReturnsA new camera instance.
DescriptionCreates a camera entity.
InformationParameters
  • 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)
ReturnsThe new cube entity.
DescriptionCreates a cube entity.
InformationParameters
  • parent:ib3d_Entity - parent entity of cube

Function ib3d_CreateLight:LIGHT(parent:ib3d_Entity=Null)
ReturnsA new instance of a light.
DescriptionCreates a light.
InformationParameters
  • 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)
ReturnsThe new pivot entity.
DescriptionCreates a pivot entity.
InformationParameters
  • 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)
ReturnsThe new sphere entity.
DescriptionCreates a sphere entity.
InformationParameters
  • 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
InformationParameters
  • mesh:MESH - an instance of a mesh to add the surface to
keyword:

Function ib3d_DrawLine(x1:Float,y1:Float,z1:Float,x2:Float,y2:Float,z2:Float,red:Int=255,green:Int=255,blue:Int=255)
DescriptionDraws a 3d line on the screen from provided points.
InformationParameters
  • 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)
DescriptionDraws a 3d line on the screen from provided instance of line3df.
InformationParameters
  • 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)
DescriptionDraws Text on the screen using the current font and color.
InformationParameters
  • 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)
DescriptionDraws a 3d "wire" triangle on the screen from provided points.
InformationParameters
  • 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)
DescriptionDraws a 3d "wire" triangle on the screen from provided instance of Triangle3df.
InformationParameters
  • 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()
DescriptionUninitializes the graphics system.
InformationDestroys all windows and objects since the ib3d_Graphics3D() call.

Function ib3d_EntityAmbientColor(entity:ib3d_Entity,red:Float,green:Float,blue:Float,MaterialIDX:Int=0)
DescriptionHow much ambient light (a global light) is reflected by this entity.
InformationParameters
  • 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)
DescriptionSets the blending mode of an entity.
InformationParameters
  • 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)
DescriptionSets the color of an entity.
InformationParameters
  • 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)
DescriptionShows debug data such as boundingboxes.
InformationParameters
  • 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)
DescriptionHow much diffuse light coming from a light source is reflected by this entity.
InformationParameters
  • 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)
ReturnsThe distance.
DescriptionReturns the distance between the passed entities.
InformationParameters
  • 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)
DescriptionLight emitted by this entity.
InformationParameters
  • 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)
DescriptionSets miscellaneous effects for an entity.
InformationParameters
  • 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)
ReturnsThe current speed setting.
DescriptionReturns the current entity speed setting.
InformationParameters
  • entity:ib3d_Entity - entity instance

Function ib3d_EntityGetUserData:Object(entity:ib3d_Entity,key:String)
Returnsa user data object or Null if not found.
DescriptionRetrieves user data stored with the entity.
InformationParameters
  • entity:ib3d_Entity - entity instance
  • key:String - Key for the user data

Function ib3d_EntityInView:Int(CAMERA:CAMERA,entity:ib3d_Entity)
Returns0 if entity is not in view. 1 if in partial view. 2 if in full view.
DescriptionReturns if the passed entity is in view of the camera.
InformationParameters
  • camera:CAMERA - camera instance to set the viewport for
  • entity:ib3d_Entity - The entity to check.

Function ib3d_EntityName:String(entity:ib3d_Entity)
ReturnsEntity name.
DescriptionReturns the name of an entity.
InformationParameters
  • entity:ib3d_Entity - entity instance

Function ib3d_EntityParent(entity:ib3d_Entity,parent:ib3d_Entity,globl:Int=True)
DescriptionAttaches an entity to a parent.
InformationParameters
  • 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.
keyword:

Function ib3d_EntityPick:ib3d_Entity(entity:ib3d_Entity,range:Float=1000.00)
Returnsthe picked entity.
DescriptionReturns the nearest entity 'ahead' of the specified entity.
InformationParameters
  • 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)
DescriptionSets the pick mode for an entity.
InformationParameters
  • 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)
ReturnsThe current Pitch.
DescriptionReturns the Pitch (X) angle of an entity.
InformationParameters
  • 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)
DescriptionRemoves user data stored with the entity.
InformationParameters
  • entity:ib3d_Entity - entity instance
  • key:String - Key for the user data

Function ib3d_EntityRoll:Float(entity:ib3d_Entity,globl:Int=False)
ReturnsThe current Roll.
DescriptionReturns the Roll (Z) angle of an entity.
InformationParameters
  • 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)
DescriptionSets the OnPicked event handler for an entity.
InformationParameters
  • 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)
DescriptionSets the speed at which an entity moves and rotates.
InformationParameters
  • 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)
DescriptionAssociates an object with the entity.
InformationParameters
  • 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)
DescriptionValue affecting the size of specular highlights.
InformationParameters
  • 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)
DescriptionHow much specular light (highlights from a light) is reflected.
InformationParameters
  • 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)
DescriptionApplies a texture to an entity.
InformationParameters
  • 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)
ReturnsThe X-coordinate.
DescriptionThe X-coordinate of the entity.
InformationParameters
  • 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)
ReturnsThe Y-coordinate.
DescriptionThe Y-coordinate of the entity.
InformationParameters
  • 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)
ReturnsThe current Yaw.
DescriptionReturns the Yaw (Y) angle of an entity.
InformationParameters
  • 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)
ReturnsThe Z-coordinate.
DescriptionThe Z-coordinate of the entity.
InformationParameters
  • 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)
Returnsa child entity or null if none found.
DescriptionReturns the first child of the specified entity with the matching child name.
InformationParameters
  • entity:ib3d_Entity - entity instance
  • name:String - name of the child to find within the entity

Function ib3d_FreeEntity(entity:ib3d_Entity Var)
DescriptionFrees up resources associated with the entity and removes it from the scene.
InformationParameters
  • entity:ib3d_Entity - entity instance

Function ib3d_GetChild:ib3d_Entity(entity:ib3d_Entity,index:Int)
Returnsa child entity or null if none found.
DescriptionReturns a child of an entity.
InformationParameters
  • 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()
Returnsinstance of the current font.
DescriptionReturns the current font used for ib3d_DrawText commands.

Function ib3d_GetParent:ib3d_Entity(entity:ib3d_Entity)
ReturnsParent entity.
DescriptionReturns an entities parent.
InformationParameters
  • entity:ib3d_Entity - entity instance

Function ib3d_GetSpeed:Float()
ReturnsThe current engine speed in %
DescriptionReturns 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)
ReturnsTrue if success.
DescriptionSets 3D Graphics mode and initializes the graphics system.
InformationParameters
  • 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)
ReturnsTrue if success.
DescriptionSets 3D Graphics mode and initializes the graphics system from a creation parameters object.
InformationParameters
  • params:SIrrlichtCreationParameters - parameters to use for the creation.

Function ib3d_HideEntity(entity:ib3d_Entity)
DescriptionHides an entity so that it is no longer visible and is no longer involved in collisions.
InformationParameters
  • 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)
ReturnsFalse if the key is not held down, True if the key is held down.
DescriptionUsed to detect if a key is being held down.
InformationParameters
  • scancode:Int - corresponding key scancode

Function ib3d_KeyHit:Int(scancode:Int)
ReturnsTimes key was hit.
DescriptionReturns the number of times a specified key has been hit since the last time you called the KeyHit() command.
InformationParameters
  • scancode:Int - corresponding key scancode

Function ib3d_LastPickRay:Line3df()
Returnsthe ray as a Line3df.
DescriptionReturns the ray used for the last pick call.
InformationReturns 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)
ReturnsX,Y,Z is returned via the parameters passed in.
DescriptionReturns the viewport X,Y,Z of the last ib3d_CameraProject() call.
InformationParameters
  • x:Float Var - return X value
  • y:Float Var - return Y value
  • z:Float Var - return Z value
keyword:

Function ib3d_LastTFormed(x:Float Var,y:Float Var,z:Float Var)
DescriptionReturns the X,Y,Z components of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.
InformationParameters
  • 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)
DescriptionSets the ambient color for a light.
InformationParameters
  • 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)
DescriptionDetermines if the light is to cast shadows or not.
InformationParameters
  • 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
DescriptionSets the color of a light.
InformationParameters
  • 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)
DescriptionSets the diffuse color for a light.
InformationParameters
  • 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)
DescriptionSets the range of a light.
InformationParameters
  • 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)
DescriptionSets the specular color for a light.
InformationParameters
  • 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)
Returnsthe picked entity.
DescriptionReturns the first entity between x,y,z to x+dx,y+dy,z+dz.
InformationParameters
  • 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)
Returnsinstance of the loaded font.
DescriptionLoads an image font.
InformationParameters
  • 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()
ReturnsX location.
DescriptionReturns the X location of the mouse on the screen.

Function ib3d_MouseY:Int()
ReturnsY location.
DescriptionReturns the Y location of the mouse on the screen.

Function ib3d_MoveEntity(entity:ib3d_Entity,x:Float,y:Float,z:Float)
DescriptionMoves an entity relative to its current position and orientation.
InformationParameters
  • 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)
DescriptionSets an entities name.
InformationParameters
  • entity:ib3d_Entity - entity instance
  • name:String - name of entity

Function ib3d_PickedEntity:ib3d_Entity()
ReturnsThe last picked entity.
DescriptionReturns the entity 'picked' by the most recently executed Pick command.
InformationLast pick command might have been CameraPick, EntityPick or LinePick.

Returns Null if no entity was picked.

Function ib3d_PickedNX:Float()
ReturnsX normal value.
DescriptionReturns the X component of the normal of the most recently executed Pick command.
InformationLast pick command might have been CameraPick, EntityPick or LinePick.

Function ib3d_PickedNY:Float()
ReturnsY normal value.
DescriptionReturns the Y component of the normal of the most recently executed Pick command.
InformationLast pick command might have been CameraPick, EntityPick or LinePick.

Function ib3d_PickedNZ:Float()
ReturnsZ normal value.
DescriptionReturns the Z component of the normal of the most recently executed Pick command.
InformationLast pick command might have been CameraPick, EntityPick or LinePick.

Function ib3d_PickedPoint:Vector3df()
ReturnsCoordinate as a Vector3df.
DescriptionReturns the world coordinate of the most recently executed Pick command.
InformationLast pick command might have been CameraPick, EntityPick or LinePick.

The coordinate represents the exact point of where something was picked.

Function ib3d_PickedTime:Int()
ReturnsTime taken in milliseconds.
DescriptionReturns the time taken to calculate the most recently executed Pick command.
InformationLast pick command might have been CameraPick, EntityPick or LinePick.

Function ib3d_PickedTriangle:Triangle3df()
ReturnsTriangle picked as Triangle3df.
DescriptionReturns the triangle that was 'picked' by the most recently executed Pick command.
InformationLast pick command might have been CameraPick, EntityPick Or LinePick.

NOTE: This is different than B3D.

Function ib3d_PickedX:Float()
ReturnsX coordinate value.
DescriptionReturns the world X coordinate of the most recently executed Pick command.
InformationLast pick command might have been CameraPick, EntityPick or LinePick.

The coordinate represents the exact point of where something was picked.

Function ib3d_PickedY:Float()
ReturnsY coordinate value.
DescriptionReturns the world Y coordinate of the most recently executed Pick command.
InformationLast pick command might have been CameraPick, EntityPick or LinePick.

The coordinate represents the exact point of where something was picked.

Function ib3d_PickedZ:Float()
ReturnsZ coordinate value.
DescriptionReturns the world Z coordinate of the most recently executed Pick command.
InformationLast 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)
DescriptionPoints one entity at another.
InformationParameters
  • 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)
DescriptionPositions an entity at an absolute position in 3D space.
InformationParameters
  • 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)
ReturnsThe X coordinate.
DescriptionReturns the viewport X coordinate of the last ib3d_CameraProject() call.
InformationParameters
  • camera:CAMERA - camera to return the last projected X for

Function ib3d_ProjectedY:Float(CAMERA:CAMERA)
ReturnsThe Y coordinate.
DescriptionReturns the viewport Y coordinate of the last ib3d_CameraProject() call.
InformationParameters
  • camera:CAMERA - camera to return the last projected Y for

Function ib3d_ProjectedZ:Float(CAMERA:CAMERA)
ReturnsThe Z coordinate.
DescriptionReturns the viewport Z coordinate of the last ib3d_CameraProject() call.
InformationParameters
  • camera:CAMERA - camera to return the last projected Z for

Function ib3d_RenderDrawCmds:Int()
ReturnsTrue if draw commands were successfully rendered.
DescriptionRenders all draw commands for the current frame.
InformationMust be called between ib3d_RenderWorldBegin() and ib3d_RenderWorldEnd() calls and after ib3d_RenderEntities().

Function ib3d_RenderEntities:Int()
ReturnsTrue if entities were successfully rendered.
DescriptionRenders all entities for the current frame.
InformationMust be called between ib3d_RenderWorldBegin() and ib3d_RenderWorldEnd() calls.

Function ib3d_RenderGUI:Int()
ReturnsTrue if GUI elements were successfully rendered.
DescriptionRenders all GUI elements for the current frame.
InformationMust be called between ib3d_RenderWorldBegin() and ib3d_RenderWorldEnd() calls.

Function ib3d_RenderWorld(showGUI:Int=True,tween:Float=1)
DescriptionRenders 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.
InformationParameters
  • showGUI:Int - Set to False to not render GUI elements. Defaults to True.
  • tween:Float - Currently not available.

Function ib3d_RenderWorldBegin:Int()
ReturnsTrue if the rendering for the frame was successfully intitialized.
DescriptionInitializes rendering for the current frame.
InformationUsed instead of ib3d_RenderWorld() if you need more control over the rendering process (ie custom rendering after entities are rendered).

Function ib3d_RenderWorldEnd()
DescriptionStops rendering of the current frame.
InformationThis 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
DescriptionRotates an entity so that it is at an absolute orientation.
InformationParameters
  • 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)
DescriptionScales an entity so that it is of an absolute size.
InformationParameters
  • 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=0)
DescriptionSets the color that is used to draw text.
InformationParameters
  • 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 0.
Default color is white.

Function ib3d_SetImageFont(fnt:FONT=Null)
DescriptionSets the current font used for ib3d_DrawText commands.
InformationParameters
  • 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)
DescriptionSets the speed at which the iB3D engine runs.
InformationParameters
  • 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)
DescriptionSets the color of stencil buffers shadows.
InformationParameters
  • 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)
DescriptionShows an entity.
InformationParameters
  • 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()
ReturnsX component.
DescriptionReturns the X component of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.

Function ib3d_TFormedY:Float()
ReturnsY component.
DescriptionReturns the Y component of the last ib3d_TFormPoint, ib3d_TFormVector or ib3d_TFormNormal operation.

Function ib3d_TFormedZ:Float()
ReturnsZ component.
DescriptionReturns 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)
ReturnsReturns the transformed point as a vector3df.
DescriptionTransforms between coordinate systems.
InformationParameters
  • 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)
ReturnsReturns the transformed point as a vector3df.
DescriptionTransforms the passed vector coordinates between coordinate systems.
InformationParameters
  • 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)
DescriptionSets the camera to track an entity.
InformationParameters
  • 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)
DescriptionTranslates (moves) an entity relative to its current position and not its orientation.
InformationParameters
  • 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_TurnEntity(entity:ib3d_Entity,pitch:Float,yaw:Float,roll:Float,globl:Int=False)
DescriptionTurns an entity relative to its current orientation.
InformationParameters
  • 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)
DescriptionAnimates all entities in the world, and performs collision checking.
InformationParameters
  • 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
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexColor(surf:SURFACE,index:Int,red:Float,green:Float,blue:Float)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexCoords(surf:SURFACE,index:Int,x:Float,y:Float,z:Float)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexGreen:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexNormal(surf:SURFACE,index:Int,nx:Float,ny:Float,nz:Float)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexNX:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexNY:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexNZ:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexRed:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexTexCoords(surf:SURFACE,index:Int,u:Float,v:Float)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexU:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexV:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexX:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexY:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function ib3d_VertexZ:Float(surf:SURFACE,index:Int)
Returns
Description
InformationParameters
  • surf:SURFACE - an instance of a surface
keyword:

Function round:Float(val:Float,dec:Int)
Returnsthe rounded float.
DescriptionRounds a float to a certain of digits.

Function TriangleCenter:Vector3df(pointA:Vector3df,pointB:Vector3df,pointC:Vector3df)
Returnsthe center point as a Vector3df.
DescriptionReturns the center point of a triangle based on 3 vertices.
Informationbased on forum code from big10p.

Types

Type ib3d_base
DescriptionBase type for all ib3d types.

Keywords

>
Keyword
Returns
Description
InformationParameters
  • -
keyword:

>
Keyword
Returns
Description
InformationParameters
  • -
keyword:

Module Information

NameiB3D: Blitz3D-style command set for Irrlicht.Core
Description
LicensePublic Domain
Authorsgman, _Jen, Wave (Delta), CoderLaureate (THashtable), Yan (Bit functions), eax for SViewFrustum::classifyBoxRelation()
CustomAttr