| Openb3d.Openb3dcore: | Functions | Types | Modinfo | Source |

# OpenB3D core functions

Core 3D functions and extra functions not in Blitz3D.

## Functions Summary

ActFadeTo | Fades entity to the given alpha value (0..1) at the speed of rate.
ActMoveBy | Moves entity by an x y z position increment at the speed of rate.
ActMoveTo | Moves entity to the given x y z position at the speed of rate.
ActNewtonian | Translates entity in the direction it is moving, rate should be below 1.
ActScaleTo | Scales entity to the given x y z dimensions at the speed of rate.
ActTintTo | Tints entity to the given r g b value (0..255) at the speed of rate.
ActTrackByDistance | Tracks target entity up to a given distance at the speed of rate.
ActTrackByPoint | Tracks target entity at a given point from the entity at the speed of rate.
ActTurnBy | Turns entity by an x y z rotation increment at the speed of rate.
ActTurnTo | Turns entity to the given x y z rotation at the speed of rate.
ActVector | Positions entity according the given x y z vector.
AddAnimSeq | Creates an animation sequence for an entity.
AddMesh | Adds the source mesh to the destination mesh.
AddRenderTarget | undocumented.
AddSurface | Add an existing surface to a mesh.
AddTriangle | Adds a triangle to a surface and returns the triangle's index number.
AddVertex | Adds a vertex to the specified surface and returns the vertices' index number.
AlignToVector | Aligns an entity axis to a vector.
AlphaDiscard | Set discard value (as 0..1) above which to ignore pixel's alpha value, default is 1 (only if flag 2)
AmbientLight | Sets the ambient lighting colour.
AmbientShader | Set default shader for surfaces.
Animate | Animates an entity.
Animating | Returns true if the specified entity is currently animating.
AnimLength | Returns the length of the specified entity's current animation sequence.
AnimSeq | Returns the specified entity's current animation sequence.
AnimTime | Returns the current animation time of an entity.
AntiAlias | Enables or disables fullscreen antialiasing.
AppendAction | Adds action to the end of another one, where act1 happens before act2.
AttachFragShader | Attaches a fragment shader object to a program object, attach vertex first or older compilers will crash.
AttachVertShader | Attaches a vertex shader object to a program object.
BackBufferToTex | Copy the contents of the backbuffer to a texture.
BeginMax2D | Old begin function as in Minib3d is 0, new begin function is 1 (default)
BrushAlpha | Sets the alpha level of a brush.
BrushBlend | Sets the blending mode for a brush.
BrushColor | Sets the colour of a brush.
BrushFX | Sets miscellaneous effects for a brush.
BrushGLBlendFunc | GL equivalent, experimental.
BrushGLColor | GL equivalent, experimental.
BrushShininess | Sets the specular shininess of a brush.
BrushTexture | Assigns a texture to a brush.
BufferToTex | Copy pixmap buffer to texture, buffer must be a byte ptr.
CameraClsColor | Sets camera background color.
CameraClsMode | Sets camera clear mode.
CameraFogColor | Sets camera fog color.
CameraFogMode | Sets the camera fog mode.
CameraFogRange | Sets camera fog range.
CameraPick | Picks the entity positioned at the specified viewport coordinates.
CameraProject | Projects the world coordinates x.
CameraProjMatrix | undocumented.
CameraProjMode | Sets the camera projection mode.
CameraRange | Sets camera range.
CameraToTex | Copy rendered camera view to texture.
CameraViewport | Sets the camera viewport position and size.
CameraZoom | Sets zoom factor for a camera.
CheckFramebufferStatus | Check for framebuffer errors.
ClearCollisions | Clears the collision information list.
ClearSurface | Removes all vertices and/or triangles from a surface.
ClearTextureFilters | Clears the current texture filter list.
ClearWorld | Clears all entities.
CollisionEntity | Returns the other entity involved in a particular collision.
CollisionNX | Returns the x component of the normal of a particular collision.
CollisionNY | Returns the y component of the normal of a particular collision.
CollisionNZ | Returns the z component of the normal of a particular collision.
Collisions | Enables collisions between two different entity types.
CollisionSurface | Returns the handle of the surface belonging to the specified entity that was closest to the point of a particular collision.
CollisionTime | Returns the time taken to calculate a particular collision.
CollisionTriangle | Returns the index number of the triangle belonging to the specified entity that was closest to the point of a particular collision.
CollisionX | Returns the world x coordinate of a particular collision.
CollisionY | Returns the world y coordinate of a particular collision.
CollisionZ | Returns the world z coordinate of a particular collision.
CopyBrush | Returns a copy of the new brush.
CopyEntity | Creates a copy of an entity and returns the handle of the newly created copy.
CopyList | Copy a list or vector. To copy a field list use as a method.
CopyMesh | Creates a copy of a mesh and returns the newly-created mesh's handle.
CopyRect | Copy rectangle of source pixmap pixels to destination, not exactly like B3D.
CopySurface | Returns a copy of the new surface.
CopyTexture | Returns a copy of the new texture.
CountChildren | Returns the number of children of an entity.
CountCollisions | Returns how many collisions an entity was involved in during the last UpdateWorld.
CountMipmaps | Returns the number of mipmaps a texture has.
CountSurfaces | Returns the number of surfaces in a mesh.
CountTriangles | Returns the number of triangles in a surface.
CountVertices | Returns the number of vertices in a surface.
CreateBlob | Create blob from a fluid mesh where radius is the size of the blob.
CreateBone | Create bone.
CreateBrush | Creates a brush and returns a brush handle.
CreateCamera | Creates a camera entity and returns its handle.
CreateCone | Creates a cone mesh/entity and returns its handle.
CreateConstraint | Create constraint force between two entities of given length, doesn't affect rotation.
CreateCube | Creates a cube mesh/entity and returns its handle.
CreateCylinder | Creates a cylinder mesh/entity and returns its handle.
CreateFluid | Create fluid mesh for blobs to use.
CreateFragShader | Returns a new frag shader object from file.
CreateFragShaderString | Returns a new frag shader object from string.
CreateGeosphere | Create geodesic sphere and set terrain size.
CreateLight | Creates a light.
CreateMesh | Create a 'blank' mesh entity and returns its handle.
CreateOcTree | Create octree and set its width, height and depth.
CreateParticleEmitter | Create particle emitter and set sprite for it to use.
CreatePivot | Creates a pivot entity.
CreatePlane | Creates a plane entity and returns its handle.
CreatePostFX | undocumented.
CreateQuad | Create flat quad.
CreateRigidBody | Create rigid physics body attached to four entities.
CreateShader | Load shader from two strings, vertex and fragment.
CreateShaderMaterial | Returns a new shader material without creating any shader objects.
CreateShaderVGF | Load shader from three strings, vertex, geometry and fragment.
CreateShadow | Create stencil shadow, static is for static or dynamic shadows.
CreateSphere | Creates a sphere mesh/entity and returns its handle.
CreateSprite | Creates a sprite entity and returns its handle.
CreateStencil | Create stencil object.
CreateSurface | Creates a surface attached to a mesh and returns the surface's handle.
CreateTerrain | Creates a terrain entity and returns its handle.
CreateTexture | Creates a texture and returns its handle.
CreateVertShader | Returns a new vert shader object from file.
CreateVertShaderString | Returns a new vert shader object from string.
CreateVoxelSprite | Create voxel sprite where slices is the number of sprites.
DeleteFragShader | Deletes a frag shader object from a program object.
DeleteVertShader | Deletes a vert shader object from a program object.
DeltaPitch | Returns the pitch angle.
DeltaYaw | Returns the yaw angle.
DepthBufferToTex | Copy the contents of the depth buffer to a texture.
EmitterParticleAlpha | Set particles alpha at start and end, range is 0..1.
EmitterParticleColor | Set particles RGB color at start and end, default is 255,255,255.
EmitterParticleFunction | Points to callback function for emitter.
EmitterParticleLife | Set particles start, end and random lifespan.
EmitterParticleRotate | Set particles rotation angle at start and end.
EmitterParticleScale | Set particles scale at start and end, default is 1.
EmitterParticleSpeed | Set particles start and end speed.
EmitterRate | Rate between each emission, range is 0.01..1.01.
EmitterVariance | Set random variance of particles, range is 0.001..0.1.
EmitterVector | Set emitters start and end 3d vectors.
EndAction | Ends action so it can be freed, 1 = automatically ended, 2 = manually ended.
EndMax2D | Old end function as in Minib3d is 0, new end function is 1 (default)
EntityAlpha | Sets the entity alpha level of an entity.
EntityBlend | Sets the blending mode of an entity.
EntityBox | Sets the dimensions of an entity's collision box.
EntityClass | Returns a string containing the class of the specified entity.
EntityCollided | Returns the handle of the entity of the specified type that collided with the specified entity.
EntityColor | Sets the color of an entity.
EntityDistance | Returns the distance between src_entity and dest_entity.
EntityFX | Sets miscellaneous effects for an entity.
EntityInView | Returns true if the specified entity is visible to the specified camera.
EntityMatrix | undocumented.
EntityName | Returns the name of an entity.
EntityOrder | Sets the drawing order for an entity.
EntityParent | Attaches an entity to a parent.
EntityPick | Returns the nearest entity 'ahead' of the specified entity.
EntityPickMode | Sets the pick mode for an entity.
EntityPitch | Returns the pitch angle of an entity.
EntityRadius | Sets the radius of an entity's collision ellipsoid.
EntityRoll | Returns the roll angle of an entity.
EntityScaleX | Returns the scale for the x axis of an entity set with ScaleEntity.
EntityScaleY | Returns the scale for the y axis of an entity set with ScaleEntity.
EntityScaleZ | Returns the scale for the z axis of an entity set with ScaleEntity.
EntityShininess | Sets the specular shininess of an entity.
EntityTexture | Applies a texture to an entity.
EntityType | Sets the collision type for an entity.
EntityVisible | Returns true if src_entity and dest_entity can 'see' each other.
EntityX | The X-coordinate of the entity.
EntityY | The Y-coordinate of the entity.
EntityYaw | Returns the yaw angle of an entity.
EntityZ | The Z-coordinate of the entity.
ExtractAnimSeq | This command allows you to convert an animation with an MD2-style series of anim sequences into a pure Blitz anim sequence.
FindChild | Returns the first child of the specified entity with name matching child_name$
FindSurface | Attempts to find a surface attached to the specified mesh and created with the specified brush.
FitMesh | Scales and translates all vertices of a mesh so that the mesh occupies the specified box.
FlipMesh | Flips all the triangles in a mesh.
FluidArray | Create custom rendering array data for fluid mesh and set width, height and depth.
FluidFunction | Set custom rendering callback function for fluid mesh.
FluidThreshold | Set threshold value used in fluid rendering algorithm, 0.5 is default.
FreeAction | Frees action from memory when it has ended.
FreeBrush | Frees up a brush.
FreeBrushTextures | Frees all brush textures, FreeBrush does not free textures.
FreeEntity | FreeEntity will free up the internal resources associated with a particular entity and remove it from the scene.
FreeShader | Frees a shader material.
FreeShadow | Free stencil shadow.
FreeStencil | Frees a stencil object.
FreeSurface | Frees VBO data and brush.
FreeTexture | Frees up a texture from memory.
GeosphereHeight | Set terrain height normalizing value, 0.05 is default.
GetBrushTexture | Returns the texture that is applied to the specified brush.
GetChild | Returns a child of an entity.
GetEntityBrush | Returns a brush with the same properties as is applied to the specified entity.
GetEntityType | Returns the collision type of an entity as set by the EntityType command.
GetMatElement | Returns the value of an element from within an entity's transformation matrix.
GetMeshLoader | Returns a mesh loader capable of loading extension.
GetParent | Returns an entity's parent.
GetShaderProgram | Get a shader program object reference.
GetString | Gets a Blitz string from a C string.
GetSurface | Returns the handle of the surface attached to the specified mesh and with the specified index number.
GetSurfaceBrush | Returns a brush with the same properties as is applied to the specified mesh surface.
GlobalAnIsotropic | Set global texture anisotropic (default for all), TextureAnIsotropic overrides it.
GlobalHeight | Returns global height of screen resolution.
GlobalResolution | Sets global width and height of screen resolution.
GlobalWidth | Returns global width of screen resolution.
HandleSprite | Sets a sprite handle.
HideEntity | Hides an entity.
LightColor | Sets the color of a light.
LightConeAngles | Sets the 'cone' angle for a 'spot' light.
LightMesh | Performs a 'fake' lighting operation on a mesh.
LightRange | Sets the range of a light.
LinePick | Returns the first entity between x.
LinkShader | Link shader to a program object, as created by CreateShaderMaterial.
LoadAnimMesh | Loads an anim mesh, see MeshLoader.
LoadAnimSeq | Appends an animation sequence from a file to an entity.
LoadBrush | Creates a brush.
LoadGeosphere | Load geodesic sphere terrain from heightmap image.
LoadMaterial | Load a texture from image for 3D texture sampling, use with voxelsprites.
LoadMD2 | Loads an md2 entity and returns its handle.
LoadMesh | Loads a single mesh, see MeshLoader.
LoadShader | Load shader from two files, vertex and fragment.
LoadShaderVGF | Load shader from three files, vertex, geometry and fragment.
LoadSprite | Creates a sprite entity.
LoadTerrain | Loads a terrain from an image file and returns the terrain's handle.
ManualCollision | Use manual collision mode between entities, diables automatic collisions.
MeshCSG | Method 0 subtracts mesh2 from mesh1, 1 adds meshes, 2 intersects meshes. Returns a new mesh.
MeshCullRadius | Equivalent of Blitz3D's MeshCullBox command. It sets the radius of a mesh's 'cull sphere'
MeshDepth | Returns the depth of a mesh.
MeshesIntersect | Returns true if the specified meshes are currently intersecting.
MeshHeight | Returns the height of a mesh.
MeshWidth | Returns the width of a mesh.
ModifyGeosphere | Set height of a given point, like ModifyTerrain.
ModifyTerrain | Sets the height of a point on a terrain.
MoveEntity | Moves an entity relative to its current position and orientation.
MSAntiAlias | Enables or disables hardware multisample antialiasing if supported.
NameEntity | Sets an entity's name.
NewAnimationKeys | Create a new TAnimationKeys object.
NewBone | Create a new TBone object.
NewMatPtr | Create a new TMatPtr object, returns a Float Ptr matrix.
NewMesh | Create a new TMesh object.
NewQuatPtr | Create a new TQuatPtr object, returns a Float Ptr quaternion.
NewSprite | Create a new TSprite object.
NewSurface | Create a new TSurface object.
NewTexture | Create a new TTexture object.
NewVecPtr | Create a new TVecPtr object, returns a Float Ptr vector.
OctreeBlock | Place mesh into a node of an octree, the mesh can be duplicated using no more memory.
OctreeMesh | Place mesh into a node of an octree, the mesh can't be duplicated so to do that use CopyEntity.
PaintEntity | Paints a entity with a brush.
PaintMesh | Paints a mesh with a brush.
PaintSurface | Paints a surface with a brush.
ParticleColor | Sets color of batch particle trails.
ParticleTrail | Sets number of batch particles in trail.
ParticleVector | Sets 3d vector of batch particle trails.
PickedEntity | Returns the entity 'picked' by the most recently executed Pick command.
PickedNX | Returns the x component of the normal of the most recently executed Pick command.
PickedNY | Returns the y component of the normal of the most recently executed Pick command.
PickedNZ | Returns the z component of the normal of the most recently executed Pick command.
PickedSurface | Returns the handle of the surface that was 'picked' by the most recently executed Pick command.
PickedTime | Returns the time taken to calculate the most recently executed Pick command.
PickedTriangle | Returns the index number of the triangle that was 'picked' by the most recently executed Pick command.
PickedX | Returns the world x coordinate of the most recently executed Pick command.
PickedY | Returns the world y coordinate of the most recently executed Pick command.
PickedZ | Returns the world z coordinate of the most recently executed Pick command.
PointEntity | Points one entity at another.
PositionAnimMesh | Moves all vertices of mesh and every child mesh.
PositionEntity | Positions an entity at an absolute position in 3D space.
PositionMesh | Moves all vertices of a mesh.
PositionTexture | Positions a texture at an absolute position.
PostFXBuffer | undocumented.
PostFXFunction | undocumented.
PostFXShader | undocumented.
PostFXShaderPass | undocumented.
PostFXTexture | undocumented.
ProjectedX | Returns the viewport x coordinate of the most recently executed CameraProject.
ProjectedY | Returns the viewport y coordinate of the most recently executed CameraProject.
ProjectedZ | Returns the viewport z coordinate of the most recently executed CameraProject.
RenderWorld | Renders the current scene to the BackBuffer onto the rectangle defined by each cameras CameraViewport( )
RepeatMesh | Like CopyMesh but for instancing effects.
ResetEntity | Resets the collision state of an entity.
ResetShadow | Reset created flag to update static shadow.
RotateAnimMesh | Rotates all vertices of mesh and every child mesh.
RotateEntity | Rotates an entity so that it is at an absolute orientation.
RotateMesh | Rotates all vertices of a mesh by the specified rotation.
RotateSprite | Rotates a sprite.
RotateTexture | Rotates a texture.
ScaleAnimMesh | Scales all vertices of mesh and every child mesh.
ScaleEntity | Scales an entity so that it is of an absolute size.
ScaleMesh | Scales all vertices of a mesh by the specified scaling factors.
ScaleSprite | Scales a sprite.
ScaleTexture | Scales a texture by an absolute amount.
SetAnimKey | Sets an animation key for the specified entity at the specified frame.
SetAnimTime | SetAnimTime allows you to manually animate entities.
SetCubeFace | Selects a cube face for direct rendering to a texture.
SetCubeMode | Set the rendering mode of a cubemap texture.
SetFloat | Set a shader variable name of a uniform float type to a float value.
SetFloat2 | Set a shader variable name of a uniform vec2 type to 2 float values.
SetFloat3 | Set a shader variable name of a uniform vec3 type to 3 float values.
SetFloat4 | Set a shader variable name of a uniform vec4 type to 4 float values.
SetInteger | Set a shader variable name of a uniform int type to an integer value.
SetInteger2 | Set a shader variable name of a uniform ivec2 type to 2 integer values.
SetInteger3 | Set a shader variable name of a uniform ivec3 type to 3 integer values.
SetInteger4 | Set a shader variable name of a uniform ivec4 type to 4 integer values.
SetShadowColor | Set color R/G/B in range 0..255 and A in range 0..1.
SetString | Sets a C string from a Blitz string.
ShadeEntity | Apply shader to an entity.
ShadeMesh | Apply shader to a mesh.
ShaderFunction | undocumented.
ShaderMaterial | Set a 3d texture for sampling.
ShaderTexture | Load a texture for 2D texture sampling.
ShadeSurface | Apply shader to a surface.
ShowEntity | Shows an entity.
SkinMesh | Set animated surface for each of the bone no and weights arrays.
SpriteRenderMode | If mode is 1 rendering is normal, 2 is for batch sprites like particles.
SpriteViewMode | Sets the view mode of a sprite.
StencilAlpha | Set stencil alpha value.
StencilClsColor | Set stencil clear screen color in range 0..255.
StencilClsMode | Set stencil clear screen modes.
StencilMesh | Set mesh to be used as stencil.
StencilMode | Set stencil render modes.
StringPtr | Returns string cast of byte pointer.
SurfsRendered | Number of surfaces currently being rendered.
TerrainCountTriangles | Returns terrain triangles count.
TerrainCountVertices | Returns terrain vertices count.
TerrainDetail | Set terrain level of detail, default is 100 and maximum is 2000.
TerrainHeight | Returns the height of the terrain at terrain grid coordinates x.
TerrainScaleTexCoords | Set terrain texture coordinates scale, range is 1 to terrain size.
TerrainX | Returns the interpolated x coordinate on a terrain.
TerrainY | Returns the interpolated y coordinate on a terrain.
TerrainZ | Returns the interpolated z coordinate on a terrain.
TexToBuffer | Copy texture to a pixmap buffer, buffer must be a byte ptr.
TextureAnIsotropic | Set texture anisotropic factor, usually from 2-16.
TextureBlend | Sets the blending mode for a texture.
TextureCoords | Sets the texture coordinate mode for a texture.
TextureFilter | Adds a texture filter.
TextureFlags | Set texture flags, see LoadTexture for values.
TextureGLTexEnvf | GL equivalent, param is a float, limited to 12 calls per texture, experimental.
TextureGLTexEnvi | GL equivalent, param is a const, limited to 12 calls per texture, experimental.
TextureHeight | Returns the height of a texture.
TextureMultitex | Set texture multitex factor, used in interpolate and custom TexBlend options.
TextureName | Returns a texture's absolute filename.
TextureWidth | Returns the width of a texture.
TFormedX | Returns the X component of the last TFormPoint.
TFormedY | Returns the Y component of the last TFormPoint.
TFormedZ | Returns the Z component of the last TFormPoint.
TFormNormal | Transforms between coordinate systems.
TFormPoint | Transforms between coordinate systems.
TFormVector | Transforms between coordinate systems.
TranslateEntity | Translates an entity relative to its current position and not its orientation.
TriangleVertex | Returns the vertex of a triangle corner.
TrisRendered | Number of triangles currently being rendered.
TurnEntity | Turns an entity relative to its current orientation.
UpdateNormals | Recalculates all normals in a mesh.
UpdateTexCoords | Recalculates the surface's uvw coord set 1 based on vertices.
UpdateWorld | Animates all entities in the world.
UseAssimpStreamMeshes | Loader flags for Assimp meshes.
UseCubemapFlip | Flip cubemap texture flag.
UseEntity | undocumented.
UseFloat | Bind a float variable to a shader variable name of a uniform float type.
UseFloat2 | Bind 2 float variables to a shader variable name of a uniform vec2 Type.
UseFloat3 | Bind 3 float variables to a shader variable name of a uniform vec3 type.
UseFloat4 | Bind 4 float variables to a shader variable name of a uniform vec4 type.
UseInteger | Bind an integer variable to a shader variable name of a uniform int type.
UseInteger2 | Bind 2 integer variables to a shader variable name of a uniform ivec2 type.
UseInteger3 | Bind 3 integer variables to a shader variable name of a uniform ivec3 type.
UseInteger4 | Bind 4 integer variables to a shader variable name of a uniform ivec4 type.
UseLibraryMeshes | Loader flag for meshes.
UseLibraryTextures | Loader flag for textures.
UseMatrix | Sends matrix data to a shader variable name of a uniform mat4 type.
UseMatrix3DS | Set 3DS model loader coordinates system (matrix), values should be 0,1,-1.
UseMatrixMD2 | Set MD2 model loader coordinates system (matrix), values should be 0,1,-1.
UseMeshDebugLog | Debug all mesh loaders.
UseMeshTextureFlags | Set mesh texture flags.
UseMeshTransform | Transform mesh loaders.
UseStencil | Stencil to use, set to Null to disable stencil.
UseSurface | Sends surface data to a shader variable name.
UseTextureFaces | Order for cubemap faces.
UseTextureFrames | Order for anim texture frames.
VectorPitch | Returns the pitch value of a vector.
VectorYaw | Returns the yaw value of a vector.
VertexAlpha | Returns the alpha component of a vertices color.
VertexBlue | Returns the blue component of a vertices color.
VertexColor | Sets the color of an existing vertex.
VertexCoords | Sets the geometric coordinates of an existing vertex.
VertexGreen | Returns the green component of a vertices color.
VertexNormal | Sets the normal of an existing vertex.
VertexNX | Returns the x component of a vertices normal.
VertexNY | Returns the y component of a vertices normal.
VertexNZ | Returns the z component of a vertices normal.
VertexRed | Returns the red component of a vertices color.
VertexTexCoords | Sets the texture coordinates of an existing vertex.
VertexU | Returns the texture u coordinate of a vertex.
VertexV | Returns the texture v coordinate of a vertex.
VertexW | Returns the texture w coordinate of a vertex.
VertexX | Returns the x coordinate of a vertex.
VertexY | Returns the y coordinate of a vertex.
VertexZ | Returns the z coordinate of a vertex.
VertsRendered | Number of vertices currently being rendered.
VoxelSpriteMaterial | Set material for voxel sprite.
Wireframe | Enables or disables wireframe rendering.

## Types Summary

TAction | Action.
TAnimationKeys | AnimationKeys data.
TBlitz2D | Blitz2D.
TBlob | Blob entity.
TBone | Bone entity.
TBrush | Brush.
TCamera | Camera entity.
TConstraint | Constraint.
TEntity | Entity.
TFluid | Fluid mesh entity.
TGeosphere | Geosphere terrain entity.
TGlobal3D | Global.
THardwareInfo | Hardware info.
TLight | Light entity.
TMaterial | Material texture.
TMatPtr | MatPtr functions (Openb3d)
TMatrix | Matrix functions (Minib3d)
TMesh | Mesh entity.
TMeshLoader | Mesh loader.
TOcTree | Octree terrain entity.
TParticleBatch | Particle Batch mesh entity.
TParticleEmitter | Particle Emitter entity.
TPick | Pick.
TPivot | Pivot entity.
TPostFX | Post effects object.
TQuaternion | Quaternion functions (Minib3d)
TQuatPtr | QuatPtr functions (Openb3d)
TRigidBody | Rigid Body.
TShader | Shader.
TShaderObject | Shader object.
TShadowObject | Shadow object.
TSprite | Sprite mesh entity.
TStencil | Stencil.
TSurface | Surface.
TTerrain | Terrain entity.
TTexture | Texture.
TUse | Loader flags for meshes and textures.
TVecPtr | TVecPtr functions (Openb3d)
TVector | TVector functions (Minib3d)
TVoxelSprite | Voxelsprite mesh entity.

## Functions

Function ActFadeTo:TAction( ent:TEntity,a:Float,rate:Float )
Description | Fades entity to the given alpha value (0..1) at the speed of rate.

Function ActMoveBy:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
Description | Moves entity by an x y z position increment at the speed of rate.

Function ActMoveTo:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
Description | Moves entity to the given x y z position at the speed of rate.

Function ActNewtonian:TAction( ent:TEntity,rate:Float )
Description | Translates entity in the direction it is moving, rate should be below 1.

Function ActScaleTo:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
Description | Scales entity to the given x y z dimensions at the speed of rate.

Function ActTintTo:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
Description | Tints entity to the given r g b value (0..255) at the speed of rate.

Function ActTrackByDistance:TAction( ent:TEntity,target:TEntity,a:Float,rate:Float )
Description | Tracks target entity up to a given distance at the speed of rate.

Function ActTrackByPoint:TAction( ent:TEntity,target:TEntity,a:Float,b:Float,c:Float,rate:Float )
Description | Tracks target entity at a given point from the entity at the speed of rate.

Function ActTurnBy:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
Description | Turns entity by an x y z rotation increment at the speed of rate.

Function ActTurnTo:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
Description | Turns entity to the given x y z rotation at the speed of rate.

Function ActVector:TAction( ent:TEntity,a:Float,b:Float,c:Float )
Description | Positions entity according the given x y z vector.

Function AddAnimSeq:Int( ent:TEntity,length:Int )
Description | Creates an animation sequence for an entity.
Information | Parameters: entity - entity handle length - Description: Creates an animation sequence for an entity. This must be done before any animation keys set by SetAnimKey can be used in an actual animation however this is optional. You may use it to "bake" the frames you have added previously using SetAnimKey. Returns the animation sequence number added.

Function AddMesh( mesh1:TMesh,mesh2:TMesh )
Description | Adds the source mesh to the destination mesh.
Information | Parameters: source_mesh - source mesh handle dest_mesh - destination mesh handle Description: Adds the source mesh to the destination mesh. AddMesh works best with meshes that have previously only had mesh commands used with them. So if you want to manipulate a mesh before adding it to another mesh, make sure you use ScaleMesh, PositionMesh, PaintMesh etc rather than ScaleEntity, PositionEntity, EntityTexture etc before using AddMesh. However, something to be aware of when using commands such as RotateMesh is that all mesh commands work from a global origin of 0,0,0. Therefore it is generally a good idea to scale and rotate a mesh before positioning it, otherwise your mesh could end up in unexpected positions. Also, when using AddMesh, the origin of the new all-in-one mesh will be set at 0,0,0. After using AddMesh, the original source_mesh will still exist, therefore use FreeEntity to delete it if you wish to do so.

Function AddRenderTarget( fx:TPostFX,pass_no:Int,numColBufs:Int,depth:Int,format:Int=8,scale:Float=1.0 )
Description | undocumented.

Function AddSurface( mesh:TMesh,surf:TSurface,anim_surf%=False )
Description | Add an existing surface to a mesh.

Function AddTriangle:Int( surf:TSurface,v0:Int,v1:Int,v2:Int )
Description | Adds a triangle to a surface and returns the triangle's index number.
Information | Parameters: surface - surface handle v0 - index number of first vertex of triangle v1 - index number of second vertex of triangle v2 - index number of third vertex of triangle Description: Adds a triangle to a surface and returns the triangle's index number, starting from 0. The v0, v1 and v2 parameters are the index numbers of the vertices created using AddVertex. Depending on how the vertices are arranged, then the triangle will only be visible from a certain side. Imagine that a triangle's vertex points are like dot-to-dot pattern, each numbered v0, v1, v2. If these dots, starting from v0, through to V2, form a clockwise pattern relative to the viewer, then the triangle will be visible. If these dots form an anti-clockwise pattern relative to the viewer, then the triangle will not be visible. The reason for having one-sided triangles is that it reduces the amount of triangles that need to be rendered when one side faces the side of an object which won't be seen (such as the inside of a snooker ball). However, if you wish for a triangle to be two-sided, then you can either create two triangles, using the same set of vertex numbers for both but assigning them in opposite orders, or you can use CopyEntity and FlipMesh together.

Function AddVertex:Int( surf:TSurface,x:Float,y:Float,z:Float,u:Float=0,v:Float=0,w:Float=0 )
Description | Adds a vertex to the specified surface and returns the vertices' index number.
Information | Parameters: surface - surface handle x# - x coordinate of vertex y# - y coordinate of vertex z# - z coordinate of vertex u# (optional) - u texture coordinate of vertex v# (optional) - v texture coordinate of vertex w# (optional) - w texture coordinate of vertex - not used, included for future expansion Description: Adds a vertex to the specified surface and returns the vertices' index number, starting from 0. x,y,z are the geometric coordinates of the vertex, and u,v,w are texture mapping coordinates. A vertex is a point in 3D space which is used to connect edges of a triangle together. Without any vertices, you can't have any triangles. At least three vertices are needed to create one triangle; one for each corner. The optional u, v and w parameters allow you to specify texture coordinates for a vertex, which will determine how any triangle created using those vertices will be texture mapped. The u, v and w parameters specified will take effect on both texture coordinate sets (0 and 1). This works on the following basis: The top left of an image has the uv coordinates 0,0. The top right has coordinates 1,0 The bottom right is 1,1. The bottom left 0,1. Thus, uv coordinates for a vertex correspond to a point in the image. For example, coordinates 0.9,0.1 would be near the upper right corner of the image. So now imagine you have a normal equilateral triangle. By assigning the bottom left vertex a uv coordinate of 0,0, the bottom right a coordinate of 1,0 and the top centre 0.5,1, this will texture map the triangle with an image that fits it. When adding a vertex its default color is 255,255,255,255.

Function AlignToVector( entity:TEntity,x:Float,y:Float,z:Float,axis:Int,rate:Int=1 )
Description | Aligns an entity axis to a vector.
Information | Parameters: entity - entity handle vector_x# - vector x vector_y# - vector y vector_z# - vector z axis - axis of entity that will be aligned to vector 1: x-axis 2: y-axis 3: z-axis rate# (optional) - rate at which entity is aligned from current orientation to vector orientation. Should be in the range 0 to 1, 0 for smooth transition and 1 for 'snap' transition. Defaults to 1. Description: Aligns an entity axis to a vector.

Function AlphaDiscard( tex:TTexture,alpha:Float=0.01 )
Description | Set discard value (as 0..1) above which to ignore pixel's alpha value, default is 1 (only if flag 2)

Function AmbientLight( r:Float,g:Float,b:Float )
Description | Sets the ambient lighting colour.
Information | Parameters: red# - red ambient light value green# - green ambient light value blue# - 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. Description: Sets the ambient lighting colour. 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. See also: CreateLight.

Function AmbientShader( material:TShader )
Description | Set default shader for surfaces.

Function Animate( ent:TEntity,Mode:Int=1,speed:Float=1,seq:Int=0,trans:Int=0 )
Description | Animates an entity.
Information | Parameters: entity - entity handle mode (optional) - mode of animation. 0: stop animation 1: loop animation (default) 2: ping-pong animation 3: one-shot animation speed# (optional) - speed of animation. Defaults to 1. sequence (optional) - specifies which sequence of animation frames to play. Defaults to 0. transition# (optional) - used to tween between an entities current position rotation and the first frame of animation. Defaults to 0. Description: Animates an entity. More info about the optional parameters: speed# - a negative speed will play the animation backwards. sequence - Initially, an entity loaded with LoadAnimMesh will have a single animation sequence. More sequences can be added using either LoadAnimSeq or AddAnimSeq. Animation sequences are numbered 0,1,2...etc. transition# - A value of 0 will cause an instant 'leap' to the first frame, while values greater than 0 will cause a smooth transition.

Function Animating:Int( ent:TEntity )
Description | Returns true if the specified entity is currently animating.
Information | Parameters: entity - entity handle Description: Returns true if the specified entity is currently animating.

Function AnimLength:Int( ent:TEntity )
Description | Returns the length of the specified entity's current animation sequence.
Information | Parameters: entity - entity handle Description: Returns the length of the specified entity's current animation sequence.

Function AnimSeq:Int( ent:TEntity )
Description | Returns the specified entity's current animation sequence.
Information | Parameters: entity - entity handle Description: Returns the specified entity's current animation sequence.

Function AnimTime:Float( ent:TEntity )
Description | Returns the current animation time of an entity.
Information | Parameters: entity - entity handle Description: Returns the current animation time of an entity.

Function AntiAlias( samples:Int )
Description | Enables or disables fullscreen antialiasing.
Information | Parameters: enable - True to enable fullscreen antialiasing, False to disable. The default AntiAlias mode is False. Description: Enables or disables fullscreen antialiasing. Fullscreen antialiasing is a technique used to smooth out the entire screen, so that jagged lines are made less noticeable. Some 3D cards have built-in support for fullscreen antialiasing, which should allow you to enable the effect without much slowdown. However, for cards without built-in support for fullscreen antialiasing, enabling the effect may cause severe slowdown.

Function AppendAction( act1:TAction,act2:TAction )
Description | Adds action to the end of another one, where act1 happens before act2.

Function AttachFragShader:Int( shader:TShader,myShader:TShaderObject )
Description | Attaches a fragment shader object to a program object, attach vertex first or older compilers will crash.

Function AttachVertShader:Int( shader:TShader,myShader:TShaderObject )
Description | Attaches a vertex shader object to a program object.

Function BackBufferToTex( tex:TTexture,mipmap_no:Int=0,frame:Int=0,fastinvert:Int=True )
Description | Copy the contents of the backbuffer to a texture.
Information | OpenB3D does not have the same buffer commands as Blitz3D. The region copied from the backbuffer will start at 0,0 and end at the texture's width and height. So if you want to copy a 3D scene to a texture, first resize the camera viewport to the texture size, use RenderWorld to render the camera, then use this command. Back buffer is upside-down so set fastinvert to True to invert texture uvs, False to flip texture data (slower).

Function BeginMax2D( version:Int=1 )
Description | Old begin function as in Minib3d is 0, new begin function is 1 (default)

Function BrushAlpha( brush:TBrush,a:Float )
Description | Sets the alpha level of a brush.
Information | Parameters: brush - brush handle alpha# - alpha level of brush Description: Sets the alpha level of a brush. The alpha# value should be in the range 0-1. The default brush alpha setting is 1. The alpha level is how transparent an entity is. A value of 1 will mean the entity is non-transparent, i.e. opaque. A value of 0 will mean the entity is completely transparent, i.e. invisible. Values between 0 and 1 will cause varying amount of transparency accordingly, useful for imitating the look of objects such as glass and ice. An BrushAlpha value of 0 is especially useful as Blitz3D will not render entities with such a value, but will still involve the entities in collision tests. This is unlike HideEntity, which doesn't involve entities in collisions.

Function BrushBlend( brush:TBrush,blend:Int )
Description | Sets the blending mode for a brush.
Information | Parameters: brush - brush handle blend - 1: alpha (default) 2: multiply 3: add Description: Sets the blending mode for a brush.

Function BrushColor( brush:TBrush,r:Float,g:Float,b:Float )
Description | Sets the colour of a brush.
Information | Parameters: brush - brush handle red# - red value of brush green# - green value of brush blue# - blue value of brush Description: Sets the colour of a brush. The green, red and blue values should be in the range 0-255. The default brush color is 255,255,255. Please note that if EntityFX or BrushFX flag 2 is being used, brush colour will have no effect and vertex colours will be used instead.

Function BrushFX( brush:TBrush,fx:Int )
Description | Sets miscellaneous effects for a brush.
Information | Parameters: brush - brush handle fx - 0: nothing (default) 1: full-bright 2: use vertex colors instead of brush color 4: flatshaded 8: disable fog 16: disable backface culling Description: Sets miscellaneous effects for a brush. Flags can be added to combine two or more effects. For example, specifying a flag of 3 (1+2) will result in a full-bright and vertex-coloured brush.

Function BrushGLBlendFunc( brush:TBrush,sfactor:Int,dfactor:Int )
Description | GL equivalent, experimental.

Function BrushGLColor( brush:TBrush,r:Float,g:Float,b:Float,a:Float=1.0 )
Description | GL equivalent, experimental.

Function BrushShininess( brush:TBrush,s:Float )
Description | Sets the specular shininess of a brush.
Information | Parameters: brush - brush handle shininess# - shininess of brush Description: Sets the specular shininess of a brush. The shininess# value should be in the range 0-1. The default shininess setting is 0. Shininess is how much brighter certain areas of an object will appear to be when a light is shone directly at them. Setting a shininess value of 1 for a medium to high poly sphere, combined with the creation of a light shining in the direction of it, will give it the appearance of a shiny snooker ball.

Function BrushTexture( brush:TBrush,tex:TTexture,frame:Int=0,index:Int=0 )
Description | Assigns a texture to a brush.
Information | Parameters: brush - brush handle texture - texture handle frame (optional) - texture frame. Defaults to 0. index (optional) - texture index. Defaults to 0. Description: Assigns a texture to a brush. The optional frame parameter specifies which animation frame, if any exist, should be assigned to the brush. The optional index parameter specifies texture layer that the texture should be assigned to. Brushes have up to four texture layers, 0-3 inclusive.

Function BufferToTex( tex:TTexture,buffer:Byte Ptr,frame:Int=0 ) ' frame currently does nothing
Description | Copy pixmap buffer to texture, buffer must be a byte ptr.

Function CameraClsColor( cam:TCamera,r:Float,g:Float,b:Float )
Description | Sets camera background color.
Information | Parameters: camera - camera handle red# - red value of camera background color green# - green value of camera background color blue# - blue value of camera background color Description: Sets camera background color. Defaults to 0,0,0.

Function CameraClsMode( cam:TCamera,cls_depth:Int,cls_zbuffer:Int )
Description | Sets camera clear mode.
Information | Parameters: camera - camera handle cls_color - true to clear the color buffer, false not to cls_zbuffer - true to clear the z-buffer, false not to Description: Sets camera clear mode.

Function CameraFogColor( cam:TCamera,r:Float,g:Float,b:Float )
Description | Sets camera fog color.
Information | Parameters: camera - camera handle red# - red value of value green# - green value of fog blue# - blue value of fog Description: Sets camera fog color.

Function CameraFogMode( cam:TCamera,Mode:Int )
Description | Sets the camera fog mode.
Information | Parameters: camera - camera handle mode - 0: no fog (default) 1: linear fog Description: Sets the camera fog mode. This will enable/disable fogging, a technique used to gradually fade out graphics the further they are away from the camera. This can be used to avoid 'pop-up', the moment at which 3D objects suddenly appear on the horizon. The default fog colour is black and the default fog range is 1-1000, although these can be changed by using CameraFogColor and CameraFogRange respectively. Each camera can have its own fog mode, for multiple on-screen fog effects.

Function CameraFogRange( cam:TCamera,nnear:Float,nfar:Float )
Description | Sets camera fog range.
Information | Parameters: camera - camera handle near# - distance in front of camera that fog starts far# - distance in front of camera that fog ends Description: Sets camera fog range. The near parameter specifies at what distance in front of the camera that the fogging effect will start; all 3D object before this point will not be faded. The far parameter specifies at what distance in front of the camera that the fogging effect will end; all 3D objects beyond this point will be completely faded out.

Function CameraPick:TEntity( cam:TCamera,x:Float,y:Float )
Description | Picks the entity positioned at the specified viewport coordinates.
Information | Parameters: camera - camera handle viewport_x# - 2D viewport coordinate viewport_z# - 2D viewport coordinate Description: Picks the entity positioned at the specified viewport coordinates. Returns the entity picked, or 0 if none there. An entity must have its EntityPickMode set to a non-0 value value to be 'pickable'. See also: EntityPick, LinePick, CameraPick, EntityPickMode.

Function CameraProject( cam:TCamera,x:Float,y:Float,z:Float )
Description | Projects the world coordinates x.
Information | Parameters: camera - camera handle x# - world coordinate x y# - world coordinate y z# - world coordinate z Description: Projects the world coordinates x,y,z on to the 2D screen.

Function CameraProjMatrix:Float Ptr( cam:TCamera )
Description | undocumented.

Function CameraProjMode( cam:TCamera,Mode:Int )
Description | Sets the camera projection mode.
Information | Parameters: camera - camera handle mode - projection mode: 0: no projection - disables camera (faster than HideEntity) 1: perspective projection (default) 2: orthographic projection Description: Sets the camera projection mode. The projection mode is the the technique used by Blitz to display 3D graphics on the screen. 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. Use 'CameraZoom' to control the scale of graphics rendered with orthographic projection. As a general rule, using orthographic projection with the default camera zoom setting of 1 will result in graphics that are too 'zoomed-in' - changing the camera zoom to 0.1 should fix this. One thing to note with using camera project mode 2, is that terrains will not be displayed correctly - this is because the level of detail algorithm used by terrains relies on perspective in order to work properly.

Function CameraRange( cam:TCamera,nnear:Float,nfar:Float )
Description | Sets camera range.
Information | Parameters: camera - camera handle near - distance in front of camera that 3D objects start being drawn far - distance in front of camera that 3D object stop being drawn Description: Sets camera range. Try and keep the ratio of far/near as small as possible for optimal z-buffer performance. Defaults to 1,1000.

Function CameraToTex( tex:TTexture,cam:TCamera,frame:Int=0 ) ' frame currently does nothing
Description | Copy rendered camera view to texture.

Function CameraViewport( cam:TCamera,x:Int,y:Int,width:Int,height:Int )
Description | Sets the camera viewport position and size.
Information | Parameters: camera - camera handle x - x coordinate of top left hand corner of viewport y - y coordinate of top left hand corner of viewport width - width of viewport height - height of viewport Description: Sets the camera viewport position and size. 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 CameraZoom( cam:TCamera,zoom:Float )
Description | Sets zoom factor for a camera.
Information | Parameters: camera - camera handle zoom# - zoom factor of camera Description: Sets zoom factor for a camera. Defaults to 1.

Function CheckFramebufferStatus( target% )
Description | Check for framebuffer errors.

Function ClearCollisions()
Description | Clears the collision information list.
Information | Parameters: None. Description: Clears the collision information list. Whenever you use the Collisions command to enable collisions between two different entity types, information is added to the collision list. This command clears that list, so that no collisions will be detected until the Collisions command is used again. The command will not clear entity collision information. For example, entity radius, type etc.

Function ClearSurface( surf:TSurface,clear_verts:Int=True,clear_tris:Int=True )
Description | Removes all vertices and/or triangles from a surface.
Information | Parameters: surface - surface handle clear_verts (optional) - true to remove all vertices from the specified surface, false not to. Defaults to true. clear_triangles (optional) - true to remove all triangles from the specified surface, false not to. Defaults to true. Description: Removes all vertices and/or triangles from a surface. This is useful for clearing sections of mesh. The results will be instantly visible. After clearing a surface, you may wish to add vertices and triangles to it again but with a slightly different polygon count for dynamic level of detail (LOD).

Function ClearTextureFilters()
Description | Clears the current texture filter list.
Information | Parameters: None. Description: Clears the current texture filter list.

Function ClearWorld( entities:Int=True,brushes:Int=True,textures:Int=True )
Description | Clears all entities.
Information | Parameters: entities (optional) - True to clear all entities, False not to. Defaults to true. brushes (optional) - True to clear all brushes, False not to. Defaults to true. textures (optional) - True to clear all textures, False not to. Defaults to true. Description: Clears all entities, brushes and/or textures from the screen and from memory. As soon as you clear something, you will not be able to use it again until you reload it. Trying to do so will cause a runtime error. This command is useful for when a level has finished and you wish to load a different level with new entities, brushes and textures.

Function CollisionEntity:TEntity( ent:TEntity,index:Int )
Description | Returns the other entity involved in a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the other entity involved in a particular collision. Index should be in the range 1...CountCollisions( entity ), inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CollisionNX:Float( ent:TEntity,index:Int )
Description | Returns the x component of the normal of a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the x component of the normal of a particular collision. Index should be in the range 1...CountCollisions( entity ) inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CollisionNY:Float( ent:TEntity,index:Int )
Description | Returns the y component of the normal of a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the y component of the normal of a particular collision. Index should be in the range 1...CountCollisions( entity ) inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CollisionNZ:Float( ent:TEntity,index:Int )
Description | Returns the z component of the normal of a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the z component of the normal of a particular collision. Index should be in the range 1...CountCollisions( entity ) inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function Collisions( src_no:Int,dest_no:Int,method_no:Int,response_no:Int=0 )
Description | Enables collisions between two different entity types.
Information | Parameters: src_type - entity type to be checked for collisions. dest_type - entity type to be collided with. method - collision detection method. 1: ellipsoid-to-ellipsoid collisions 2: ellipsoid-to-polygon collisions 3: ellipsoid-to-box collisions response - what the source entity does when a collision occurs. 1: stop 2: slide1 - full sliding collision 3: slide2 - prevent entities from sliding down slopes Description: Enables collisions between two different entity types. Entity types are just numbers you assign to an entity using EntityType. Blitz then uses the entity types to check for collisions between all the entities that have those entity types. Blitz has many ways of checking for collisions, as denoted by the method parameter. However, collision checking is always ellipsoid to something. In order for Blitz to know what size a source entity is, you must first assign an entity radius to all source entities using EntityRadius. In the case of collision detection method 1 being selected (ellipsoid-to-ellipsoid), then the destination entities concerned will need to have an EntityRadius assigned to them too. In the case of method 3 being selected (ellipsoid-to-box), then the destination entities will need to have an EntityBox assigned to them. Method 2 (ellipsoid-to-polygon) requires nothing to be assigned to the destination entities. Not only does Blitz check for collisions, but it acts upon them when it detects them too, as denoted by the response parameter. You have three options in this situation. You can either choose to make the source entity stop, slide or only slide upwards. All collision checking occurs, and collision responses are acted out, when UpdateWorld is called. Finally, every time the Collision command is used, collision information is added to the collision information list. This can be cleared at any time using the ClearCollisions command. See also: EntityBox, EntityRadius, Collisions, EntityType, ResetEntity.

Function CollisionSurface:TSurface( ent:TEntity,index:Int )
Description | Returns the handle of the surface belonging to the specified entity that was closest to the point of a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the handle of the surface belonging to the specified entity that was closest to the point of a particular collision. Index should be in the range 1...CountCollisions( entity ), inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CollisionTime:Float( ent:TEntity,index:Int )
Description | Returns the time taken to calculate a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the time taken to calculate a particular collision. Index should be in the range 1...CountCollisions( entity ) inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CollisionTriangle:Int( ent:TEntity,index:Int )
Description | Returns the index number of the triangle belonging to the specified entity that was closest to the point of a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the index number of the triangle belonging to the specified entity that was closest to the point of a particular collision. Index should be in the range 1...CountCollisions( entity ), inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CollisionX:Float( ent:TEntity,index:Int )
Description | Returns the world x coordinate of a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the world x coordinate of a particular collision. Index should be in the range 1...CountCollisions( entity ) inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CollisionY:Float( ent:TEntity,index:Int )
Description | Returns the world y coordinate of a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the world y coordinate of a particular collision. Index should be in the range 1...CountCollisions( entity ) inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CollisionZ:Float( ent:TEntity,index:Int )
Description | Returns the world z coordinate of a particular collision.
Information | Parameters: entity - entity handle index - index of collision Description: Returns the world z coordinate of a particular collision. Index should be in the range 1...CountCollisions( entity ) inclusive. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CopyBrush:TBrush( brush:TBrush )
Description | Returns a copy of the new brush.

Function CopyEntity:TEntity( ent:TEntity,parent:TEntity=Null )
Description | Creates a copy of an entity and returns the handle of the newly created copy.
Information | Parameters: entity - Entity Handle parent (optional) - Entity that will act as Parent to the copy. Description: Creates a copy of an entity and returns the handle of the newly created copy. This is a new entity instance of an existing entity's mesh! Anything you do to the original Mesh (such as RotateMesh) will effect all the copies. Other properties (such as EntityColor, Position etc.) since they are 'Entity' properties, will be individual to the copy. If a parent entity is specified, the copied entity will be created at the parent entity's position. Otherwise, it will be created at 0,0,0.

Function CopyList( list:TList )
Description | Copy a list or vector. To copy a field list use as a method.
Information | Use either mesh with surf_list/anim_surf_list/bones or ent with child_list.

Function CopyMesh:TMesh( mesh:TMesh,parent:TEntity=Null )
Description | Creates a copy of a mesh and returns the newly-created mesh's handle.
Information | Parameters: mesh - handle of mesh to be copied parent (optional) - handle of entity to be made parent of mesh Description: Creates a copy of a mesh and returns the newly-created mesh's handle. The difference between CopyMesh and CopyEntity is that CopyMesh performs a 'deep' copy of a mesh. CopyMesh is identical to performing new_mesh=CreateMesh() : AddMesh mesh,new_mesh.

Function CopyRect( srcX:Int,srcY:Int,srcW:Int,srcH:Int,dstW:Int,dstH:Int,src:Byte Ptr,dst:Byte Ptr,bPP:Int=4,invert:Int=0 )
Description | Copy rectangle of source pixmap pixels to destination, not exactly like B3D.
Information | srcW/H is src size, srcX/srcY top-left position, dstW/H is dst size, bytes per pixel defaults to 4.

Function CopySurface:TSurface( surf:TSurface )
Description | Returns a copy of the new surface.

Function CopyTexture:TTexture( tex:TTexture,flags:Int )
Description | Returns a copy of the new texture.

Function CountChildren:Int( ent:TEntity )
Description | Returns the number of children of an entity.
Information | Parameters: entity - entity handle Description: Returns the number of children of an entity.

Function CountCollisions:Int( ent:TEntity )
Description | Returns how many collisions an entity was involved in during the last UpdateWorld.
Information | Parameters: entity - entity handle Description: Returns how many collisions an entity was involved in during the last UpdateWorld. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function CountMipmaps:Int( tex:TTexture )
Description | Returns the number of mipmaps a texture has.

Function CountSurfaces:Int( mesh:TMesh )
Description | Returns the number of surfaces in a mesh.
Information | Parameters: mesh - mesh handle Description: Returns the number of surfaces in a mesh. Surfaces are sections of mesh. A mesh may contain only one section, or very many. See also: GetSurface.

Function CountTriangles:Int( surf:TSurface )
Description | Returns the number of triangles in a surface.
Information | Parameters: surface - surface handle Description: Returns the number of triangles in a surface.

Function CountVertices:Int( surf:TSurface )
Description | Returns the number of vertices in a surface.
Information | Parameters: surface - surface handle Description: Returns the number of vertices in a surface.

Function CreateBlob:TBlob( fluid:TFluid,radius:Float,parent_ent:TEntity=Null )
Description | Create blob from a fluid mesh where radius is the size of the blob.

Function CreateBone:TBone( mesh:TMesh,parent_ent:TEntity=Null )
Description | Create bone.

Function CreateBrush:TBrush( r:Float=255,g:Float=255,b:Float=255 )
Description | Creates a brush and returns a brush handle.
Information | Parameters: red# (optional) - brush red value green# (optional) - brush green value blue# (optional) - brush blue value Description: Creates a brush and returns a brush handle. The optional green, red and blue values allow you to set the colour of the brush. Values should be in the range 0-255. If omitted the values default to 255. A brush is a collection of properties such as Colour, Alpha, Shininess, Texture etc that are all stored as part of the brush. Then, all these properties can be applied to an entity, mesh or surface at once just by using PaintEntity, PaintMesh or PaintSurface. When creating your own mesh, if you wish for certain surfaces to look differently from one another, then you will need to use brushes to paint individual surfaces. Using commands such as EntityColor, EntityAlpha will apply the effect to all surfaces at once, which may not be what you wish to achieve. See also: LoadBrush.

Function CreateCamera:TCamera( parent:TEntity=Null )
Description | Creates a camera entity and returns its handle.
Information | Parameters: parent (optional) - parent entity of camera Description: Creates a camera entity and returns its handle. 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. A camera can only render to the backbuffer. If you wish to display 3D graphics on an image or a texture then copy the contents of the backbuffer to the appropriate buffer. 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 CreateCone:TMesh( segments:Int=8,solid:Int=True,parent:TEntity=Null )
Description | Creates a cone mesh/entity and returns its handle.
Information | Parameters: segments (optional) - cone detail. Defaults to 8. solid (optional) - true for a cone with a base, false for a cone without a base. Defaults to true. parent (optional) - parent entity of cone Description: Creates a cone mesh/entity and returns its handle. The cone will be centred at 0,0,0 and the base of the cone will have a radius of 1. The segments value must be in the range 3-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 cone is exponentially proportional to the segments value, this will result in Blitz trying to create a cone with unimaginable amounts of polygons! Depending on how unlucky you are, your computer will then crash. Example segments values (solid=true): 4: 6 polygons - a pyramid 8: 14 polygons - bare minimum amount of polygons for a cone 16: 30 polygons - smooth cone at medium-high distances 32: 62 polygons - smooth cone at close distances The optional parent parameter allow you to specify a parent entity for the cone so that when the parent is moved the child cone 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 cone being created at position 0,0,0 rather than at the parent entity's position. See also: CreateCube, CreateSphere, CreateCylinder.

Function CreateConstraint:TConstraint( p1:TEntity,p2:TEntity,l:Float )
Description | Create constraint force between two entities of given length, doesn't affect rotation.

Function CreateCube:TMesh( parent:TEntity=Null )
Description | Creates a cube mesh/entity and returns its handle.
Information | Parameters: [parent] (optional) - This allows you to set the parent entity of Cube. Description: Creates a cube mesh/entity and returns its handle. The cube will extend from -1,-1,-1 to +1,+1,+1. The optional parent parameter allow you to specify a parent entity for the cube so that when the parent is moved the child cube 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 cube being created at position 0,0,0 rather than at the parent entity's position. Creation of cubes, cylinders and cones are a great way of getting scenes set up quickly, as they can act as placeholders for more complex pre-modeled meshes later on in program development. See also: CreateSphere, CreateCylinder, CreateCone.

Function CreateCylinder:TMesh( segments:Int=8,solid:Int=True,parent:TEntity=Null )
Description | Creates a cylinder mesh/entity and returns its handle.
Information | Parameters: segments (optional) - cylinder detail. Defaults to 8. solid (optional) - true for a cylinder, false for a tube. Defaults to true. parent (optional) - parent entity of cylinder Description: Creates a cylinder mesh/entity and returns its handle. The cylinder will be centred at 0,0,0 and will have a radius of 1. The segments value must be in the range 3-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 cylinder is exponentially proportional to the segments value, this will result in Blitz trying to create a cylinder with unimaginable amounts of polygons! Depending on how unlucky you are, your computer may then crash. Example segments values (solid=true): 3: 8 polygons - a prism 8: 28 polygons - bare minimum amount of polygons for a cylinder 16: 60 polygons - smooth cylinder at medium-high distances 32: 124 polygons - smooth cylinder at close distances The optional parent parameter allow you to specify a parent entity for the cylinder so that when the parent is moved the child cylinder 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 cylinder being created at position 0,0,0 rather than at the parent entity's position. See also: CreateCube, CreateSphere, CreateCone.

Function CreateFluid:TFluid()
Description | Create fluid mesh for blobs to use.

Function CreateFragShader:TShaderObject( shader:TShader,shaderFileName:String )
Description | Returns a new frag shader object from file.

Function CreateFragShaderString:TShaderObject( shader:TShader,shadercode:String )
Description | Returns a new frag shader object from string.

Function CreateGeosphere:TGeosphere( size:Int,parent:TEntity=Null )
Description | Create geodesic sphere and set terrain size.

Function CreateLight:TLight( light_type:Int=1,parent:TEntity=Null )
Description | Creates a light.
Information | Parameters: type (optional) - type of light 1: directional (default) 2: point 3: spot parent (optional) - parent entity of light Description: Creates a light. Lights work by affecting the colour of all vertices within the light's range. You need at to create at least one light if you wish to use 3D graphics otherwise everything will appear flat. The optional type parameter allows you to specify the type of light you wish to create. A value of 1 creates a directional light. This works similar to a sun shining on a house. All walls facing a certain direction are lit the same. How much they are lit by depends on the angle of the light reaching them. Directional lights have infinite 'position' and infinite range. A value of 2 creates a point (or omni) light. This works a little bit like a light bulb in a house, starting from a central point and gradually fading outwards. A value of 3 creates a spot light. This is a cone of light. This works similar to shining a torch in a house. It starts with an inner angle of light, and then extends towards an outer angle of light. You can adjust the angles of a 'spot' light with the LightConeAngles command. The optional parent parameter allow you to specify a parent entity for the light so that when the parent is moved the child light 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 light being created at position 0,0,0 rather than at the parent entity's position. Other notes: There is a DirectX limit on the number of lights available per scene - this is either 8 or 16 depending on your video card, but you should always assume 8. Also, you should remember that each light added effects the rendering speed. Lights do not cast shadows, like they do in real life. Most games get around these issues by the use of a pre-calculated 'baked' lightmap texture for the static geometry in the scene. Other lighting techniques include: adjusting vertex colors, dynamic shadows, and/or dynamic lights (ie. moving the lights around in the scene as they are needed). See also: LightRange, LightColor, LightConeAngles, AmbientLight.

Function CreateMesh:TMesh( parent:TEntity=Null )
Description | Create a 'blank' mesh entity and returns its handle.
Information | Parameters: parent (optional) - This optional parameter allows you to specify another entity which will act as the parent to this mesh. Description: Create a 'blank' mesh entity and returns its handle. When a mesh is first created it has no surfaces, vertices or triangles associated with it. To add geometry to this mesh, you will need to: CreateSurface() ; To make a surface AddVertex ; You will need to add at least 3 to make a Triangle AddTriangle ; This will add a triangle by connecting the Vertices (points) you added to the mesh.

Function CreateOcTree:TOcTree( w:Float,h:Float,d:Float,parent_ent:TEntity=Null )
Description | Create octree and set its width, height and depth.

Function CreateParticleEmitter:TParticleEmitter( particle:TEntity,parent_ent:TEntity=Null )
Description | Create particle emitter and set sprite for it to use.

Function CreatePivot:TPivot( parent:TEntity=Null )
Description | Creates a pivot entity.
Information | Parameters: parent (optional) - parent entity of pivot Description: Creates a pivot entity. 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 CreatePlane:TMesh( divisions:Int=1,parent:TEntity=Null )
Description | Creates a plane entity and returns its handle.
Information | Parameters: sub_divs (optional) - sub divisions of plane. Should be in the range 1-16. The default value is 1. parent (optional) - parent entity of plane Description: Creates a plane entity and returns its handle. A plane entity is basically a flat, infinite 'ground'. It is useful for outdoor games where you never want the player to see/reach the edge of the game world. The optional sub_divs parameter determines how many sub divisions of polygons the plane will have. Although a plane is flat and so adding extra polygons will not make it smoother, adding more polygons will allow more vertices to be lit for more detailed lighting effects. The optional parent parameter allows you to specify a parent entity for the plane so that when the parent is moved the child plane 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 plane being created at position 0,0,0 rather than at the parent entity's position. See also: CreateMirror.

Function CreatePostFX:TPostFX( cam:TCamera,passes:Int=1 )
Description | undocumented.

Function CreateQuad:TMesh( parent:TEntity=Null )
Description | Create flat quad.

Function CreateRigidBody:TRigidBody( body:TEntity,p1:TEntity,p2:TEntity,p3:TEntity,p4:TEntity )
Description | Create rigid physics body attached to four entities.

Function CreateShader:TShader( ShaderName:String,VshaderString:String,FshaderString:String )
Description | Load shader from two strings, vertex and fragment.

Function CreateShaderMaterial:TShader( ShaderName:String )
Description | Returns a new shader material without creating any shader objects.

Function CreateShaderVGF:TShader( ShaderName:String,VshaderString:String,GshaderString:String,FshaderString:String )
Description | Load shader from three strings, vertex, geometry and fragment.

Function CreateShadow:TShadowObject( parent:TMesh,Static:Int=False )
Description | Create stencil shadow, static is for static or dynamic shadows.

Function CreateSphere:TMesh( segments:Int=8,parent:TEntity=Null )
Description | Creates a sphere mesh/entity and returns its handle.
Information | Parameters: segments (optional) - sphere detail. Defaults to 8. parent (optional) - parent entity of sphere Description: Creates a sphere mesh/entity and returns its handle. 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. See also: CreateCube, CreateCylinder, CreateCone.

Function CreateSprite:TSprite( parent:TEntity=Null )
Description | Creates a sprite entity and returns its handle.
Information | Parameters: parent (optional) - parent entity of sprite Description: Creates a sprite entity and returns its handle. Sprites are simple flat (usually textured) rectangles made from two triangles. Unlike other entity objects they don't actually have a mesh that can be manipulated. The sprite will be positioned at 0,0,0 and extend from 1,-1 to +1,+1. Sprites have two real strengths. The first is that they consist of only two polygons; meaning you can use many of them at once. This makes them ideal for particle effects and 2D-using-3D games where you want lots of sprites on-screen at once. Secondly, sprites can be assigned a view mode using SpriteViewMode. By default this view mode is set to 1, which means the sprite will always face the camera. So no matter what the orientation of the camera is relative to the sprite, you will never actually notice that they are flat; by giving them a spherical texture, you can make them appear to look no different than a normal sphere. The optional parent parameter allow you to specify a parent entity for the sprite so that when the parent is moved the child sprite 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 sprite being created at position 0,0,0 rather than at the parent entity's position. Note: Sprites have their own commands for rotation and scaling. See also: LoadSprite, RotateSprite, ScaleSprite, HandleSprite, SpriteViewMode, PositionEntity, MoveEntity, TranslateEntity, EntityAlpha, FreeEntity.

Function CreateStencil:TStencil()
Description | Create stencil object.

Function CreateSurface:TSurface( mesh:TMesh,brush:TBrush=Null )
Description | Creates a surface attached to a mesh and returns the surface's handle.
Information | Parameters: mesh - mesh handle brush (optional) - brush handle Description: Creates a surface attached to a mesh and returns the surface's handle. Surfaces are sections of mesh which are then used to attach triangles to. You must have at least one surface per mesh in order to create a visible mesh, however you can use as many as you like. Splitting a mesh up into lots of sections allows you to affect those sections individually, which can be a lot more useful than if all the surfaces are combined into just one.

Function CreateTerrain:TTerrain( size:Int,parent:TEntity=Null )
Description | Creates a terrain entity and returns its handle.
Information | Parameters: grid_size - no of grid squares along each side of terrain, and must be a power of 2 value, e.g. 32, 64, 128, 256, 512, 1024. parent (optional) - parent entity of terrain Description: Creates a terrain entity and returns its handle. The terrain extends from 0,0,0 to grid_size,1,grid_size. A terrain is a special type of polygon object that uses real-time level of detail (LOD) to display landscapes which should theoretically consist of over a million polygons with only a few thousand. The way it does this is by constantly rearranging a certain amount of polygons to display high levels of detail close to the viewer and low levels further away. This constant rearrangement of polygons is occasionally noticeable however, and is a well-known side-effect of all LOD landscapes. This 'pop-in' effect can be reduced in lots of ways though, as the other terrain help files will go on to explain. The optional parent parameter allows you to specify a parent entity for the terrain so that when the parent is moved the child terrain 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 terrain being created at position 0,0,0 rather than at the parent entity's position. See also: LoadTerrain.

Function CreateTexture:TTexture( width:Int,height:Int,flags:Int=9,frames:Int=1 )
Description | Creates a texture and returns its handle.
Information | Parameters: width - width of texture height - height of texture flags (optional) - texture flag: 1: Color (default) 2: Alpha 4: Masked 8: Mipmapped 16: Clamp U 32: Clamp V 64: Spherical environment map 128: Cubic environment map 256: Store texture in vram 512: Force the use of high color textures frames (optional) - no of frames texture will have. Defaults to 1. Description: Creates a texture and returns its handle. Width and height are the size of the texture. Note that the actual texture size may be different from the width and height requested, as different types of 3D hardware support different sizes of texture. The optional flags parameter allows you to apply certain effects to the texture. Flags can be added to combine two or more effects, e.g. 3 (1+2) = texture with color and alpha maps. Here some more detailed descriptions of the flags: 1: Color - colour map, what you see is what you get. 2: Alpha - alpha map. If an image contains an alpha map, this will be used to make certain areas of the texture transparent. Otherwise, the colour map will be used as an alpha map. With alpha maps, the dark areas always equal high-transparency, light areas equal low-transparency. 4: Masked - all areas of a texture coloured 0,0,0 will not be drawn to the screen. 8: Mipmapped - low detail versions of the texture will be used at high distance. Results in a smooth, blurred look. 16: Clamp u - Any part of a texture that lies outsides the U coordinates of 0-1 will not be drawn. Prevents texture-wrapping. 32: Clamp v - Any part of a texture that lies outsides the v coordinates of 0-1 will not be drawn. Prevents texture-wrapping. 64: Spherical environment map - a form of environment mapping. This works by taking a single image, and then applying it to a 3D mesh in such a way that the image appears to be reflected. When used with a texture that contains light sources, it can give some meshes such as a teapot a shiny appearance. 128: Cubic environment map - a form of environment mapping. Cube mapping is similar to spherical mapping, except it uses six images each representing a particular 'face' of an imaginary cube, to give the appearance of an image that perfectly reflects its surroundings. When creating cubic environment maps with the CreateTexture command, cubemap textures *must* be square 'power of 2' sizes. See the SetCubeFace command for information on how to then draw to the cubemap. When loading cubic environments maps into Blitz using LoadTexture, all six images relating to the six faces of the cube must be contained within the one texture, and be laid out in a horizontal strip in the following order - left, forward, right, backward, up, down. The images comprising the cubemap must all be power of two sizes. Please note that not some older graphics cards do not support cubic mapping. In order to find out if a user's graphics card can support it, use GfxDriverCaps3D . 256: Store texture in vram. In some circumstances, this makes for much faster dynamic textures - ie. when using CopyRect between two textures. When drawing to cube maps in real-time, it is preferable to use this flag. 512: Force the use of high color textures in low bit depth graphics modes. This is useful for when you are in 16-bit color mode, and wish to create/load textures with the alpha flag - it should give better results. Once you have created a texture, use SetBuffer TextureBuffer to draw to it. However, to display 2D graphics on a texture, it is usually quicker to draw to an image and then copy it to the texturebuffer, and to display 3D graphics on a texture, your only option is to copy from the backbuffer to the texturebuffer. See also: LoadTexture, LoadAnimTexture.

Function CreateVertShader:TShaderObject( shader:TShader,shaderFileName:String )
Description | Returns a new vert shader object from file.

Function CreateVertShaderString:TShaderObject( shader:TShader,shadercode:String )
Description | Returns a new vert shader object from string.

Function CreateVoxelSprite:TVoxelSprite( slices:Int=64,parent:TEntity=Null )
Description | Create voxel sprite where slices is the number of sprites.

Function DeleteFragShader( myShader:TShaderObject )
Description | Deletes a frag shader object from a program object.

Function DeleteVertShader( myShader:TShaderObject )
Description | Deletes a vert shader object from a program object.

Function DeltaPitch:Float( ent1:TEntity,ent2:TEntity )
Description | Returns the pitch angle.
Information | Parameters: src_entity - source entity handle dest_entity - destination entity handle Description: Returns the pitch angle, that src_entity should be rotated by in order to face dest_entity. This command can be used to be point one entity at another, rotating on the x axis only. See also: DeltaYaw.

Function DeltaYaw:Float( ent1:TEntity,ent2:TEntity )
Description | Returns the yaw angle.
Information | Parameters: src_entity - source entity handle dest_entity - destination entity handle Description: Returns the yaw angle, that src_entity should be rotated by in order to face dest_entity. This command can be used to be point one entity at another, rotating on the y axis only. See also: DeltaPitch.

Function DepthBufferToTex( tex:TTexture,cam:TCamera=Null )
Description | Copy the contents of the depth buffer to a texture.

Function EmitterParticleAlpha( emit:TParticleEmitter,starta:Float,enda:Float,mida:Float=0,midlife:Int=0 )
Description | Set particles alpha at start and end, range is 0..1.

Function EmitterParticleColor( emit:TParticleEmitter,startr:Float,startg:Float,startb:Float,endr:Float,endg:Float,endb:Float,midr:Float=255,midg:Float=255,midb:Float=255,midlife:Int=0 )
Description | Set particles RGB color at start and end, default is 255,255,255.

Function EmitterParticleFunction( emit:TParticleEmitter,EmitterFunction( ent:Byte Ptr,life:Int ) )
Description | Points to callback function for emitter.
Information | This gives access to each particle and also current life left.

Function EmitterParticleLife( emit:TParticleEmitter,startl:Int,endl:Int,randl:Int=0 )
Description | Set particles start, end and random lifespan.
Information | startl sets when a particle becomes visible, endl is full life and randl is the random range.

Function EmitterParticleRotate( emit:TParticleEmitter,startr:Float,endr:Float,midr:Float=0,midlife:Int=0 )
Description | Set particles rotation angle at start and end.
Information | Minus values will rotate clockwise.

Function EmitterParticleScale( emit:TParticleEmitter,startx:Float,starty:Float,endx:Float,endy:Float,midsx:Float=1,midsy:Float=1,midlife:Int=0 )
Description | Set particles scale at start and end, default is 1.

Function EmitterParticleSpeed( emit:TParticleEmitter,starts:Float,ends:Float=0 )
Description | Set particles start and end speed.
Information | Minus end values can be used to slow particles down.

Function EmitterRate( emit:TParticleEmitter,r:Float )
Description | Rate between each emission, range is 0.01..1.01.
Information | This is a way to slow particle emissions down. A rate of 1.01 is full rate.

Function EmitterVariance( emit:TParticleEmitter,v:Float )
Description | Set random variance of particles, range is 0.001..0.1.
Information | Variance will be increasing chaotic above 0.1.

Function EmitterVector( emit:TParticleEmitter,startx:Float,starty:Float,startz:Float,endx:Float,endy:Float,endz:Float )
Description | Set emitters start and end 3d vectors.
Information | Vectors are affected by speed. Minus end values can be used to slow particles.

Function EndAction( act:TAction )
Description | Ends action so it can be freed, 1 = automatically ended, 2 = manually ended.

Function EndMax2D( version:Int=1 )
Description | Old end function as in Minib3d is 0, new end function is 1 (default)

Function EntityAlpha( ent:TEntity,alpha:Float )
Description | Sets the entity alpha level of an entity.
Information | Parameters: Entity - entity handle Alpha# - alpha level of entity Description: Sets the entity alpha level of an entity. The alpha# value should be in a floating point value in the range 0-1. The default entity alpha setting is 1. The alpha level is how transparent an entity is. A value of 1 will mean the entity is opaque. A value of 0 will mean the entity is completely transparent, i.e. invisible. Values between 0 and 1 will cause varying amount of transparency. This is useful for imitating the look of objects such as glass and other translucent materials. An EntityAlpha value of 0 is especially useful as Blitz3D will not render entities with such a value, but will still involve the entities in collision tests. This is unlike HideEntity, which doesn't involve entities in collisions.

Function EntityBlend( ent:TEntity,blend:Int )
Description | Sets the blending mode of an entity.
Information | Parameters: Entity - Entity handle Blend - Blend mode of the entity. 1: Alpha (default) 2: Multiply 3: Add Description: Sets the blending mode of an entity. This blending mode determines the way in which the new RGBA of the pixel being rendered is combined with the RGB of the background. To calculate the new RGBA of the pixel being rendered, the texture RGBA for the pixel (see TextureBlend for more information on how the texture RGBA is calculated) is taken, its alpha component multiplied by the entities/brushes (where applicable) alpha value and its color compentent multiplied by the entities/brushes colour. This is the RGBA which will then be blended into the background pixel, and how this is done depends on the EntityBlend value. Alpha: This blends the pixels according to the Alpha value. This is rougly done to the formula: Rr = ( An * Rn ) + ( ( 1.0 - An ) * Ro ) Gr = ( An * Gn ) + ( ( 1.0 - An ) * Go ) Br = ( An * Bn ) + ( ( 1.0 - An ) * Bo ) Where R = Red, G = Green, B = Blue, n = new pixel colour values, r = resultant colour values, o = old pixel colour values. Alpha blending is the default blending mode and is used with most world objects. Multiply: This blend mode will darken the underlying pixels. If you think of each RGB value as being on a scale from 0% to 100%, where 0 = 0% and 255 = 100%, the multiply blend mode will multiply the red, green and blue values individually together in order to get the new RGB value, roughly according to: Rr = ( ( Rn / 255.0 ) * ( Ro / 255.0 ) ) * 255.0 Gr = ( ( Gn / 255.0 ) * ( Go / 255.0 ) ) * 255.0 Br = ( ( Bn / 255.0 ) * ( Bo / 255.0 ) ) * 255.0 The alpha value has no effect with multiplicative blending. Blending a RGB value of 255, 255, 255 will make no difference, while an RGB value of 128, 128, 128 will darken the pixels by a factor of 2 and an RGB value of 0, 0, 0 will completely blacken out the resultant pixels. An RGB value of 0, 255, 255 will remove the red component of the underlying pixel while leaving the other color values untouched. Multiply blending is most often used for lightmaps, shadows or anything else that needs to 'darken' the resultant pixels. Add: Additive blending will add the new color values to the old, roughly according to: Rr = ( Rn * An ) + Ro Gr = ( Gn * An ) + Go Br = ( Bn * An ) + Bo The resultant RGB values are clipped out at 255, meaning that multiple additive effects can quickly cause visible banding from smooth gradients. Additive blending is extremely useful for effects such as laser shots and fire. See also: TextureBlend, EntityAlpha.

Function EntityBox( ent:TEntity,x:Float,y:Float,z:Float,w:Float,h:Float,d:Float )
Description | Sets the dimensions of an entity's collision box.
Information | Parameters: entity - entity handle# x# - x position of entity's collision box y# - y position of entity's collision box z# - z position of entity's collision box width# - width of entity's collision box height# - height of entity's collision box depth# - depth of entity's collision box Description: Sets the dimensions of an entity's collision box. See also: EntityRadius, Collisions, EntityType.

Function EntityClass:String( ent:TEntity )
Description | Returns a string containing the class of the specified entity.
Information | Parameters: entity - a valid entity handle Description: Returns a string containing the class of the specified entity. Possible return values are: Pivot Light Camera Mirror Listener Sprite Terrain Plane Mesh MD2 BSP Note that the command will fail if a valid entity handle is not supplied, and will not just return an empty string.

Function EntityCollided:TEntity( ent:TEntity,type_no:Int )
Description | Returns the handle of the entity of the specified type that collided with the specified entity.
Information | Parameters: entity - entity handle type - type of entity Description: Returns the handle of the entity of the specified type that collided with the specified entity. See also: CollisionX, CollisionY, CollisionZ, CollisionNX, CollisionNY, CollisionNZ, CountCollisions, EntityCollided, CollisionTime, CollisionEntity, CollisionSurface, CollisionTriangle.

Function EntityColor( ent:TEntity,red:Float,green:Float,blue:Float,recursive:Int=True )
Description | Sets the color of an entity.
Information | Parameters: entity - entity handle Red# - red value of entity Green# - green value of entity Blue# - blue value of entity Description: Sets the color of an entity. 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 EntityDistance:Float( ent1:TEntity,ent2:TEntity )
Description | Returns the distance between src_entity and dest_entity.
Information | Parameters: src_entity - source entity handle dest_entity - destination entity handle Description: Returns the distance between src_entity and dest_entity.

Function EntityFX( ent:TEntity,fx:Int )
Description | Sets miscellaneous effects for an entity.
Information | Parameters: entity - entity handle fx - 0: nothing (default) 1: full-bright 2: use vertex colors instead of brush color 4: flatshaded 8: disable fog 16: disable backface culling 32: force alpha-blending Description: Sets miscellaneous effects for an entity. Flags can be added to combine two or more effects. For example, specifying a flag of 3 (1+2) will result in a full-bright and vertex-coloured brush. Flag 32, to force alpha-blending, must be used in order to enable vertex alpha (see VertexColor). See also: VertexColor.

Function EntityInView:Int( ent:TEntity,cam:TCamera )
Description | Returns true if the specified entity is visible to the specified camera.
Information | Parameters: entity - entity handle camera - camera handle Description: Returns true if the specified entity is visible to the specified camera. If the entity is a mesh, its bounding box will be checked for visibility. For all other types of entities, only their centre position will be checked.

Function EntityMatrix:Float Ptr( ent:TEntity )
Description | undocumented.

Function EntityName:String( ent:TEntity )
Description | Returns the name of an entity.
Information | Parameters: entity - entity handle Description: Returns the name of an entity. An entity's name may be set in a modelling program, or manually set using NameEntity. See also: NameEntity.

Function EntityOrder( ent:TEntity,order:Int )
Description | Sets the drawing order for an entity.
Information | Parameters: entity - entity handle order - order that entity will be drawn in Description: Sets the drawing order for an entity. An order value of 0 will mean the entity is drawn normally. A value greater than 0 will mean that entity is drawn first, behind everything else. A value less than 0 will mean the entity is drawn last, in front of everything else. Setting an entity's order to non-0 also disables z-buffering for the entity, so should be only used for simple, convex entities like skyboxes, sprites etc. EntityOrder affects the specified entity but none of its child entities, if any exist.

Function EntityParent( ent:TEntity,parent_ent:TEntity,glob:Int=True )
Description | Attaches an entity to a parent.
Information | Parameters: entity - entity handle parent - parent entity handle global (optional) - true for the child entity to retain its global position and orientation. Defaults to true. Description: Attaches an entity to a parent. Parent may be 0, in which case the entity will have no parent.

Function EntityPick:TEntity( ent:TEntity,Range:Float )
Description | Returns the nearest entity 'ahead' of the specified entity.
Information | Parameters: entity - entity handle range# - range of pick area around entity Description: Returns the nearest entity 'ahead' of the specified entity. An entity must have a non-zero EntityPickMode to be pickable. See also: EntityPick, LinePick, CameraPick, EntityPickMode.

Function EntityPickMode( ent:TEntity,pick_mode:Int,obscurer:Int=True )
Description | Sets the pick mode for an entity.
Information | Parameters: entity - entity handle pick_geometry - type of geometry used for picking: 0: Unpickable (default) 1: Sphere (EntityRadius is used) 2: Polygon 3: Box (EntityBox is used) obscurer (optional) - True to determine that the entity 'obscures' other entities during an EntityVisible call. Defaults to True. Description: Sets the pick mode for an entity. The optional obscurer parameter is used with EntityVisible to determine just what can get in the way of the line-of-sight between 2 entities. This allows some entities to be pickable using the other pick commands, but to be ignored (i.e. 'transparent') when using EntityVisible. So, its very much EntityVisible specific. Please note that only Sphere and Box picking will work with Blitz3D sprites. For polygon picking, you will need a valid mesh. See also: EntityPick, LinePick, CameraPick, EntityPickMode.

Function EntityPitch:Float( ent:TEntity,glob:Int=False )
Description | Returns the pitch angle of an entity.
Information | Parameters: entity - name of entity that will have pitch angle returned global (optional) - true if the pitch angle returned should be relative to 0 rather than a parent entity's pitch angle. False by default. Description: Returns the pitch angle of an entity. The pitch angle is also the x angle of an entity.

Function EntityRadius( ent:TEntity,radius_x:Float,radius_y:Float=0 )
Description | Sets the radius of an entity's collision ellipsoid.
Information | Parameters: entity - entity handle x_radius# - x radius of entity's collision ellipsoid y_radius# (optional) - y radius of entity's collision ellipsoid. If omitted the x_radius# will be used for the y_radius#. Description: Sets the radius of an entity's collision ellipsoid. An entity radius should be set for all entities involved in ellipsoidal collisions, which is all source entities (as collisions are always ellipsoid-to-something), and whatever destination entities are involved in ellipsoid-to-ellipsoid collisions (collision method No.1). See also: EntityBox, Collisions, EntityType.

Function EntityRoll:Float( ent:TEntity,glob:Int=True )
Description | Returns the roll angle of an entity.
Information | Parameters: entity - name of entity that will have roll angle returned global (optional) - true if the roll angle returned should be relative to 0 rather than a parent entity's roll angle. False by default. Description: Returns the roll angle of an entity. The roll angle is also the z angle of an entity.

Function EntityScaleX:Float( ent:TEntity,glob:Int=False )
Description | Returns the scale for the x axis of an entity set with ScaleEntity.
Information | If glob is true then it's relative to any parents.

Function EntityScaleY:Float( ent:TEntity,glob:Int=False )
Description | Returns the scale for the y axis of an entity set with ScaleEntity.
Information | If glob is true then it's relative to any parents.

Function EntityScaleZ:Float( ent:TEntity,glob:Int=False )
Description | Returns the scale for the z axis of an entity set with ScaleEntity.
Information | If glob is true then it's relative to any parents.

Function EntityShininess( ent:TEntity,shine:Float )
Description | Sets the specular shininess of an entity.
Information | Parameters: Entity - entity handle Shininess# - shininess of entity Description: Sets the specular shininess of an entity. The shininess# value should be a floting point number in the range 0-1. The default shininess setting is 0. Shininess is how much brighter certain areas of an object will appear to be when a light is shone directly at them. Setting a shininess value of 1 for a medium to high poly sphere, combined with the creation of a light shining in the direction of it, will give it the appearance of a shiny snooker ball.

Function EntityTexture( ent:TEntity,tex:TTexture,frame:Int=0,index:Int=0 )
Description | Applies a texture to an entity.
Information | Parameters: entity - entity handle texture - texture handle frame (optional) - frame of texture. Defaults to 0. index (optional) - index number of texture. Should be in the range to 0-7. Defaults to 0. Description: Applies a texture to an entity. The optional frame parameter specifies which texture animation frame should be used as the texture. The optional index parameter specifies which index number should be assigned to the texture. Index numbers are used for the purpose of multitexturing. See TextureBlend. A little note about multitexturing and slowdown. Graphics cards support a maximum amount of textures per object, which can be used with very little, if any, slowdown. For most cards this is two, but for a GeForce3 it is four. However, once you use more than this amount, Blitz will emulate the effect itself by duplicating objects and textures. Obviously, this may then cause slowdown.

Function EntityType( ent:TEntity,type_no:Int,recursive:Int=False )
Description | Sets the collision type for an entity.
Information | Parameters: entity - entity handle collision_type - collision type of entity. Must be in the range 0-999. recursive (optional) - true to apply collision type to entity's children. Defaults to false. Description: Sets the collision type for an entity. A collision_type value of 0 indicates that no collision checking will occur with that entity. A collision value of 1-999 will mean collision checking will occur. See also: Collisions, GetEntityType, EntityBox, EntityRadius.

Function EntityVisible:Int( src_ent:TEntity,dest_ent:TEntity )
Description | Returns true if src_entity and dest_entity can 'see' each other.
Information | Parameters: src_entity - source entity handle dest_entity - destination entity handle Description: Returns true if src_entity and dest_entity can 'see' each other.

Function EntityX:Float( ent:TEntity,glob:Int=False )
Description | The X-coordinate of the entity.
Information | Parameters: entity = handle of Loaded or Created Entity global = True for Global coordinates, False for Local. Optional, defaults to False. Description: The X-coordinate of the entity. If the global flag is set to False then the parent's local coordinate system is used. 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: MoveEntity entity, 0,0,1 No matter what the orientation this moves one unit forward.

Function EntityY:Float( ent:TEntity,glob:Int=False )
Description | The Y-coordinate of the entity.
Information | Parameters: entity = handle of Loaded or Created Entity global = True for Global coordinates, False for Local. Optional, defaults to False. Description: The Y-coordinate of the entity. If the global flag is set to False then the parent's local coordinate system is used. See EntityX() for an overview of Local and Global coordinates.

Function EntityYaw:Float( ent:TEntity,glob:Int=False )
Description | Returns the yaw angle of an entity.
Information | Parameters: entity - name of entity that will have yaw angle returned global (optional) - true if the yaw angle returned should be relative to 0 rather than a parent entity's yaw angle. False by default. Description: Returns the yaw angle of an entity. The yaw angle is also the y angle of an entity.

Function EntityZ:Float( ent:TEntity,glob:Int=False )
Description | The Z-coordinate of the entity.
Information | Parameters: entity = handle of Loaded or Created Entity global = True for Global coordinates, False for Local. Optional, defaults to False. Description: The Z-coordinate of the entity. If the global flag is set to False then the parent's local coordinate system is used. See EntityX() for an overview of Local and Global coordinates.

Function ExtractAnimSeq:Int( ent:TEntity,first_frame:Int,last_frame:Int,seq:Int=0 )
Description | This command allows you to convert an animation with an MD2-style series of anim sequences into a pure Blitz anim sequence.
Information | Parameters: entity - entity handle first_frame - first frame of anim sequence to extract last_frame - last frame of anim sequence to extract anim_seq (optional) - anim sequence to extract from. This is usually 0, and as such defaults to 0. Description: This command allows you to convert an animation with an MD2-style series of anim sequences into a pure Blitz anim sequence, and play it back as such using Animate.

Function FindChild:TEntity( ent:TEntity,child_name:String )
Description | Returns the first child of the specified entity with name matching child_name$
Information | Parameters: entity - entity handle child_name$ - child name to find within entity Description: Returns the first child of the specified entity with name matching child_name$.

Function FindSurface:TSurface( mesh:TMesh,brush:TBrush )
Description | Attempts to find a surface attached to the specified mesh and created with the specified brush.
Information | Parameters: mesh - mesh handle brush - brush handle Description: Attempts to find a surface attached to the specified mesh and created with the specified brush. Returns the surface handle if found or 0 if not. See also: CountSurfaces, GetSurface.

Function FitMesh( mesh:TMesh,x:Float,y:Float,z:Float,width:Float,height:Float,depth:Float,uniform:Int=False )
Description | Scales and translates all vertices of a mesh so that the mesh occupies the specified box.
Information | Parameters: mesh - mesh handle x# - x position of mesh y# - y position of mesh z# - z position of mesh width# - width of mesh height# - height of mesh depth# - depth of mesh uniform (optional) - if true, the mesh will be scaled by the same amounts in x, y and z, so will not be distorted. Defaults to false. Description: Scales and translates all vertices of a mesh so that the mesh occupies the specified box. Do not use a width#, height# or depth# value of 0, otherwise all mesh data will be destroyed and your mesh will not be displayed. Use a value of 0.001 instead for a flat mesh along one axis. See also: ScaleMesh, ScaleEntity.

Function FlipMesh( mesh:TMesh )
Description | Flips all the triangles in a mesh.
Information | Parameters: mesh - mesh handle Description: Flips all the triangles in a mesh. This is useful for a couple of reasons. Firstly though, it is important to understand a little bit of the theory behind 3D graphics. A 3D triangle is represented by three points; only when these points are presented to the viewer in a clockwise-fashion is the triangle visible. So really, triangles only have one side. Normally, for example in the case of a sphere, a model's triangles face the inside of the model, so it doesn't matter that you can't see them. However, what about if you wanted to use the sphere as a huge sky for your world, i.e. so you only needed to see the inside? In this case you would just use FlipMesh. Another use for FlipMesh is to make objects two-sided, so you can see them from the inside and outside if you can't already. In this case, you can copy the original mesh using CopyEntity, specifying the original mesh as the parent, and flip it using FlipMesh. You will now have two meshes occupying the same space - this will make it double-sided, but beware, it will also double the polygon count! The above technique is worth trying when an external modelling program has exported a model in such a way that some of the triangles appear to be missing.

Function FluidArray( fluid:TFluid,Array:Float Var,w:Int,h:Int,d:Int )
Description | Create custom rendering array data for fluid mesh and set width, height and depth.

Function FluidFunction( fluid:TFluid,FieldFunction:Float( x:Float,y:Float,z:Float ) )
Description | Set custom rendering callback function for fluid mesh.

Function FluidThreshold( fluid:TFluid,threshold:Float )
Description | Set threshold value used in fluid rendering algorithm, 0.5 is default.

Function FreeAction( act:TAction )
Description | Frees action from memory when it has ended.

Function FreeBrush( brush:TBrush )
Description | Frees up a brush.
Information | Parameters: brush - brush handle Description: Frees up a brush.

Function FreeBrushTextures( brush:TBrush )
Description | Frees all brush textures, FreeBrush does not free textures.

Function FreeEntity( ent:TEntity )
Description | FreeEntity will free up the internal resources associated with a particular entity and remove it from the scene.
Information | Parameters: EntityHandle - Handle returned by an Entity creating function such as CreateCube(), CreateLight(), LoadMesh() etc. Description: FreeEntity will free up the internal resources associated with a particular entity and remove it from the scene. This command will also free all children entities parented to the entity. Note that the variable holding the handle (and any variables referencing children handles) are not reset as it is up to the Blitz programmer to zero or ignore their contents following a call to FreeEntity().

Function FreeShader( shader:TShader ) ' Spinduluz
Description | Frees a shader material.

Function FreeShadow( shad:TShadowObject )
Description | Free stencil shadow.

Function FreeStencil( stencil:TStencil ) ' Spinduluz
Description | Frees a stencil object.

Function FreeSurface( surf:TSurface )
Description | Frees VBO data and brush.

Function FreeTexture( tex:TTexture )
Description | Frees up a texture from memory.
Information | Parameters: texture - texture handle Description: Frees up a texture from memory. Freeing a texture means you will not be able to use it again; however, entities already textured with it will not lose the texture.

Function GeosphereHeight( geo:TGeosphere,h:Float )
Description | Set terrain height normalizing value, 0.05 is default.

Function GetBrushTexture:TTexture( brush:TBrush,index:Int=0 )
Description | Returns the texture that is applied to the specified brush.
Information | Parameters: brush - brush handle index (optional) - index of texture applied to brush, from 0-7. Defaults to 0. Description: Returns the texture that is applied to the specified brush. The optional index parameter allows you to specify which particular texture you'd like returning, if there are more than one textures applied to a brush. You should release the texture returned by GetBrushTexture after use to prevent leaks! Use FreeTexture to do this. To find out the name of the texture, use TextureName See also: TextureName, FreeTexture, GetEntityBrush, GetSurfaceBrush.

Function GetChild:TEntity( ent:TEntity,child_no:Int )
Description | Returns a child of an entity.
Information | Parameters: entity - entity handle index - index of child entity. Should be in the range 1...CountChildren( entity ) inclusive. Description: Returns a child of an entity.

Function GetEntityBrush:TBrush( ent:TEntity )
Description | Returns a brush with the same properties as is applied to the specified entity.
Information | Parameters: entity - entity handle Description: Returns a brush with the same properties as is applied to the specified entity. If this command does not appear to be returning a valid brush, try using GetSurfaceBrush instead with the first surface available. Remember, GetEntityBrush actually creates a new brush so don't forget to free it afterwards using FreeBrush to prevent memory leaks. Once you have got the brush handle from an entity, you can use GetBrushTexture and TextureName to get the details of what texture(s) are applied to the brush. See also: GetSurfaceBrush, FreeBrush, GetBrushTexture, TextureName.

Function GetEntityType:Int( ent:TEntity )
Description | Returns the collision type of an entity as set by the EntityType command.
Information | Parameters: entity - entity handle Description: Returns the collision type of an entity as set by the EntityType command. See also: EntityType, EntityBox, EntityRadius, Collisions, ResetEntity.

Function GetMatElement:Float( ent:TEntity,row:Int,col:Int )
Description | Returns the value of an element from within an entity's transformation matrix.
Information | Parameters: entity - entity handle row - matrix row index column - matrix column index Description: Returns the value of an element from within an entity's transformation matrix. The transformation matrix is what is used by Blitz internally to position, scale and rotate entities. GetMatElement is intended for use by advanced users only.

Function GetMeshLoader:TMeshLoader(extension:String)
Description | Returns a mesh loader capable of loading extension.

Function GetParent:TEntity( ent:TEntity )
Description | Returns an entity's parent.
Information | Parameters: entity - entity handle Description: Returns an entity's parent.

Function GetShaderProgram:Int( material:TShader )
Description | Get a shader program object reference.

Function GetString:String( obj:Object,strPtr:Byte Ptr )
Description | Gets a Blitz string from a C string.

Function GetSurface:TSurface( mesh:TMesh,surf_no:Int )
Description | Returns the handle of the surface attached to the specified mesh and with the specified index number.
Information | Parameters: mesh - mesh handle index - index of surface Description: Returns the handle of the surface attached to the specified mesh and with the specified index number. Index should be in the range 1...CountSurfaces( mesh ), inclusive. You need to 'get a surface', i.e. get its handle, in order to be able to then use that particular surface with other commands. See also: CountSurfaces, FindSurface.

Function GetSurfaceBrush:TBrush( surf:TSurface )
Description | Returns a brush with the same properties as is applied to the specified mesh surface.
Information | Parameters: surface - surface handle Description: Returns a brush with the same properties as is applied to the specified mesh surface. If this command does not appear to be returning a valid brush, try using GetEntityBrush instead. Remember, GetSurfaceBrush actually creates a new brush so don't forget to free it afterwards using FreeBrush to prevent memory leaks. Once you have got the brush handle from a surface, you can use GetBrushTexture and TextureName to get the details of what texture(s) are applied to the brush. See also: GetEntityBrush, FreeBrush, GetSurface, GetBrushTexture, TextureName.

Function GlobalAnIsotropic( f:Float )
Description | Set global texture anisotropic (default for all), TextureAnIsotropic overrides it.

Function GlobalHeight:Int()
Description | Returns global height of screen resolution.

Function GlobalResolution( width:Int,height:Int )
Description | Sets global width and height of screen resolution.
Information | Only needed when changing screen resolution, these globals are used in CreateCamera, CameraViewport, CameraPick, BackBufferToTex and DepthBufferToTex.

Function GlobalWidth:Int()
Description | Returns global width of screen resolution.

Function HandleSprite( sprite:TSprite,h_x:Float,h_y:Float )
Description | Sets a sprite handle.
Information | Parameters: sprite - sprite handle. Not to be confused with HandleSprite - ie. the handle used to position the sprite, rather than the sprite's actual handle Description: Sets a sprite handle. Defaults to 0,0. A sprite extends from -1,-1 to +1,+1. See also: LoadSprite, CreateSprite.

Function HideEntity( ent:TEntity )
Description | Hides an entity.
Information | Parameters: entity - entity handle Description: Hides an entity, so that it is no longer visible, and is no longer involved in collisions. 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 LightColor( light:TLight,red:Float,green:Float,blue:Float )
Description | Sets the color of a light.
Information | Parameters: light - light handle red# - red value of light green# - green value of light blue# - blue value of light Description: Sets the color of a light. An r,g,b value of 255,255,255 will brighten anything the light shines on. An r,g,b value of 0,0,0 will have no affect on anything it shines on. An r,g,b value of -255,-255,-255 will darken anything it shines on. This is known as 'negative lighting', and is useful for shadow effects. See also: CreateLight, LightRange, LightConeAngles.

Function LightConeAngles( light:TLight,inner_ang:Float,outer_ang:Float )
Description | Sets the 'cone' angle for a 'spot' light.
Information | Parameters: light - light handle inner_angle# - inner angle of cone outer_angle# - outer angle of cone Description: Sets the 'cone' angle for a 'spot' light. The default light cone angles setting is 0,90. See also: CreateLight, LightRange, LightColor.

Function LightMesh( mesh:TMesh,red:Float,green:Float,blue:Float,range:Float=0,light_x:Float=0,light_y:Float=0,light_z:Float=0 )
Description | Performs a 'fake' lighting operation on a mesh.
Information | You need to use EntityFX ent,2 to enable vertex colors on the target mesh before you can see any results.

Function LightRange( light:TLight,Range:Float )
Description | Sets the range of a light.
Information | Parameters: light - light handle range# - range of light (default: 1000.0) Description: Sets the range of a light. The range of a light is how far it reaches. Everything outside the range of the light will not be affected by it. The value is very approximate, and should be experimented with for best results. See also: CreateLight, LightColor, LightConeAngles.

Function LinePick:TEntity( x:Float,y:Float,z:Float,dx:Float,dy:Float,dz:Float,radius:Float=0 )
Description | Returns the first entity between x.
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 radius (optional) - radius of line pick Description: Returns the first entity between x,y,z to x+dx,y+dy,z+dz. See also: EntityPick, LinePick, CameraPick, EntityPickMode.

Function LinkShader:Int( shader:TShader )
Description | Link shader to a program object, as created by CreateShaderMaterial.

Function LoadAnimMesh:TMesh( url:Object,parent:TEntity=Null,flags:Int = -1 )
Returns | A mesh object with child meshes if any.
Description | Loads an anim mesh, see MeshLoader.

Function LoadAnimSeq:Int( ent:TEntity,file:String )
Description | Appends an animation sequence from a file to an entity.
Information | Parameters: entity - entity handle filename$ - filename of animated 3D object Description: Appends an animation sequence from a file to an entity. Returns the animation sequence number added.

Function LoadBrush:TBrush( file:String,flags:Int=9,u_scale:Float=1,v_scale:Float=1 )
Description | Creates a brush.
Information | Parameters: texture_file$ - filename of texture flags - brush flags flags (optional) - flags can be added to combine effects: 1: Color 2: Alpha 4: Masked 8: Mipmapped 16: Clamp U 32: Clamp V 64: Spherical reflection map u_scale - brush u_scale v_scale - brush v_scale Description: Creates a brush, loads and assigns a texture to it, and returns a brush handle.

Function LoadGeosphere:TGeosphere( file:String,parent:TEntity=Null )
Description | Load geodesic sphere terrain from heightmap image.

Function LoadMaterial:TMaterial( filename:String,flags:Int,frame_width:Int,frame_height:Int,first_frame:Int,frame_count:Int )
Description | Load a texture from image for 3D texture sampling, use with voxelsprites.
Information | Flags are texture flags, frame width/height is the size in pixels of each slice, first frame is the index of the slice and frame count is how many slices.

Function LoadMD2:TMesh( url:Object,parent:TEntity=Null )
Description | Loads an md2 entity and returns its handle.

Function LoadMesh:TMesh( url:Object,parent:TEntity=Null,flags:Int = -1 )
Returns | A mesh object.
Description | Loads a single mesh, see MeshLoader.

Function LoadShader:TShader( ShaderName:String,VshaderFileName:String,FshaderFileName:String )
Description | Load shader from two files, vertex and fragment.

Function LoadShaderVGF:TShader( ShaderName:String,VshaderFileName:String,GshaderFileName:String,FshaderFileName:String )
Description | Load shader from three files, vertex, geometry and fragment.

Function LoadSprite:TSprite( tex_file:String,tex_flag:Int=1,parent:TEntity=Null )
Description | Creates a sprite entity.
Information | Parameters: text_file$ - filename of image file to be used as sprite tex_flag (optional) - texture flag: 1: Color 2: Alpha 4: Masked 8: Mipmapped 16: Clamp U 32: Clamp V 64: Spherical reflection map parent - parent of entity Description: Creates a sprite entity, and assigns a texture to it. See also: LoadSprite, RotateSprite, ScaleSprite, HandleSprite, SpriteViewMode, PositionEntity, MoveEntity, TranslateEntity, EntityAlpha, FreeEntity.

Function LoadTerrain:TTerrain( file:String,parent:TEntity=Null )
Description | Loads a terrain from an image file and returns the terrain's handle.
Information | Parameters: file$ - filename of image file to be used as height map parent (optional) - parent entity of terrain Description: Loads a terrain from an image file and returns the terrain's handle. The image's red channel is used to determine heights. Terrain is initially the same width and depth as the image, and 1 unit high. Tips on generating nice terrain: * Smooth or blur the height map * Reduce the y scale of the terrain * Increase the x/z scale of the terrain * Reduce the camera range When texturing an entity, a texture with a scale of 1,1,1 (default) will be the same size as one of the terrain's grid squares. A texture that is scaled to the same size as the size of the bitmap used to load it or the no. of grid square used to create it, will be the same size as the terrain. The optional parent parameter allows you to specify a parent entity for the terrain so that when the parent is moved the child terrain 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 terrain being created at position 0,0,0 rather than at the parent entity's position. A heightmaps dimensions (width and height) must be the same and must be a power of 2, e.g. 32, 64, 128, 256, 512, 1024. See also: CreateTerrain.

Function ManualCollision( ent:TEntity,ent2:TEntity,col_method:Int,col_response:Int ) ' KippyKip
Description | Use manual collision mode between entities, diables automatic collisions.

Function MeshCSG:TMesh( m1:TMesh,m2:TMesh,method_no:Int=1 )
Description | Method 0 subtracts mesh2 from mesh1, 1 adds meshes, 2 intersects meshes. Returns a new mesh.

Function MeshCullRadius( ent:TEntity,radius:Float )
Description | Equivalent of Blitz3D's MeshCullBox command. It sets the radius of a mesh's 'cull sphere'
Information | If the 'cull sphere' is not inside the viewing area, the mesh will not be rendered. A mesh's cull radius is set automatically, therefore in most cases you will not have to use this command. One time you may have to use it is for animated meshes where the default cull radius may not take into account all animation positions, resulting in the mesh being wrongly culled at extreme positions.

Function MeshDepth:Float( mesh:TMesh )
Description | Returns the depth of a mesh.
Information | Parameters: mesh - mesh handle Description: Returns the depth of a mesh. This is calculated by the actual vertex positions and so the scale of the entity (set by ScaleEntity) will not have an effect on the resultant depth. Mesh operations, on the other hand, will effect the result. See also: MeshWidth, MeshHeight.

Function MeshesIntersect:Int( mesh1:TMesh,mesh2:TMesh )
Description | Returns true if the specified meshes are currently intersecting.
Information | Parameters: mesh_a - mesh_a handle mesh_b - mesh_b handle Description: Returns true if the specified meshes are currently intersecting. This is a fairly slow routine - use with discretion... This command is currently the only polygon->polygon collision checking routine available in Blitz3D.

Function MeshHeight:Float( mesh:TMesh )
Description | Returns the height of a mesh.
Information | Parameters: mesh - mesh handle Description: Returns the height of a mesh. This is calculated by the actual vertex positions and so the scale of the entity (set by ScaleEntity) will not have an effect on the resultant height. Mesh operations, on the other hand, will effect the result. See also: MeshWidth, MeshDepth.

Function MeshWidth:Float( mesh:TMesh )
Description | Returns the width of a mesh.
Information | Parameters: mesh - mesh handle Description: Returns the width of a mesh. This is calculated by the actual vertex positions and so the scale of the entity (set by ScaleEntity) will not have an effect on the resultant width. Mesh operations, on the other hand, will effect the result. See also: MeshHeight, MeshDepth.

Function ModifyGeosphere( geo:TGeosphere,x:Int,z:Int,new_height:Float )
Description | Set height of a given point, like ModifyTerrain.

Function ModifyTerrain( terr:TTerrain,x:Int,z:Int,new_height:Float )
Description | Sets the height of a point on a terrain.
Information | Parameters: terrain - terrain handle grid_x - grid x coordinate of terrain grid_y - grid y coordinate of terrain height# - height of point on terrain. Should be in the range 0-1. realtime (optional) - True to modify terrain immediately. False to modify terrain when RenderWorld in next called. Defaults to False. Description: Sets the height of a point on a terrain.

Function MoveEntity( ent:TEntity,x:Float,y:Float,z:Float )
Description | Moves an entity relative to its current position and orientation.
Information | Parameters: entity - name of entity to be moved x# - x amount that entity will be moved by y# - y amount that entity will be moved by z# - z amount that entity will be moved by Description: Moves an entity relative to its current position and orientation. 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. See also: TranslateEntity, PositionEntity, PositionMesh.

Function MSAntiAlias( multisample:Int=0 )
Description | Enables or disables hardware multisample antialiasing if supported.

Function NameEntity( ent:TEntity,name:String )
Description | Sets an entity's name.
Information | Parameters: entity - entity handle name$ - name of entity Description: Sets an entity's name. See also: EntityName.

Function NewAnimationKeys:TAnimationKeys( bone:TBone=Null )
Description | Create a new TAnimationKeys object.
Information | keys=NewAnimationKeys()

Function NewBone:TBone()
Description | Create a new TBone object.
Information | bone=NewBone()

Function NewMatPtr:TMatPtr()
Description | Create a new TMatPtr object, returns a Float Ptr matrix.
Information | mat=NewMatPtr()

Function NewMesh:TMesh()
Description | Create a new TMesh object.
Information | mesh=NewMesh()

Function NewQuatPtr:TQuatPtr()
Description | Create a new TQuatPtr object, returns a Float Ptr quaternion.
Information | quat=NewQuatPtr()

Function NewSprite:TSprite()
Description | Create a new TSprite object.
Information | spr=NewSprite()

Function NewSurface:TSurface()
Description | Create a new TSurface object.
Information | surf=NewSurface()

Function NewTexture:TTexture()
Description | Create a new TTexture object.
Information | tex=NewTexture()

Function NewVecPtr:TVecPtr()
Description | Create a new TVecPtr object, returns a Float Ptr vector.
Information | vec=NewVecPtr()

Function OctreeBlock( octree:TOcTree,mesh:TMesh,level:Int,X:Float,Y:Float,Z:Float,Near:Float=0,Far:Float=1000 )
Description | Place mesh into a node of an octree, the mesh can be duplicated using no more memory.
Information | Since a block is not an entity it has no position, etc. it has the properties of the node it is in. Level defaults to 0, the higher the level the smaller the cell. XYZ is the position in the octree. Near defaults to 0, this is the minimum distance at which that node is visible, if 0 that node is always visible, if higher the mesh/block won't be rendered when it's closer. Far defaults to 1000, this is the maximum distance at which the node can be split in children, if the node is set at a higher range than the camera, its children won't be rendered.

Function OctreeMesh( octree:TOcTree,mesh:TMesh,level:Int,X:Float,Y:Float,Z:Float,Near:Float=0,Far:Float=1000 )
Description | Place mesh into a node of an octree, the mesh can't be duplicated so to do that use CopyEntity.

Function PaintEntity( ent:TEntity,brush:TBrush )
Description | Paints a entity with a brush.
Information | Parameters: entity - entity handle brush - brush handle Description: Paints a entity with a brush. The reason for using PaintEntity to apply specific properties to a entity using a brush rather than just using EntityTexture, EntityColor, EntityShininess etc, is that you can pre-define one brush, and then paint entities over and over again using just the one command rather than lots of separate ones.

Function PaintMesh( mesh:TMesh,brush:TBrush )
Description | Paints a mesh with a brush.
Information | Parameters: mesh - mesh handle brush - brush handle Description: Paints a mesh with a brush. This has the effect of instantly altering the visible appearance of the mesh, assuming the brush's properties are different to what was was applied to the surface before. The reason for using PaintMesh to apply specific properties to a mesh using a brush rather than just using EntityTexture, EntityColor, EntityShininess etc, is that you can pre-define one brush, and then paint meshes over and over again using just the one command rather than lots of separate ones. See also: PaintEntity, PaintSurface.

Function PaintSurface( surf:TSurface,brush:TBrush )
Description | Paints a surface with a brush.
Information | Parameters: surface - surface handle brush - brush handle Description: Paints a surface with a brush. This has the effect of instantly altering the visible appearance of that particular surface, i.e. section of mesh, assuming the brush's properties are different to what was applied to the surface before. See also: PaintEntity, PaintMesh.

Function ParticleColor( sprite:TSprite,r:Float,g:Float,b:Float,a:Float=0 )
Description | Sets color of batch particle trails.
Information | Batch particle render mode (3) is not working.

Function ParticleTrail( sprite:TSprite,length:Int )
Description | Sets number of batch particles in trail.
Information | Batch particle render mode (3) is not working.

Function ParticleVector( sprite:TSprite,x:Float,y:Float,z:Float )
Description | Sets 3d vector of batch particle trails.
Information | Batch particle render mode (3) is not working.

Function PickedEntity:TEntity()
Description | Returns the entity 'picked' by the most recently executed Pick command.
Information | Parameters: None. Description: Returns the entity 'picked' by the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick. Returns 0 if no entity was picked.

Function PickedNX:Float()
Description | Returns the x component of the normal of the most recently executed Pick command.
Information | Parameters: None. Description: Returns the x component of the normal of the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick.

Function PickedNY:Float()
Description | Returns the y component of the normal of the most recently executed Pick command.
Information | Parameters: None. Description: Returns the y component of the normal of the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick.

Function PickedNZ:Float()
Description | Returns the z component of the normal of the most recently executed Pick command.
Information | Parameters: None. Description: Returns the z component of the normal of the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick.

Function PickedSurface:TSurface()
Description | Returns the handle of the surface that was 'picked' by the most recently executed Pick command.
Information | Parameters: None. Description: Returns the handle of the surface that was 'picked' by the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick.

Function PickedTime:Float()
Description | Returns the time taken to calculate the most recently executed Pick command.
Information | Parameters: None. Description: Returns the time taken to calculate the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick.

Function PickedTriangle:Int()
Description | Returns the index number of the triangle that was 'picked' by the most recently executed Pick command.
Information | Parameters: None. Description: Returns the index number of the triangle that was 'picked' by the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick.

Function PickedX:Float()
Description | Returns the world x coordinate of the most recently executed Pick command.
Information | Parameters: None. Description: Returns the world x coordinate of the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick. The coordinate represents the exact point of where something was picked. See also: PickedY, PickedZ.

Function PickedY:Float()
Description | Returns the world y coordinate of the most recently executed Pick command.
Information | Parameters: None. Description: Returns the world y coordinate of the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick. The coordinate represents the exact point of where something was picked. See also: PickedX, PickedZ.

Function PickedZ:Float()
Description | Returns the world z coordinate of the most recently executed Pick command.
Information | Parameters: None. Description: Returns the world z coordinate of the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick. The coordinate represents the exact point of where something was picked. See also: PickedX, PickedY.

Function PointEntity( ent:TEntity,target_ent:TEntity,roll:Float=0 )
Description | Points one entity at another.
Information | Parameters: entity - entity handle target - target entity handle roll# (optional) - roll angle of entity Description: Points one entity at another. 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 PositionAnimMesh( mesh:TMesh,px#,py#,pz# )
Description | Moves all vertices of mesh and every child mesh.

Function PositionEntity( ent:TEntity,x:Float,y:Float,z:Float,glob:Int=False )
Description | Positions an entity at an absolute position in 3D space.
Information | Parameters: entity - name of entity to be positioned x# - x co-ordinate that entity will be positioned at y# - y co-ordinate that entity will be positioned at z# - z co-ordinate that entity will be positioned at global (optional) - true if the position should be relative to 0,0,0 rather than a parent entity's position. False by default. Description: Positions an entity at an absolute position in 3D space. 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. See also: MoveEntity, TranslateEntity, PositionMesh.

Function PositionMesh( mesh:TMesh,px:Float,py:Float,pz:Float )
Description | Moves all vertices of a mesh.
Information | Parameters: mesh - mesh handle x# - x position of mesh y# - y position of mesh z# - z position of mesh Description: Moves all vertices of a mesh. See also: PositionEntity, MoveEntity, TranslateEntity.

Function PositionTexture( tex:TTexture,u_pos:Float,v_pos:Float )
Description | Positions a texture at an absolute position.
Information | Parameters: texture - texture handle u_position# - u position of texture v_position# - v position of texture Description: Positions a texture at an absolute position. This will have an immediate effect on all instances of the texture being used. Positioning a texture is useful for performing scrolling texture effects, such as for water etc.

Function PostFXBuffer( fx:TPostFX,pass_no:Int,source_pass:Int,index:Int,slot:Int )
Description | undocumented.

Function PostFXFunction( fx:TPostFX,pass_no:Int,PassFunction() )
Description | undocumented.

Function PostFXShader( fx:TPostFX,pass_no:Int,shader:TShader )
Description | undocumented.

Function PostFXShaderPass( fx:TPostFX,pass_no:Int,name:String,v:Int )
Description | undocumented.

Function PostFXTexture( fx:TPostFX,pass_no:Int,tex:TTexture,slot:Int,frame:Int=0 )
Description | undocumented.

Function ProjectedX:Float()
Description | Returns the viewport x coordinate of the most recently executed CameraProject.
Information | Parameters: None. Description: Returns the viewport x coordinate of the most recently executed CameraProject.

Function ProjectedY:Float()
Description | Returns the viewport y coordinate of the most recently executed CameraProject.
Information | Parameters: None. Description: Returns the viewport y coordinate of the most recently executed CameraProject.

Function ProjectedZ:Float()
Description | Returns the viewport z coordinate of the most recently executed CameraProject.
Information | Parameters: None. Description: Returns the viewport z coordinate of the most recently executed CameraProject.

Function RenderWorld()
Description | Renders the current scene to the BackBuffer onto the rectangle defined by each cameras CameraViewport( )
Information | Parameters: tween# (optional) - defaults to 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. Rendering to other buffers is currently not supported by Blitz3D. The optional tween parameter should only be specified when RenderWorld is used in conjunction with CaptureWorld. CaptureWorld is used to store the 'old' position, rotation and scale, alpha and colour of each entity in the game world, and a tween value of The use of tweening allows you to render more than one frame per game logic update, while still keeping the display smooth. This allows you to cut down on the CPU time that would be required to update your game logic every render. Note, however, that the bottleneck in almost all 3D applications is the graphics card and the CPU time involved in updating game logic is often very little. A good alternative to render tweening is the use of a delta time, that is, moving your entities each frame depending on the time it took for the program to process and render that frame. Render tweening is quite an advanced technique, and it is not necessary to use it, so don't worry if you don't quite understand it. See the castle demo included in the mak (nickname of Mark Sibly, author of Blitz3D) directory of the Blitz3D samples section for a demonstration of render tweening. See also: CaptureWorld, CameraViewport, CameraProjMode.

Function RepeatMesh:TMesh( mesh:TMesh,parent:TEntity=Null )
Description | Like CopyMesh but for instancing effects.

Function ResetEntity( ent:TEntity )
Description | Resets the collision state of an entity.
Information | Parameters: entity - entity handle Description: Resets the collision state of an entity. See also: EntityBox, EntityRadius, Collisions, EntityType, GetEntityType.

Function ResetShadow( shad:TShadowObject )
Description | Reset created flag to update static shadow.

Function RotateAnimMesh( mesh:TMesh,rx#,ry#,rz# )
Description | Rotates all vertices of mesh and every child mesh.

Function RotateEntity( ent:TEntity,x:Float,y:Float,z:Float,glob:Int=False )
Description | Rotates an entity so that it is at an absolute orientation.
Information | Parameters: entity - name of the entity to be rotated pitch# - angle in degrees of pitch rotation yaw# - angle in degrees of yaw rotation roll# - angle in degrees of roll rotation global (optional) - true if the angle rotated should be relative to 0,0,0 rather than a parent entity's orientation. False by default. Description: Rotates an entity so that it is at an absolute orientation. 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. See also: TurnEntity, RotateMesh.

Function RotateMesh( mesh:TMesh,pitch:Float,yaw:Float,roll:Float )
Description | Rotates all vertices of a mesh by the specified rotation.
Information | Parameters: mesh - mesh handle pitch# - pitch of mesh yaw# - yaw of mesh roll# - roll of mesh Description: Rotates all vertices of a mesh by the specified rotation. See also: RotateEntity, TurnEntity.

Function RotateSprite( sprite:TSprite,ang:Float )
Description | Rotates a sprite.
Information | Parameters: sprite - sprite handle angle# - absolute angle of sprite rotation Description: Rotates a sprite. See also: CreateSprite, LoadSprite.

Function RotateTexture( tex:TTexture,ang:Float )
Description | Rotates a texture.
Information | Parameters: texture - texture handle angle# - absolute angle of texture rotation Description: Rotates a texture. This will have an immediate effect on all instances of the texture being used. Rotating a texture is useful for performing swirling texture effects, such as for smoke etc.

Function ScaleAnimMesh( mesh:TMesh,sx#,sy#,sz# )
Description | Scales all vertices of mesh and every child mesh.

Function ScaleEntity( ent:TEntity,x:Float,y:Float,z:Float,glob:Int=False )
Description | Scales an entity so that it is of an absolute size.
Information | Parameters: entity - name of the entity to be scaled x_scale# - x size of entity y_scale# - y size of entity z_scale# - z size of entity global (optional) - Description: Scales an entity so that it is of an absolute size. 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. See also: ScaleMesh, FitMesh.

Function ScaleMesh( mesh:TMesh,sx:Float,sy:Float,sz:Float )
Description | Scales all vertices of a mesh by the specified scaling factors.
Information | Parameters: mesh - mesh handle x_scale# - x scale of mesh y_scale# - y scale of mesh z_scale# - z scale of mesh Description: Scales all vertices of a mesh by the specified scaling factors. See also: FitMesh, ScaleEntity.

Function ScaleSprite( sprite:TSprite,s_x:Float,s_y:Float )
Description | Scales a sprite.
Information | Parameters: sprite - sprite handle x_scale# - x scale of sprite y scale# - y scale of sprite Description: Scales a sprite. See also: LoadSprite, CreateSprite.

Function ScaleTexture( tex:TTexture,u_scale:Float,v_scale:Float )
Description | Scales a texture by an absolute amount.
Information | Parameters: texture - name of texture u_scale# - u scale v_scale# - v scale Description: Scales a texture by an absolute amount. This will have an immediate effect on all instances of the texture being used.

Function SetAnimKey( ent:TEntity,frame:Float,pos_key:Int=True,rot_key:Int=True,scale_key:Int=True )
Description | Sets an animation key for the specified entity at the specified frame.
Information | Parameters: entity - entity handle frame - frame of animation to be used as anim key pos_key (optional) - true to include entity position information when setting key. Defaults to true. rot_key (optional) - true to include entity rotation information when setting key. Defaults to true. scale_key (optional) - true to include entity scale information when setting key. Defaults to true. Description: Sets an animation key for the specified entity at the specified frame. The entity must have a valid animation sequence to work with. This is most useful when you've got a character, or a complete set of complicated moves to perform, and you want to perform them en-masse.

Function SetAnimTime( ent:TEntity,time:Float,seq:Int=0 )
Description | SetAnimTime allows you to manually animate entities.
Information | Parameters: entity - a valid entity handle. time# - a floating point time value. anim_seq - an optional animation sequence number. Description: SetAnimTime allows you to manually animate entities.

Function SetCubeFace( tex:TTexture,face:Int )
Description | Selects a cube face for direct rendering to a texture.
Information | Parameters: texture - texture face - face of cube to select. This should be one of the following values: 0: left (negative X) face 1: forward (positive Z) face - this is the default. 2: right (positive X) face 3: backward (negative Z) face 4: up (positive Y) face 5: down (negative Y) face Description: Selects a cube face for direct rendering to a texture. This command should only be used when you wish to draw directly to a cubemap texture in real-time. Otherwise, just loading a pre-rendered cubemap with a flag of 128 will suffice. To understand how this command works exactly it is important to recognise that Blitz treats cubemap textures slightly differently to how it treats other textures. Here's how it works... A cubemap texture in Blitz actually consists of six images, each of which must be square 'power' of two size - e.g. 32, 64, 128 etc. Each corresponds to a particular cube face. These images are stored internally by Blitz, and the texture handle that is returned by LoadTexture/CreateTexture when specifying the cubemap flag, only provides access to one of these six images at once (by default the first one, or '0' face). This is why, when loading a cubemap texture into Blitz using LoadTexture, all the six cubemap images must be laid out in a specific order (0-5, as described above), in a horizontal strip. Then Blitz takes this texture and internally converts it into six separate images. So seeing as the texture handle returned by CreateTexture / LoadTexture only provides access to one of these images at once (no. 1 by default), how do we get access to the other five images? This is where SetCubeFace comes in. It will tell Blitz that whenever you next draw to a cubemap texture, to draw to the particular image representing the face you have specified with the face parameter. Now you have the ability to draw to a cubemap in real-time. To give you some idea of how this works in code, here's a function that updates a cubemap in real-time. It works by rendering six different views and copying them to the cubemap texture buffer, using SetCubeFace to specify which particular cubemap image should be drawn to. ; Start of code Function UpdateCubeMap( tex,camera ) tex_sz=TextureWidth(tex) ; do left view SetCubeFace tex,0 RotateEntity camera,0,90,0 RenderWorld ; copy contents of backbuffer to cubemap CopyRect 0,0,tex_sz,tex_sz,0,0,BackBuffer(),TextureBuffer(tex) ; do forward view SetCubeFace tex,1 RotateEntity camera,0,0,0 RenderWorld CopyRect 0,0,tex_sz,tex_sz,0,0,BackBuffer(),TextureBuffer(tex) ; do right view SetCubeFace tex,2 RotateEntity camera,0,-90,0 RenderWorld CopyRect 0,0,tex_sz,tex_sz,0,0,BackBuffer(),TextureBuffer(tex) ; do backward view SetCubeFace tex,3 RotateEntity camera,0,180,0 RenderWorld CopyRect 0,0,tex_sz,tex_sz,0,0,BackBuffer(),TextureBuffer(tex) ; do up view SetCubeFace tex,4 RotateEntity camera,-90,0,0 RenderWorld CopyRect 0,0,tex_sz,tex_sz,0,0,BackBuffer(),TextureBuffer(tex) ; do down view SetCubeFace tex,5 RotateEntity camera,90,0,0 RenderWorld CopyRect 0,0,tex_sz,tex_sz,0,0,BackBuffer(),TextureBuffer(tex) EndFunction ; End of code All rendering to a texture buffer affects the currently selected face. Do not change the selected cube face while a buffer is locked. Finally, you may wish to combine the vram 256 flag with the cubic mapping flag when drawing to cubemap textures for faster access. See also: CreateTexture, LoadTexture, SetCubeMode.

Function SetCubeMode( tex:TTexture,Mode:Int )
Description | Set the rendering mode of a cubemap texture.
Information | Parameters: texture - a valid texture handle mode - the rendering mode of the cubemap texture: 1: Specular (default) 2: Diffuse 3: Refraction Description: Set the rendering mode of a cubemap texture. The available rendering modes are as follows: 1: Specular (default). Use this to give your cubemapped objects a shiny effect. 2: Diffuse. Use this to give your cubemapped objects a non-shiny, realistic lighting effect. 3: Refraction. Good for 'cloak'-style effects. See also: CreateTexture, LoadTexture, SetCubeFace.

Function SetFloat( material:TShader,name:String,v1:Float )
Description | Set a shader variable name of a uniform float type to a float value.

Function SetFloat2( material:TShader,name:String,v1:Float,v2:Float )
Description | Set a shader variable name of a uniform vec2 type to 2 float values.

Function SetFloat3( material:TShader,name:String,v1:Float,v2:Float,v3:Float )
Description | Set a shader variable name of a uniform vec3 type to 3 float values.

Function SetFloat4( material:TShader,name:String,v1:Float,v2:Float,v3:Float,v4:Float )
Description | Set a shader variable name of a uniform vec4 type to 4 float values.

Function SetInteger( material:TShader,name:String,v1:Int )
Description | Set a shader variable name of a uniform int type to an integer value.

Function SetInteger2( material:TShader,name:String,v1:Int,v2:Int )
Description | Set a shader variable name of a uniform ivec2 type to 2 integer values.

Function SetInteger3( material:TShader,name:String,v1:Int,v2:Int,v3:Int )
Description | Set a shader variable name of a uniform ivec3 type to 3 integer values.

Function SetInteger4( material:TShader,name:String,v1:Int,v2:Int,v3:Int,v4:Int )
Description | Set a shader variable name of a uniform ivec4 type to 4 integer values.

Function SetShadowColor( R:Int,G:Int,B:Int,A:Int )
Description | Set color R/G/B in range 0..255 and A in range 0..1.

Function SetString:String( obj:Object,strPtr:Byte Ptr,strValue:String )
Description | Sets a C string from a Blitz string.

Function ShadeEntity( ent:TEntity,material:TShader )
Description | Apply shader to an entity.

Function ShadeMesh( mesh:TMesh,material:TShader )
Description | Apply shader to a mesh.

Function ShaderFunction( material:TShader,EnableFunction(),DisableFunction() )
Description | undocumented.

Function ShaderMaterial( material:TShader,tex:TMaterial,name:String,index:Int=0 )
Description | Set a 3d texture for sampling.

Function ShaderTexture:TTexture( material:TShader,tex:TTexture,name:String,index:Int=0 )
Description | Load a texture for 2D texture sampling.

Function ShadeSurface( surf:TSurface,material:TShader )
Description | Apply shader to a surface.

Function ShowEntity( ent:TEntity )
Description | Shows an entity.
Information | Parameters: entity - entity handle Description: Shows an entity. Very much the opposite of HideEntity. Once an entity has been hidden using HideEntity, use show entity to make it visible and involved in collisions again. Note that 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 ShowEntity after using HideEntity. ShowEntity affects the specified entity only - child entities are not affected.

Function SkinMesh( mesh:TMesh,surf_no_get:Int,vid:Int,bone1:Int,weight1:Float=1.0,bone2:Int=0,weight2:Float=0,bone3:Int=0,weight3:Float=0,bone4:Int=0,weight4:Float=0 )
Description | Set animated surface for each of the bone no and weights arrays.
Information | bone no references the bones list in a mesh, weights is a normalizing value.

Function SpriteRenderMode( sprite:TSprite,Mode:Int )
Description | If mode is 1 rendering is normal, 2 is for batch sprites like particles.
Information | Batch particle render mode (3) is not working.

Function SpriteViewMode( sprite:TSprite,Mode:Int )
Description | Sets the view mode of a sprite.
Information | Parameters: sprite - sprite handle view_mode - view_mode of sprite 1: fixed (sprite always faces camera - default) 2: free (sprite is independent of camera) 3: upright1 (sprite always faces camera, but rolls with camera as well, unlike mode no.1) 4: upright2 (sprite always remains upright. Gives a 'billboard' effect. Good for trees, spectators etc.) Description: Sets the view mode of a sprite. The view mode determines how a sprite alters its orientation in respect to the camera. This allows the sprite to in some instances give the impression that it is more than two dimensional. In technical terms, the four sprite modes perform the following changes: 1: Sprite changes its pitch and yaw values to face camera, but doesn't roll. 2: Sprite does not change either its pitch, yaw or roll values. 3: Sprite changes its yaw and pitch to face camera, and changes its roll value to match cameras. 4: Sprite changes its yaw value to face camera, but not its pitch value, and changes its roll value to match cameras. Note that if you use sprite view mode 2, then because it is independent from the camera, you will only be able to see it from one side unless you use EntityFx flag 16 with it to disable backface culling. See also: CreateSprite, LoadSprite.

Function StencilAlpha( stencil:TStencil,a:Float )
Description | Set stencil alpha value.

Function StencilClsColor( stencil:TStencil,r:Float,g:Float,b:Float )
Description | Set stencil clear screen color in range 0..255.

Function StencilClsMode( stencil:TStencil,cls_color:Int,cls_zbuffer:Int )
Description | Set stencil clear screen modes.
Information | Cls_color is true to use the color buffer, cls_zbuffer is true to use the depth buffer.

Function StencilMesh( stencil:TStencil,mesh:TMesh,Mode:Int=1 )
Description | Set mesh to be used as stencil.
Information | Mode is stencil action for glStencilOp in range -2..2 where 1 is INCR (default), 2 is INCR for stencil shadow meshes and negative values are DECR.

Function StencilMode( stencil:TStencil,m:Int,o:Int=1 )
Description | Set stencil render modes.
Information | M is stencil action mode for glStencilOp in range -2..2 where 1 is INCR (default), 2 is INCR for stencil shadow meshes and negative values are DECR. O is comparison operator for glStencilFunc in range 0..3 which stands for one of NOTEQUAL, EQUAL, LEQUAL or GEQUAL.

Function StringPtr:String( inst:Byte Ptr )
Description | Returns string cast of byte pointer.

Function SurfsRendered:Int()
Description | Number of surfaces currently being rendered.

Function TerrainCountTriangles( terr:TTerrain )
Description | Returns terrain triangles count.

Function TerrainCountVertices( terr:TTerrain )
Description | Returns terrain vertices count.

Function TerrainDetail( terr:TTerrain,detail_level:Float )
Description | Set terrain level of detail, default is 100 and maximum is 2000.

Function TerrainHeight:Float( terr:TTerrain,x:Int,z:Int )
Description | Returns the height of the terrain at terrain grid coordinates x.
Information | Parameters: terrain - terrain handle grid_x - grid x coordinate of terrain grid_z - grid z coordinate of terrain Description: Returns the height of the terrain at terrain grid coordinates x,z. The value returned is in the range 0 to 1. See also: TerrainY.

Function TerrainScaleTexCoords( terr:TTerrain,u_scale:Float,v_scale:Float,coords_set:Int=0 )
Description | Set terrain texture coordinates scale, range is 1 to terrain size.

Function TerrainX:Float( terr:TTerrain,x:Float,y:Float,z:Float )
Description | Returns the interpolated x coordinate on a terrain.
Information | Parameters: terrain - terrain handle x# - world x coordinate y# - world y coordinate z# - world z coordinate Description: Returns the interpolated x coordinate on a terrain. See also: TerrainY, TerrainZ.

Function TerrainY:Float( terr:TTerrain,x:Float,y:Float,z:Float )
Description | Returns the interpolated y coordinate on a terrain.
Information | Parameters: terrain - terrain handle x# - world x coordinate y# - world y coordinate z# - world z coordinate Description: Returns the interpolated y coordinate on a terrain. Gets the ground's height, basically. See also: TerrainX, TerrainZ, TerrainHeight.

Function TerrainZ:Float( terr:TTerrain,x:Float,y:Float,z:Float )
Description | Returns the interpolated z coordinate on a terrain.
Information | Parameters: terrain - terrain handle x# - world x coordinate y# - world y coordinate z# - world z coordinate Description: Returns the interpolated z coordinate on a terrain. See also: TerrainX, TerrainY.

Function TexToBuffer( tex:TTexture,buffer:Byte Ptr,frame:Int=0 )
Description | Copy texture to a pixmap buffer, buffer must be a byte ptr.

Function TextureAnIsotropic( tex:TTexture,f:Float )
Description | Set texture anisotropic factor, usually from 2-16.

Function TextureBlend( tex:TTexture,blend:Int )
Description | Sets the blending mode for a texture.
Information | Parameters: Texture - Texture handle. Blend - Blend mode of texture. 0: Do not blend 1: No blend, or Alpha (alpha when texture loaded with alpha flag - not recommended for multitexturing - see below) 2: Multiply (default) 3: Add 4: Dot3 5: Multiply 2 Description: Sets the blending mode for a texture. The texture blend mode determines how the texture will blend with the texture or polygon which is 'below' it. Texture 0 will blend with the polygons of the entity it is applied to. Texture 1 will blend with texture 0. Texture 2 will blend with texture 1. And so on. Texture blending in Blitz effectively takes the highest order texture (the one with the highest index) and it blends with the texture below it, then that result to the texture directly below again, and so on until texture 0 which is blended with the polygons of the entity it is applied to and thus the world, depending on the EntityBlend of the object. Each of the blend modes are identical to their EntityBlend counterparts. In the case of multitexturing (more than one texture applied to an entity), it is not recommended you blend textures that have been loaded with the alpha flag, as this can cause unpredictable results on a variety of different graphics cards. Use EntityTexture to set the index number of a texture. See also: EntityBlend, EntityTexture.

Function TextureCoords( tex:TTexture,coords:Int )
Description | Sets the texture coordinate mode for a texture.
Information | Parameters: texture - name of texture coords - 0: UV coordinates are from first UV set in vertices (default) 1: UV coordinates are from second UV set in vertices Description: Sets the texture coordinate mode for a texture. This determines where the UV values used to look up a texture come from.

Function TextureFilter( match_text:String,flags:Int )
Description | Adds a texture filter.
Information | Parameters: match_text$ - text that, if found in texture filename, will activate certain filters flags - filter texture flags: 1: Color 2: Alpha 4: Masked 8: Mipmapped 16: Clamp U 32: Clamp V 64: Spherical reflection map 128: 256: Store texture in vram 512: Force the use of high color textures Description: Adds a texture filter. Any textures loaded that contain the text specified by match_text$ will have the provided flags added. This is mostly of use when loading a mesh. By default, the following texture filter is used: TextureFilter "",1+8 This means that all loaded textures will have color and be mipmapped by default.

Function TextureFlags( tex:TTexture,flags:Int )
Description | Set texture flags, see LoadTexture for values.

Function TextureGLTexEnvf( tex:TTexture,target:Int,pname:Int,param:Float )
Description | GL equivalent, param is a float, limited to 12 calls per texture, experimental.

Function TextureGLTexEnvi( tex:TTexture,target:Int,pname:Int,param:Int )
Description | GL equivalent, param is a const, limited to 12 calls per texture, experimental.

Function TextureHeight:Int( tex:TTexture )
Description | Returns the height of a texture.
Information | Parameters: texture - texture handle Description: Returns the height of a texture.

Function TextureMultitex( tex:TTexture,f:Float )
Description | Set texture multitex factor, used in interpolate and custom TexBlend options.

Function TextureName:String( tex:TTexture )
Description | Returns a texture's absolute filename.
Information | Parameters: texture - a valid texture handle Description: Returns a texture's absolute filename. To find out just the name of the texture, you will need to parse the string returned by TextureName. One such function to do this is: ; start of code Function StripPath$(file$) If Len(file$)>0 For i=Len(file$) To 1 Step -1 mi$=Mid$(file$,i,1) If mi$="\" Or mi$="/" Then Return name$ Else name$=mi$+name$ Next EndIf Return name$ End Function ; end of code See also: GetBrushTexture.

Function TextureWidth:Int( tex:TTexture )
Description | Returns the width of a texture.
Information | Parameters: texture - texture handle Description: Returns the width of a texture.

Function TFormedX:Float()
Description | Returns the X component of the last TFormPoint.
Information | Parameters: None. Description: Returns the X component of the last TFormPoint, TFormVector or TFormNormal operation. See those commands for examples.

Function TFormedY:Float()
Description | Returns the Y component of the last TFormPoint.
Information | Parameters: None. Description: Returns the Y component of the last TFormPoint, TFormVector or TFormNormal operation. See those commands for examples.

Function TFormedZ:Float()
Description | Returns the Z component of the last TFormPoint.
Information | Parameters: None. Description: Returns the Z component of the last TFormPoint, TFormVector or TFormNormal operation. See those commands for examples.

Function TFormNormal( x:Float,y:Float,z:Float,src_ent:TEntity,dest_ent:TEntity )
Description | Transforms between coordinate systems.
Information | Parameters: x#, y#, z# = components of a vector in 3d space source_entity = handle of source entity, or 0 for 3d world dest_entity = handle of destination entity, or 0 for 3d world Description: Transforms between coordinate systems. After using TFormNormal the new components can be read with TFormedX(), TFormedY() and TFormedZ(). This is exactly the same as TFormVector but with one added feature. After the transformation the new vector is 'normalized', meaning it is scaled to have length 1. For example, suppose the result of TFormVector is (1,2,2). This vector has length Sqr( 1*1 + 2*2 + 2*2 ) = Sqr( 9 ) = 3. This means TFormNormal would produce ( 1/3, 2/3, 2/3 ).

Function TFormPoint( x:Float,y:Float,z:Float,src_ent:TEntity,dest_ent:TEntity )
Description | Transforms between coordinate systems.
Information | Parameters: x#, y#, z# = coordinates of a point in 3d space source_entity = handle of source entity, or 0 for 3d world dest_entity = handle of destination entity, or 0 for 3d world Description: Transforms between coordinate systems. After using TFormPoint the new coordinates can be read with TFormedX(), TFormedY() and TFormedZ(). See 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 TFormVector( x:Float,y:Float,z:Float,src_ent:TEntity,dest_ent:TEntity )
Description | Transforms between coordinate systems.
Information | Parameters: x#, y#, z# = components of a vector in 3d space source_entity = handle of source entity, or 0 for 3d world dest_entity = handle of destination entity, or 0 for 3d world Description: Transforms between coordinate systems. After using TFormVector the new components can be read with TFormedX(), TFormedY() and TFormedZ(). See EntityX() for details about local coordinates. Similar to 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 PositionEntity and MoveEntity: PositionEntity entity, x,y,z ; put entity at point (x,y,z) MoveEntity entity, x,y,z ; add vector (x,y,z) to current position.

Function TranslateEntity( ent:TEntity,x:Float,y:Float,z:Float,glob:Int=False )
Description | Translates an entity relative to its current position and not its orientation.
Information | Parameters: entity - name of entity to be translated x# - x amount that entity will be translated by y# - y amount that entity will be translated by z# - z amount that entity will be translated by global (optional) - Description: Translates an entity relative to its current position and not its orientation. What this means is that an entity will move in a certain direction despite where it may be facing. Imagine that you have a game character that you want to make jump in the air at the same time as doing a triple somersault. Translating the character by a positive y amount will mean the character will always travel directly up in their air, regardless of where it may be facing due to the somersault action. See also: MoveEntity, PositionEntity, PositionMesh.

Function TriangleVertex:Int( surf:TSurface,tri_no:Int,corner:Int )
Description | Returns the vertex of a triangle corner.
Information | Parameters: surface - surface handle triangle_index - triangle index corner - corner of triangle. Should be 0, 1 or 2. Description: Returns the vertex of a triangle corner.

Function TrisRendered:Int()
Description | Number of triangles currently being rendered.

Function TurnEntity( ent:TEntity,x:Float,y:Float,z:Float,glob:Int=False )
Description | Turns an entity relative to its current orientation.
Information | Parameters: entity - name of entity to be rotated pitch# - angle in degrees that entity will be pitched yaw# - angle in degrees that entity will be yawed roll# - angle in degrees that entity will be rolled global (optional) - Description: Turns an entity relative to its current orientation. 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. See also: RotateEntity, RotateMesh.

Function UpdateNormals( mesh:TMesh )
Description | Recalculates all normals in a mesh.
Information | Parameters: mesh - mesh handle Description: Recalculates all normals in a mesh. This is necessary for correct lighting if you have not set surface normals using 'VertexNormals' commands.

Function UpdateTexCoords( surf:TSurface )
Description | Recalculates the surface's uvw coord set 1 based on vertices.

Function UpdateWorld( anim_speed:Float=1 )
Description | Animates all entities in the world.
Information | Parameters: anim_speed# (optional) - a master control for animation speed. Defaults to 1. Description: Animates all entities in the world, and performs collision checking. The optional anim_speed# parameter 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. For best results use this command once per main loop, just before calling RenderWorld.

Function UseAssimpStreamMeshes( flag:Int=True,meshflags:Int=-1 )
Description | Loader flags for Assimp meshes.
Information | Set flag to False to use Assimp direct loaders, default is True for Assimp streamed loaders. Set meshflags to -1 for smooth normals, -2 for flat shaded normals and -4 to load as single mesh.

Function UseCubemapFlip( flag:Int=False )
Description | Flip cubemap texture flag.
Information | Set flag to True to flip cubemap textures, default is False to not flip (invert).

Function UseEntity( material:TShader,name:String,ent:TEntity,mode:Int )
Description | undocumented.

Function UseFloat( material:TShader,name:String,v1:Float Var )
Description | Bind a float variable to a shader variable name of a uniform float type.

Function UseFloat2( material:TShader,name:String,v1:Float Var,v2:Float Var )
Description | Bind 2 float variables to a shader variable name of a uniform vec2 Type.

Function UseFloat3( material:TShader,name:String,v1:Float Var,v2:Float Var,v3:Float Var )
Description | Bind 3 float variables to a shader variable name of a uniform vec3 type.

Function UseFloat4( material:TShader,name:String,v1:Float Var,v2:Float Var,v3:Float Var,v4:Float Var )
Description | Bind 4 float variables to a shader variable name of a uniform vec4 type.

Function UseInteger( material:TShader,name:String,v1:Int Var )
Description | Bind an integer variable to a shader variable name of a uniform int type.

Function UseInteger2( material:TShader,name:String,v1:Int Var,v2:Int Var )
Description | Bind 2 integer variables to a shader variable name of a uniform ivec2 type.

Function UseInteger3( material:TShader,name:String,v1:Int Var,v2:Int Var,v3:Int Var )
Description | Bind 3 integer variables to a shader variable name of a uniform ivec3 type.

Function UseInteger4( material:TShader,name:String,v1:Int Var,v2:Int Var,v3:Int Var,v4:Int Var )
Description | Bind 4 integer variables to a shader variable name of a uniform ivec4 type.

Function UseLibraryMeshes( flag:Int=True )
Description | Loader flag for meshes.
Information | Set flag to False for Blitzmax streamed loaders, default is True for Openb3d library direct loaders.

Function UseLibraryTextures( flag:Int=True )
Description | Loader flag for textures.
Information | Set flag to False for Blitzmax streamed loaders, default is True for Openb3d library direct loaders.

Function UseMatrix( material:TShader,name:String,Mode:Int )
Description | Sends matrix data to a shader variable name of a uniform mat4 type.

Function UseMatrix3DS( xx#,xy#,xz#,yx#,yy#,yz#,zx#,zy#,zz# )
Description | Set 3DS model loader coordinates system (matrix), values should be 0,1,-1.

Function UseMatrixMD2( xx#,xy#,xz#,yx#,yy#,yz#,zx#,zy#,zz# )
Description | Set MD2 model loader coordinates system (matrix), values should be 0,1,-1.

Function UseMeshDebugLog( flag:Int=True )
Description | Debug all mesh loaders.
Information | Set flag to False to not debug Blitzmax mesh loaders, default is True to enable debug log.

Function UseMeshTextureFlags( texflags:Int=-1 )
Description | Set mesh texture flags.
Information | Override mesh texture flags manually, default is -1 (only for 3DS and OBJ).

Function UseMeshTransform( flag:Int=True )
Description | Transform mesh loaders.
Information | Set flag to False to not transform meshes, default is True to enable transforms (Blitzmax 3DS only).

Function UseStencil( stencil:TStencil )
Description | Stencil to use, set to Null to disable stencil.

Function UseSurface( material:TShader,name:String,surf:TSurface,vbo:Int )
Description | Sends surface data to a shader variable name.
Information | Vbo is in range 1..6 which selects what vertex buffer data to access, where 1 is vertex positions, 2/3 is tex coords 0/1, 4 is vertex normals, 5 is vertex color, 6 is triangles.

Function UseTextureFaces( lf0:Int=0,fr1:Int=0,rt2:Int=0,bk3:Int=0,dn4:Int=0,up5:Int=0 )
Description | Order for cubemap faces.
Information | Define the order to load cubemap faces, default is 0,1,2,3,4,5 (B3D layout).

Function UseTextureFrames( lf0:Int=0,fr1:Int=0,rt2:Int=0,bk3:Int=0,dn4:Int=0,up5:Int=0 )
Description | Order for anim texture frames.
Information | Define the order to load anim texture frames, default is 0,1,2,3,4,5.

Function VectorPitch:Float( vx:Float,vy:Float,vz:Float )
Description | Returns the pitch value of a vector.
Information | Parameters: x# - x vector length y# - y vector length z# - z vector length Description: Returns the pitch value of a vector. Using this command will return the same result as using EntityPitch to get the pitch value of an entity that is pointing in the vector's direction. See also: VectorYaw, EntityPitch.

Function VectorYaw:Float( vx:Float,vy:Float,vz:Float )
Description | Returns the yaw value of a vector.
Information | Parameters: x# - x vector length y# - y vector length z# - z vector length Description: Returns the yaw value of a vector. Using this command will return the same result as using EntityYaw to get the yaw value of an entity that is pointing in the vector's direction. See also: VectorPitch, EntityYaw.

Function VertexAlpha:Float( surf:TSurface,vid:Int )
Description | Returns the alpha component of a vertices color.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the alpha component of a vertices color, set using VertexColor See also: VertexRed, VertexGreen, VertexBlue, VertexColor.

Function VertexBlue:Float( surf:TSurface,vid:Int )
Description | Returns the blue component of a vertices color.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the blue component of a vertices color.

Function VertexColor( surf:TSurface,vid:Int,r:Float,g:Float,b:Float,a:Float=1 )
Description | Sets the color of an existing vertex.
Information | Parameters: surface - surface handle index - index of vertex red# - red value of vertex green# - green value of vertex blue# - blue value of vertex alpha# - optional alpha transparency of vertex (0.0 to 1.0 - default: 1.0) Description: Sets the color of an existing vertex. NB. If you want to set the alpha individually for vertices using the alpha# parameter then you need to use EntityFX 32 (to force alpha-blending) on the entity. See also: EntityFX.

Function VertexCoords( surf:TSurface,vid:Int,x:Float,y:Float,z:Float )
Description | Sets the geometric coordinates of an existing vertex.
Information | Parameters: surface - surface handle index - index of vertex x# - x position of vertex y# - y position of vertex z# - z position of vertex Description: Sets the geometric coordinates of an existing vertex. This is the command used to perform what is commonly referred to as 'dynamic mesh deformation'. It will reposition a vertex so that all the triangle edges connected to it, will move also. This will give the effect of parts of the mesh suddenly deforming.

Function VertexGreen:Float( surf:TSurface,vid:Int )
Description | Returns the green component of a vertices color.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the green component of a vertices color.

Function VertexNormal( surf:TSurface,vid:Int,nx:Float,ny:Float,nz:Float )
Description | Sets the normal of an existing vertex.
Information | Parameters: surface - surface handle index - index of vertex nx# - normal x of vertex ny# - normal y of vertex nz# - normal z of vertex Description: Sets the normal of an existing vertex.

Function VertexNX:Float( surf:TSurface,vid:Int )
Description | Returns the x component of a vertices normal.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the x component of a vertices normal.

Function VertexNY:Float( surf:TSurface,vid:Int )
Description | Returns the y component of a vertices normal.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the y component of a vertices normal.

Function VertexNZ:Float( surf:TSurface,vid:Int )
Description | Returns the z component of a vertices normal.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the z component of a vertices normal.

Function VertexRed:Float( surf:TSurface,vid:Int )
Description | Returns the red component of a vertices color.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the red component of a vertices color.

Function VertexTexCoords( surf:TSurface,vid:Int,u:Float,v:Float,w:Float=0,coord_set:Int=0 )
Description | Sets the texture coordinates of an existing vertex.
Information | Parameters: surface - surface handle index - index of vertex u# - u# coordinate of vertex v# - v# coordinate of vertex w# (optional) - w# coordinate of vertex coord_set (optional) - co_oord set. Should be set to 0 or 1. Description: Sets the texture coordinates of an existing vertex.

Function VertexU:Float( surf:TSurface,vid:Int,coord_set:Int=0 )
Description | Returns the texture u coordinate of a vertex.
Information | Parameters: surface - surface handle index - index of vertex coord_set (optional) - UV mapping coordinate set. Should be set to 0 or 1. Description: Returns the texture u coordinate of a vertex. See also: VertexV,

Function VertexV:Float( surf:TSurface,vid:Int,coord_set:Int=0 )
Description | Returns the texture v coordinate of a vertex.
Information | Parameters: surface - surface handle index - index of vertex coord_set (optional) - UV mapping coordinate set. Should be set to 0 or 1. Description: Returns the texture v coordinate of a vertex. See also: VertexU,

Function VertexW:Float( surf:TSurface,vid:Int,coord_set:Int=0 )
Description | Returns the texture w coordinate of a vertex.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the texture w coordinate of a vertex.

Function VertexX:Float( surf:TSurface,vid:Int )
Description | Returns the x coordinate of a vertex.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the x coordinate of a vertex.

Function VertexY:Float( surf:TSurface,vid:Int )
Description | Returns the y coordinate of a vertex.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the y coordinate of a vertex.

Function VertexZ:Float( surf:TSurface,vid:Int )
Description | Returns the z coordinate of a vertex.
Information | Parameters: surface - surface handle index - index of vertex Description: Returns the z coordinate of a vertex.

Function VertsRendered:Int()
Description | Number of vertices currently being rendered.

Function VoxelSpriteMaterial( voxelspr:TVoxelSprite,mat:TMaterial )
Description | Set material for voxel sprite.

Function Wireframe( enable:Int )
Description | Enables or disables wireframe rendering.
Information | Parameters: enable - True to enable wireframe rendering, False to disable. The default Wireframe mode is False. Description: Enables or disables wireframe rendering. This will show the outline of each polygon on the screen, with no shaded-in areas. Wireframe mode should only be used for debugging purposes, as driver support is patchy. For the same reason, no support is offered for the wireframe rendering of individual polygon entities.

## Types

Type TAction
Description | Action.

Type TAnimationKeys
Description | AnimationKeys data.

Type TBlitz2D
Description | Blitz2D.

Type TBlob Extends TEntity
Description | Blob entity.

Type TBone Extends TEntity
Description | Bone entity.

Type TBrush
Description | Brush.

Type TCamera Extends TEntity
Description | Camera entity.

Type TConstraint
Description | Constraint.

Type TEntity
Description | Entity.

Type TFluid Extends TMesh
Description | Fluid mesh entity.

Type TGeosphere Extends TTerrain
Description | Geosphere terrain entity.

Type TGlobal3D
Description | Global.
Information | Renamed to fix conflict with BRL.Reflection.

Type THardwareInfo ' by klepto2
Description | Hardware info.
Information | Contains Function GetInfo() And DisplayInfo(LogFile:Int=False).

Type TLight Extends TEntity
Description | Light entity.

Type TMaterial Extends TTexture
Description | Material texture.

Type TMatPtr
Description | MatPtr functions (Openb3d)

Methods Summary
Copy | Copy self, returns a new matrix.
FromQuaternion | Convert self to a rotation matrix from a quaternion.
FromToRotation | Transformation self to a rotation matrix from two given vectors.
GetInverse | Get inverse of the given TMatPtr and overwrite it, returns nothing.
GetInverse2 | Get inverse of the given TMatPtr and overwrite it, returns nothing (used in collision2.cpp)
GetMatrix | Overwrite self with the given TMatrix, returns nothing (like CopyMatrix)
GetMatrixScale | Get scale (magnitude) of self, returns a new vector.
GetPitch | Returns pitch of self.
GetRoll | Returns roll of self.
GetYaw | Returns yaw of self.
LoadIdentity | Set self as identity matrix.
Multiply | Multiply self by the given matrix.
Multiply2 | Multiply self by the given matrix (same as Multiply)
Overwrite | Overwrite self with the given TMatPtr.
Rotate | Rotate self by pitch, yaw, roll (Euler degrees)
RotatePitch | Rotate self about the x axis (Euler degrees)
RotateRoll | Rotate self about the z axis (Euler degrees)
RotateYaw | Rotate self about the y axis (Euler degrees)
Scale | Scale self (set the diagonal elements to x, y, z)
SetIdentity | Set matrix identity.
SetTranslate | Set translate vector for self.
ToQuat | Convert self to the given quaternion.
TransformVec | Transform the given vector by self.
Translate | Translate (move) self by the given vector.
Transpose | Transpose self.

Functions Summary
CopyMatrix | Copy the given TMatrix, returns a new Float Ptr matrix (like GetMatrix)
Create | Creates a new TMatPtr object, returns a Float Ptr matrix.
InterpolateMatrix | Interpolate two TMatPtrs by a relative value (used in AlignToVector)
Magnitude | Return magnitude (length) of the given vector, returns a float.
NewMatPtr | Returns a new TMatPtr object.
Quaternion_FromAngleAxis | Create a quaternion from an angle and an axis, sets the given quaternion.
Quaternion_MultiplyQuat | Multiply two quaternions, sets the given quaternion.

Method Copy:TMatPtr()
Description | Copy self, returns a new matrix.

Method FromQuaternion( x:Float,y:Float,z:Float,w:Float )
Description | Convert self to a rotation matrix from a quaternion.

Method FromToRotation( ix:Float,iy:Float,iz:Float,jx:Float,jy:Float,jz:Float )
Description | Transformation self to a rotation matrix from two given vectors.

Method GetInverse( mat:TMatPtr )
Description | Get inverse of the given TMatPtr and overwrite it, returns nothing.

Method GetInverse2( mat:TMatPtr )
Description | Get inverse of the given TMatPtr and overwrite it, returns nothing (used in collision2.cpp)

Method GetMatrix:TMatPtr( mat:TMatrix )
Description | Overwrite self with the given TMatrix, returns nothing (like CopyMatrix)

Method GetMatrixScale:TVecPtr()
Description | Get scale (magnitude) of self, returns a new vector.

Method GetPitch:Float()
Description | Returns pitch of self.

Method GetRoll:Float()
Description | Returns roll of self.

Method GetYaw:Float()
Description | Returns yaw of self.

Method LoadIdentity()
Description | Set self as identity matrix.

Method Multiply( mat:TMatPtr )
Description | Multiply self by the given matrix.

Method Multiply2( mat:TMatPtr )
Description | Multiply self by the given matrix (same as Multiply)

Method Overwrite( mat:TMatPtr )
Description | Overwrite self with the given TMatPtr.

Method Rotate( rx:Float,ry:Float,rz:Float )
Description | Rotate self by pitch, yaw, roll (Euler degrees)

Method RotatePitch( ang:Float )
Description | Rotate self about the x axis (Euler degrees)

Method RotateRoll( ang:Float )
Description | Rotate self about the z axis (Euler degrees)

Method RotateYaw( ang:Float )
Description | Rotate self about the y axis (Euler degrees)

Method Scale( x:Float,y:Float,z:Float )
Description | Scale self (set the diagonal elements to x, y, z)

Method SetIdentity( xx#,xy#,xz#,yx#,yy#,yz#,zx#,zy#,zz# )
Description | Set matrix identity.

Method SetTranslate( x:Float,y:Float,z:Float )
Description | Set translate vector for self.

Method ToQuat( qx:Float Var,qy:Float Var,qz:Float Var,qw:Float Var )
Description | Convert self to the given quaternion.

Method TransformVec( rx:Float Var,ry:Float Var,rz:Float Var,addTranslation:Int=0 )
Description | Transform the given vector by self.

Method Translate( x:Float,y:Float,z:Float )
Description | Translate (move) self by the given vector.

Method Transpose()
Description | Transpose self.

Function CopyMatrix:TMatPtr( mat:TMatrix )
Description | Copy the given TMatrix, returns a new Float Ptr matrix (like GetMatrix)

Function Create:TMatPtr()
Description | Creates a new TMatPtr object, returns a Float Ptr matrix.

Function InterpolateMatrix( m:TMatPtr,a:TMatPtr,alpha:Float )
Description | Interpolate two TMatPtrs by a relative value (used in AlignToVector)

Function Magnitude:Float( x:Float,y:Float,z:Float )
Description | Return magnitude (length) of the given vector, returns a float.

Function NewMatPtr:TMatPtr()
Description | Returns a new TMatPtr object.

Function Quaternion_FromAngleAxis( angle:Float,ax:Float,ay:Float,az:Float,rx:Float Var,ry:Float Var,rz:Float Var,rw:Float Var )
Description | Create a quaternion from an angle and an axis, sets the given quaternion.

Function Quaternion_MultiplyQuat( x1:Float,y1:Float,z1:Float,w1:Float,x2:Float,y2:Float,z2:Float,w2:Float,rx:Float Var,ry:Float Var,rz:Float Var,rw:Float Var )
Description | Multiply two quaternions, sets the given quaternion.

Type TMatrix
Description | Matrix functions (Minib3d)

Methods Summary
Copy | Copy self, returns a new matrix.
GetMatPtr | Overwrite self with the given TMatPtr, returns nothing (like CopyMatPtr)
Inverse | Get inverse of self, returns a new matrix.
LoadIdentity | Set self as identity matrix.
Multiply | Multiply self by the given matrix.
New | Returns a new TMatrix object.
Overwrite | Overwrite self with the given TMatrix.
Rotate | Rotate self by yaw, pitch and roll (Euler degrees)
RotatePitch | Rotate self about the x axis (Euler degrees)
RotateRoll | Rotate self about the z axis (Euler degrees)
RotateYaw | Rotate self about the y axis (Euler degrees)
Scale | Scale self (set the diagonal elements to x, y, z)
SetIdentity | Set matrix identity.
Translate | Translate (move) self.

Functions Summary
CopyMatPtr | Copy the given TMatPtr, returns a new Float matrix (like GetMatPtr)

Method Copy:TMatrix()
Description | Copy self, returns a new matrix.

Method GetMatPtr:TMatrix( mat:TMatPtr )
Description | Overwrite self with the given TMatPtr, returns nothing (like CopyMatPtr)

Method Inverse:TMatrix()
Description | Get inverse of self, returns a new matrix.

Method LoadIdentity()
Description | Set self as identity matrix.

Method Multiply( mat:TMatrix )
Description | Multiply self by the given matrix.

Method New()
Description | Returns a new TMatrix object.

Method Overwrite( mat:TMatrix )
Description | Overwrite self with the given TMatrix.

Method Rotate( rx#,ry#,rz# )
Description | Rotate self by yaw, pitch and roll (Euler degrees)

Method RotatePitch( ang# )
Description | Rotate self about the x axis (Euler degrees)

Method RotateRoll( ang# )
Description | Rotate self about the z axis (Euler degrees)

Method RotateYaw( ang# )
Description | Rotate self about the y axis (Euler degrees)

Method Scale( x#,y#,z# )
Description | Scale self (set the diagonal elements to x, y, z)

Method SetIdentity( xx#,xy#,xz#,yx#,yy#,yz#,zx#,zy#,zz# )
Description | Set matrix identity.

Method Translate( x#,y#,z# )
Description | Translate (move) self.

Function CopyMatPtr:TMatrix( mat:TMatPtr )
Description | Copy the given TMatPtr, returns a new Float matrix (like GetMatPtr)

Type TMesh Extends TEntity
Description | Mesh entity.

Type TMeshLoader
Description | Mesh loader.

Methods Summary
LoadAnimMesh | Call animated mesh loader implementation.
LoadMesh | Call mesh loader implementation.

Method LoadAnimMesh:TMesh(file:TStream, url:Object, parent:TEntity = Null, flags:Int = -1) Abstract
Description | Call animated mesh loader implementation.

Method LoadMesh:TMesh(file:TStream, url:Object, parent:TEntity = Null, flags:Int = -1) Abstract
Description | Call mesh loader implementation.

Type TOcTree Extends TTerrain
Description | Octree terrain entity.

Type TParticleBatch Extends TMesh
Description | Particle Batch mesh entity.

Type TParticleEmitter Extends TEntity
Description | Particle Emitter entity.

Type TPick
Description | Pick.

Type TPivot Extends TEntity
Description | Pivot entity.

Type TPostFX
Description | Post effects object.

Type TQuaternion
Description | Quaternion functions (Minib3d)

Methods Summary
GetQuatPtr | Overwrite self with the given TQuatPtr, returns nothing (like CopyQuatPtr)
New | Returns a new TQuaternion object.

Functions Summary
CopyQuatPtr | Copy the given TQuatPtr, returns a new Float quaternion (like GetQuatPtr)
Create | Create a new TQuaternion from four float values, returns a Float quaternion.
QuatToEuler | Convert a quaternion to the given pitch, yaw, roll (Euler degrees)
QuatToMat | Convert a quaternion to the given TMatrix.
Slerp | Slerp two quaternions to the given quaternion.

Method GetQuatPtr:TQuaternion( quat:TQuatPtr )
Description | Overwrite self with the given TQuatPtr, returns nothing (like CopyQuatPtr)

Method New()
Description | Returns a new TQuaternion object.

Function CopyQuatPtr:TQuaternion( quat:TQuatPtr )
Description | Copy the given TQuatPtr, returns a new Float quaternion (like GetQuatPtr)

Function Create:TQuaternion( w:Float=0,x:Float=0,y:Float=0,z:Float=0 )
Description | Create a new TQuaternion from four float values, returns a Float quaternion.

Function QuatToEuler( w#,x#,y#,z#,pitch# Var,yaw# Var,roll# Var )
Description | Convert a quaternion to the given pitch, yaw, roll (Euler degrees)

Function QuatToMat( w#,x#,y#,z#,mat:TMatrix Var )
Description | Convert a quaternion to the given TMatrix.

Function Slerp:Int( Ax#,Ay#,Az#,Aw#,Bx#,By#,Bz#,Bw#,Cx# Var,Cy# Var,Cz# Var,Cw# Var,t# )
Description | Slerp two quaternions to the given quaternion.

Type TQuatPtr
Description | QuatPtr functions (Openb3d)

Methods Summary
GetQuaternion | Overwrite self with the given TQuaternion, returns nothing (like CopyQuaternion)

Functions Summary
CopyQuaternion | Copy the given TQuaternion, returns a new Float Ptr quaternion (like GetQuaternion)
Create | Create a new TQuatPtr from four float values, returns a Float Ptr quaternion.
NewQuatPtr | Returns a new TQuatPtr object.
QuatToEuler | Convert a quaternion to the given pitch, yaw, roll (Euler degrees)
QuatToMat | Convert a quaternion to the given TMatPtr.
Slerp | Slerp two quaternions to the given quaternion.

Method GetQuaternion:TQuatPtr( quat:TQuaternion )
Description | Overwrite self with the given TQuaternion, returns nothing (like CopyQuaternion)

Function CopyQuaternion:TQuatPtr( quat:TQuaternion )
Description | Copy the given TQuaternion, returns a new Float Ptr quaternion (like GetQuaternion)

Function Create:TQuatPtr( w:Float=0,x:Float=0,y:Float=0,z:Float=0 )
Description | Create a new TQuatPtr from four float values, returns a Float Ptr quaternion.

Function NewQuatPtr:TQuatPtr()
Description | Returns a new TQuatPtr object.

Function QuatToEuler( w:Float,x:Float,y:Float,z:Float,pitch:Float Var,yaw:Float Var,roll:Float Var )
Description | Convert a quaternion to the given pitch, yaw, roll (Euler degrees)

Function QuatToMat( w:Float,x:Float,y:Float,z:Float,mat:TMatPtr )
Description | Convert a quaternion to the given TMatPtr.

Function Slerp:Int( Ax#,Ay#,Az#,Aw#,Bx#,By#,Bz#,Bw#,Cx:Float Var,Cy:Float Var,Cz:Float Var,Cw:Float Var,t# )
Description | Slerp two quaternions to the given quaternion.

Type TRigidBody
Description | Rigid Body.

Type TShader
Description | Shader.

Type TShaderObject
Description | Shader object.

Type TShadowObject
Description | Shadow object.

Type TSprite Extends TMesh
Description | Sprite mesh entity.

Type TStencil
Description | Stencil.

Type TSurface
Description | Surface.

Type TTerrain Extends TEntity
Description | Terrain entity.

Type TTexture
Description | Texture.

Type TUse
Description | Loader flags for meshes and textures.

Type TVecPtr
Description | TVecPtr functions (Openb3d)

Methods Summary
Add | Add self to the given TVecPtr, returns a new vector.
Clear | Clear (zero) vector values, returns nothing.
Copy | Copy self, returns a new vector.
Cross | Cross product of self with the given TVecPtr, returns a new vector.
Distance | Distance between self and the given TVecPtr, returns a float.
Divide | Divide self by a float, returns a new vector.
Divide2 | Divide self by the given TVecPtr, returns a new vector.
Dot | Dot product (or squared length) of self with the given TVecPtr, returns a float.
GetVector | Overwrite self with the given TVector, returns nothing (like CopyVector)
Length | Length (or magnitude) of self, returns a float.
Multiply | Multiply self by a float, returns a new vector.
Multiply2 | Multiply self by the given TVecPtr, returns a new vector.
Negate | Negate self, returns a new vector.
Normalize | Normalize self, returns nothing.
Normalized | Normalize self, returns a new vector.
Pitch | Pitch (or x angle) in degrees of self, returns a float.
Subtract | Subtract the given TVecPtr from self, returns a new vector.
Yaw | Yaw (or y angle) in degrees of self, returns a float.

Functions Summary
CopyVector | Copy the given TVector, returns a new Float Ptr vector (like GetVector)
Create | Create a new TVecPtr from three float values, returns a Float Ptr vector.
Magnitude | Magnitude (or length) of a vector from three float values, returns a float.
NewVecPtr | Returns a new TVecPtr object.

Method Add:TVecPtr( vec:TVecPtr )
Description | Add self to the given TVecPtr, returns a new vector.

Method Clear()
Description | Clear (zero) vector values, returns nothing.

Method Copy:TVecPtr()
Description | Copy self, returns a new vector.

Method Cross:TVecPtr( vec:TVecPtr )
Description | Cross product of self with the given TVecPtr, returns a new vector.

Method Distance:Float( vec:TVecPtr )
Description | Distance between self and the given TVecPtr, returns a float.

Method Divide:TVecPtr( scale:Float )
Description | Divide self by a float, returns a new vector.

Method Divide2:TVecPtr( vec:TVecPtr )
Description | Divide self by the given TVecPtr, returns a new vector.

Method Dot:Float( vec:TVecPtr )
Description | Dot product (or squared length) of self with the given TVecPtr, returns a float.

Method GetVector:TVecPtr( vec:TVector )
Description | Overwrite self with the given TVector, returns nothing (like CopyVector)

Method Length:Float()
Description | Length (or magnitude) of self, returns a float.

Method Multiply:TVecPtr( scale:Float )
Description | Multiply self by a float, returns a new vector.

Method Multiply2:TVecPtr( vec:TVecPtr )
Description | Multiply self by the given TVecPtr, returns a new vector.

Method Negate:TVecPtr()
Description | Negate self, returns a new vector.

Method Normalize()
Description | Normalize self, returns nothing.

Method Normalized:TVecPtr()
Description | Normalize self, returns a new vector.

Method Pitch:Float()
Description | Pitch (or x angle) in degrees of self, returns a float.

Method Subtract:TVecPtr( vec:TVecPtr )
Description | Subtract the given TVecPtr from self, returns a new vector.

Method Yaw:Float()
Description | Yaw (or y angle) in degrees of self, returns a float.

Function CopyVector:TVecPtr( vec:TVector )
Description | Copy the given TVector, returns a new Float Ptr vector (like GetVector)

Function Create:TVecPtr( x:Float=0,y:Float=0,z:Float=0 )
Description | Create a new TVecPtr from three float values, returns a Float Ptr vector.

Function Magnitude:Float( v0:Float,v1:Float,v2:Float )
Description | Magnitude (or length) of a vector from three float values, returns a float.

Function NewVecPtr:TVecPtr()
Description | Returns a new TVecPtr object.

Type TVector
Description | TVector functions (Minib3d)

Methods Summary
Add | Add self to the given TVector, returns a new vector.
Compare | Compare the given TVector with self, returns 1 or -1.
Copy | Copy self, returns a new vector.
Cross | Cross product of self with the given TVector, returns a new vector.
Distance | Distance between self and the given TVector, returns a float.
Divide | Divide self by a float, returns a new vector.
Divide2 | Divide self by the given TVecPtr, returns a new vector.
Dot | Dot product (or squared length) of self with the given TVector.
GetVecPtr | Overwrite self with the given TVecPtr, returns nothing (like CopyVecPtr)
Length | Length (or magnitude) of self, returns a float.
Multiply | Multiply self by a float, returns a new vector.
Multiply2 | Multiply self by the given TVecPtr, returns a new vector.
New | Returns a new TVector object.
Normalize | Normalize self, returns nothing.
SetLength | Set normalized length of self, returns a float.
SquaredLength | Squared length of self, returns a float.
Subtract | Subtract the given TVector from self, returns a new vector.

Functions Summary
CopyVecPtr | Copy the given TVecPtr, returns a new Float vector (like GetVecPtr)
Create | Create a new TVector from three float values, returns a Float vector.

Method Add:TVector( vec:TVector )
Description | Add self to the given TVector, returns a new vector.

Method Compare:Int( with:Object )
Description | Compare the given TVector with self, returns 1 or -1.

Method Copy:TVector()
Description | Copy self, returns a new vector.

Method Cross:TVector( vec:TVector )
Description | Cross product of self with the given TVector, returns a new vector.

Method Distance:Float( vec:TVector )
Description | Distance between self and the given TVector, returns a float.

Method Divide:TVector( val# )
Description | Divide self by a float, returns a new vector.

Method Divide2:TVector( vec:TVector )
Description | Divide self by the given TVecPtr, returns a new vector.

Method Dot:Float( vec:TVector )
Description | Dot product (or squared length) of self with the given TVector.

Method GetVecPtr:TVector( vec:TVecPtr )
Description | Overwrite self with the given TVecPtr, returns nothing (like CopyVecPtr)

Method Length#()
Description | Length (or magnitude) of self, returns a float.

Method Multiply:TVector( val# )
Description | Multiply self by a float, returns a new vector.

Method Multiply2:TVector( vec:TVector )
Description | Multiply self by the given TVecPtr, returns a new vector.

Method New()
Description | Returns a new TVector object.

Method Normalize()
Description | Normalize self, returns nothing.

Method SetLength#( val# )
Description | Set normalized length of self, returns a float.

Method SquaredLength#()
Description | Squared length of self, returns a float.

Method Subtract:TVector( vec:TVector )
Description | Subtract the given TVector from self, returns a new vector.

Function CopyVecPtr:TVector( vec:TVecPtr )
Description | Copy the given TVecPtr, returns a new Float vector (like GetVecPtr)

Function Create:TVector( x#,y#,z# )
Description | Create a new TVector from three float values, returns a Float vector.

Type TVoxelSprite Extends TMesh
Description | Voxelsprite mesh entity.

## Module Information

Version | 1.26
License | zlib
Copyright | Wrapper - 2014-2021 Mark Mcvittie, Bruce A Henderson
Copyright | Library - 2010-2021 Angelo Rosina