API Functions Squirrel
Abs Function
float Abs(float v)integer Abs(integer v)Return the absolute value of the function input. For vectors, the absolute value is applied to each component individually and the resulting vector is returned.
AddAssetsFolder Function
bool AddAssetsFolder(string path)Mount a local filesystem folder as an assets source.
See Resources & Assets.
AddAssetsPackage Function
bool AddAssetsPackage(string path)Mount an archive stored on the local filesystem as an assets source.
See Resources & Assets.
AlphaScale Function
Scale the alpha component of the input color.
ApplyBloom Function
integer ApplyBloom(integer view_id, IntRect rect, Texture input, FrameBufferHandle output, Bloom bloom, float threshold, float smoothness, float intensity)Process input texture and generate a bloom overlay on top of output, input and output must be of the same size.
Use CreateBloomFromFile/CreateBloomFromAssets to create a Bloom object and DestroyBloom to destroy its internal resources after usage.
ARGB32 Function
integer ARGB32(integer r, integer g, integer b)integer ARGB32(integer r, integer g, integer b, integer a)Create a 32 bit integer ARGB color.
ARGB32ToRGBA32 Function
integer ARGB32ToRGBA32(integer argb)Convert a 32 bit integer ARGB color to RGBA.
AudioInit Function
bool AudioInit()Initialize the audio system.
AudioShutdown Function
null AudioShutdown()Shutdown the audio system.
BaseToEuler Function
Compute the Euler angles triplet for the provided z direction. The up-vector y can be provided to improve coherency of the returned values over time.
BeginProfilerSection Function
integer BeginProfilerSection(string name)integer BeginProfilerSection(string name, string section_details)Begin a named profiler section. Call EndProfilerSection to end the section.
CaptureProfilerFrame Function
Capture the current profiler frame but do not end it. See EndProfilerFrame to capture and end the current profiler frame.
See PrintProfilerFrame to print a profiler frame to the console.
CaptureTexture Function
integer, integer CaptureTexture(integer view_id, PipelineResources resources, TextureRef tex, Texture read_back, Picture pic)Capture a texture content to a Picture. Return the frame counter at which the capture will be complete.
A Picture object can be accessed by the CPU.
This function is asynchronous and its result will not be available until the returned frame counter is equal or greater to the frame counter returned by Frame.
Cast_Pipeline_To_ForwardPipeline Function
Ceil Function
Returns a vector whose elements are equal to the nearest integer greater than or equal to the vector elements.
ChromaScale Function
Return a copy of the color with its saturation scaled as specified.
Clamp Function
float Clamp(float v, float min, float max)integer Clamp(integer v, integer min, integer max)Return a vector whose elements are equal to the vector elements clipped to the specified interval.
ClampLen Function
Returns a vector in the same direction as the specified vector, but with its length clipped by the specified interval.
ClassifyLine Function
Return true if the provided line intersect the bounding volume, false otherwise.
ClassifySegment Function
Return true if the provided segment intersect the bounding volume, false otherwise.
CleanPath Function
string CleanPath(string path)Cleanup a local filesystem path according to the host platform conventions.
- Remove redundant folder separators.
- Remove redundant
.and..folder entries. - Ensure forward slash (
/) folder separators on Unix and back slash (\) folder separators on Windows.
ClipSpaceToScreenSpace Function
Convert a 3d position in clip space (homogeneous space) to a 2d position on screen.
Close Function
bool Close(File file)Close a file handle.
Cm Function
float Cm(float cm)Convert a value in centimeters to the Harfang internal unit system.
ColorFromABGR32 Function
integer rgba32)Create a color from a 32 bit ABGR integer.
ColorFromRGBA32 Function
integer rgba32)Create a color from a 32 bit RGBA integer.
ColorFromVector3 Function
Create a color from a 3d vector, alpha defaults to 1.
ColorFromVector4 Function
Return a 4-dimensional vector as a color.
ColorI Function
Create a color from integer values in the [0;255] range.
ColorToABGR32 Function
integer ColorToABGR32(Color color)Return a 32 bit ABGR integer from a color.
ColorToGrayscale Function
float ColorToGrayscale(Color color)Return the grayscale representation of a color. A weighted average is used to account for human perception of colors.
ColorToRGBA32 Function
integer ColorToRGBA32(Color color)Return a 32 bit RGBA integer from a color.
Compute2DProjectionMatrix Function
Returns a projection matrix from a 2D space to the 3D world, as required by SetViewTransform for example.
ComputeAspectRatioX Function
Compute the aspect ratio factor for the provided viewport dimensions. Use this method to compute aspect ratio for landscape display.
See ComputeAspectRatioY.
ComputeAspectRatioY Function
Compute the aspect ratio factor for the provided viewport dimensions. Use this method to compute aspect ratio for portrait display.
See ComputeAspectRatioX.
ComputeMinMaxBoundingSphere Function
Compute the bounding sphere for the provided axis-aligned bounding box.
ComputeOrthographicProjectionMatrix Function
float znear, float zfar, float size, Vec2 aspect_ratio, Vec2 offset)Compute an orthographic projection matrix.
An orthographic projection has no perspective and all lines parrallel in 3d space will still appear parrallel on screen after projection using the returned matrix.
The size parameter controls the extends of the projected view. When projecting a 3d world this parameter is expressed in meters. Use the aspect_ratio parameter to prevent distortion from induced by non-square viewport.
See ComputeAspectRatioX or ComputeAspectRatioY to compute an aspect ratio factor in paysage or portrait mode.
ComputeOrthographicViewState Function
float size, float znear, float zfar, Vec2 aspect_ratio)Compute an orthographic view state.
The size parameter controls the extends of the projected view. When projecting a 3d world this parameter is expressed in meters. Use the aspect_ratio parameter to prevent distortion from induced by non-square viewport.
See ComputeOrthographicProjectionMatrix, ComputeAspectRatioX and ComputeAspectRatioY.
ComputePerspectiveProjectionMatrix Function
float znear, float zfar, float zoom_factor, Vec2 aspect_ratio)float znear, float zfar, float zoom_factor, Vec2 aspect_ratio, Vec2 offset)Compute a perspective projection matrix, , fov is the field of view angle, see Deg and Rad.
See ZoomFactorToFov, FovToZoomFactor, ComputeAspectRatioX and ComputeAspectRatioY.
ComputePerspectiveViewState Function
float fov, float znear, float zfar, Vec2 aspect_ratio)Compute a perspective view state.
See ComputePerspectiveProjectionMatrix, ZoomFactorToFov, FovToZoomFactor, ComputeAspectRatioX and ComputeAspectRatioY.
ComputeRenderState Function
bool write_z)bool write_z, bool write_r)bool write_z, bool write_r, bool write_g)bool write_z, bool write_r, bool write_g, bool write_b)bool write_z, bool write_r, bool write_g, bool write_b, bool write_a)bool write_z, bool write_r, bool write_g, bool write_b)bool write_z, bool write_r, bool write_g, bool write_b, bool write_a)Compute a render state to control subsequent render calls culling mode, blending mode, Z mask, etc... The same render state can be used by different render calls.
See DrawLines, DrawTriangles and DrawModel.
ComputeSAO Function
ComputeSortKey Function
integer ComputeSortKey(float view_depth)Compute a sorting key to control the rendering order of a display list, view_depth is expected in view space.
ComputeSortKeyFromWorld Function
Compute a sorting key to control the rendering order of a display list.
ComputeTextHeight Function
Compute the height of a text string.
ComputeTextRect Function
Compute the width and height of a text string.
ConfigureCrowdAgent Function
float radius, float height, float max_acceleration, float max_speed, float collision_query_range, float path_optimization_range, float separation_weight)Create a parameter structure for a crowd agent to be used with a Crowd object.
Contains Function
Return true if the provided position is inside the bounding volume, false otherwise.
CopyDir Function
bool CopyDir(string src, string dst)Copy a directory on the local filesystem, this function does not recurse through subdirectories.
See CopyDirRecursive.
CopyDirRecursive Function
bool CopyDirRecursive(string src, string dst)Copy a directory on the local filesystem, recurse through subdirectories.
CopyFile Function
bool CopyFile(string src, string dst)Copy a file on the local filesystem.
CosineInterpolate Function
float CosineInterpolate(float y0, float y1, float t)Compute the cosine interpolated value between y0 and y1 at t.
See LinearInterpolate, CubicInterpolate and HermiteInterpolate.
CreateBloomFromAssets Function
CreateBloomFromFile Function
CreateCamera Function
CreateCapsuleModel Function
float radius, float height, integer subdiv_x, integer subdiv_y)Create a capsule render model.
See CreateCubeModel, CreateConeModel, CreateCylinderModel, CreatePlaneModel, CreateSphereModel and DrawModel.
CreateConeModel Function
Create a cone render model.
See CreateCubeModel, CreateConeModel, CreateCylinderModel, CreatePlaneModel, CreateSphereModel and DrawModel.
CreateCubeModel Function
Create a cube render model.
See CreateCubeModel, CreateConeModel, CreateCylinderModel, CreatePlaneModel, CreateSphereModel and DrawModel.
CreateCylinderModel Function
Create a cylinder render model.
See CreateCubeModel, CreateConeModel, CreateCylinderModel, CreatePlaneModel, CreateSphereModel and DrawModel.
CreateForwardPipeline Function
integer shadow_map_resolution)Create a forward pipeline and its resources.
CreateForwardPipelineAAAFromAssets Function
string path, ForwardPipelineAAAConfig config, BackbufferRatio ssgi_ratio)string path, ForwardPipelineAAAConfig config, BackbufferRatio ssgi_ratio, BackbufferRatio ssr_ratio)CreateForwardPipelineAAAFromFile Function
string path, ForwardPipelineAAAConfig config, BackbufferRatio ssgi_ratio)string path, ForwardPipelineAAAConfig config, BackbufferRatio ssgi_ratio, BackbufferRatio ssr_ratio)CreateFrameBuffer Function
integer aa, string name)integer width, integer height, TextureFormat color_format, TextureFormat depth_format, integer aa, string name)Create a framebuffer and its texture attachments.
See DestroyFrameBuffer.
CreateInstanceFromAssets Function
bool CreateInstanceFromAssets(Scene scene, Mat4 mtx, string name, PipelineResources resources, PipelineInfo pipeline)bool CreateInstanceFromAssets(Scene scene, Mat4 mtx, string name, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)Helper function to create a Node with a Transform and an Instance component.
The instance component will be setup and its resources loaded from the assets system.
See Resources & Assets.
CreateInstanceFromFile Function
bool CreateInstanceFromFile(Scene scene, Mat4 mtx, string name, PipelineResources resources, PipelineInfo pipeline)bool CreateInstanceFromFile(Scene scene, Mat4 mtx, string name, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)Helper function to create a Node with a Transform and an Instance component.
The instance component will be setup and its resources loaded from the local filesystem.
See Resources & Assets.
CreateLinearLight Function
float priority, LightShadowType shadow_type)float priority, LightShadowType shadow_type, float shadow_bias, Vec4 pssm_split)float diffuse_intensity, Color specular)float diffuse_intensity, Color specular, float specular_intensity)float diffuse_intensity, Color specular, float specular_intensity, float priority)float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type)CreateMaterial Function
string value_name_0, Vec4 value_0, string value_name_1, Vec4 value_1)Helper function to create a material.
See SetMaterialProgram, SetMaterialValue and SetMaterialTexture.
CreateMissingMaterialProgramValuesFromAssets Function
This function scans the material program uniforms and creates a corresponding entry in the material if missing.
Resources are loaded from the asset system if a default uniform value requires it.
See Resources & Assets.
CreateMissingMaterialProgramValuesFromFile Function
This function scans the material program uniforms and creates a corresponding entry in the material if missing.
Resources are loaded from the local filesystem if a default uniform value requires it.
CreateObject Function
CreateOrthographicCamera Function
CreatePhysicCube Function
CreatePhysicSphere Function
float radius, Mat4 mtx, ModelRef model_ref, MaterialList materials)float radius, Mat4 mtx, ModelRef model_ref, MaterialList materials, float mass)CreatePlaneModel Function
float width, float length, integer subdiv_x, integer subdiv_z)Create a plane render model.
CreatePointLight Function
float radius, Color diffuse, Color specular, float priority)float radius, Color diffuse, Color specular, float priority, LightShadowType shadow_type)float radius, Color diffuse, Color specular, float priority, LightShadowType shadow_type, float shadow_bias)float radius, Color diffuse, float diffuse_intensity, Color specular)float radius, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity)float radius, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority)float radius, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type)CreateSAOFromAssets Function
CreateSAOFromFile Function
CreateSceneRootNode Function
CreateScript Function
CreateSphereModel Function
Create a sphere render model.
See CreateCubeModel, CreateConeModel, CreateCylinderModel, CreatePlaneModel, CreateSphereModel and DrawModel.
CreateSpotLight Function
float radius, float inner_angle, float outer_angle, Color diffuse)float radius, float inner_angle, float outer_angle, Color diffuse, Color specular)float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority)float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority, LightShadowType shadow_type)float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority, LightShadowType shadow_type, float shadow_bias)float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority, LightShadowType shadow_type, float shadow_bias, float shadow_near)float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority, LightShadowType shadow_type, float shadow_bias, float shadow_near, float shadow_far)float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity)float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular)float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity)float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority)float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type)float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type, float shadow_bias)float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type, float shadow_bias, float shadow_near)CreateTexture Function
integer width, integer height, string name, TextureFlags flags, TextureFormat format)Create an empty texture.
CreateTextureFromPicture Function
string name, TextureFlags flags, TextureFormat format)Create a texture from a picture.
See Picture, CreateTexture and UpdateTextureFromPicture.
Crop Function
Crop a rectangle. Remove the specified amount of units on each side of the rectangle.
See Grow.
Cross Function
Return the cross product of two vectors.
CrossProductMat3 Function
Creates a matrix M so that Mv = p⨯v.
Simply put, multiplying this matrix to any vector v is equivalent to compute the cross product between p and v.
CubicInterpolate Function
float CubicInterpolate(float y0, float y1, float y2, float y3, float t)Perform a cubic interpolation across four values with t in the [0;1] range between y1 and y2.
See LinearInterpolate, CosineInterpolate and HermiteInterpolate.
CutFileExtension Function
string CutFileExtension(string path)Return a file path with its extension stripped.
See CutFilePath and CutFileName.
CutFileName Function
string CutFileName(string path)Return the name part of a file path. All folder navigation and extension are stripped.
See CutFileExtension and CutFilePath.
CutFilePath Function
string CutFilePath(string path)Return the folder navigation part of a file path. The file name and its extension are stripped.
See CutFileExtension and CutFileName.
Debug Function
null Debug(string msg)null Debug(string msg, string details)DebugSceneExplorer Function
Decompose Function
Decompose a transformation matrix into its translation, scaling and rotation components.
Deg Function
float Deg(float degrees)Convert an angle in degrees to the engine unit system.
Deg3 Function
Convert a triplet of angles in degrees to the engine unit system.
DegreeToRadian Function
float DegreeToRadian(float degrees)Convert an angle in degrees to radians.
DestroyBloom Function
null DestroyBloom(Bloom bloom)Destroy a bloom post process object and all associated resources.
DestroyForwardPipeline Function
null DestroyForwardPipeline(ForwardPipeline pipeline)Destroy a forward pipeline object.
DestroyForwardPipelineAAA Function
null DestroyForwardPipelineAAA(ForwardPipelineAAA pipeline)DestroyFrameBuffer Function
null DestroyFrameBuffer(FrameBuffer frameBuffer)Destroy a frame buffer and its resources.
DestroyProgram Function
null DestroyProgram(ProgramHandle h)Destroy a shader program.
DestroySAO Function
null DestroySAO(SAO sao)Destroy an ambient occlusion post process object and its resources.
DestroyTexture Function
null DestroyTexture(Texture tex)Destroy a texture object.
DestroyWindow Function
bool DestroyWindow(Window window)Destroy a window object.
Det Function
float Det(Mat3 m)Return the determinant of a matrix.
DisableCursor Function
null DisableCursor()Dist Function
Return the Euclidean distance between two vectors.
Dist2 Function
Return the squared Euclidean distance between two vectors.
DistanceToPlane Function
Return the signed distance from point p to a plane.
- Distance is positive if p is in front of the plane, meaning that the plane normal is pointing towards p.
- Distance is negative if p is behind the plane, meaning that the plane normal is pointing away from p.
- Distance is 0.0 if p is lying on the plane.
Dot Function
Return the dot product of two vectors.
DrawLines Function
null DrawLines(integer view_id, Vertices vtx, ProgramHandle prg, RenderState render_state, integer depth)null DrawLines(integer view_id, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures)null DrawLines(integer view_id, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState render_state)null DrawLines(integer view_id, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState render_state, integer depth)null DrawLines(integer view_id, UInt16List idx, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures)null DrawLines(integer view_id, UInt16List idx, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState render_state)null DrawLines(integer view_id, UInt16List idx, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState render_state, integer depth)Draw a list of lines to the specified view.
Use UniformSetValueList and UniformSetTextureList to pass uniform values to the shader program.
DrawModel Function
null DrawModel(integer view_id, Model mdl, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, Mat4 matrix)null DrawModel(integer view_id, Model mdl, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, Mat4 matrix, RenderState render_state)null DrawModel(integer view_id, Model mdl, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, Mat4 matrix, RenderState render_state, integer depth)null DrawModel(integer view_id, Model mdl, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, Mat4List matrices)null DrawModel(integer view_id, Model mdl, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, Mat4List matrices, RenderState render_state)null DrawModel(integer view_id, Model mdl, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, Mat4List matrices, RenderState render_state, integer depth)Draw a model to the specified view.
Use UniformSetValueList and UniformSetTextureList to pass uniform values to the shader program.
DrawSprites Function
null DrawSprites(integer view_id, Mat3 inv_view_R, VertexLayout vtx_layout, Vec3List pos, Vec2 size, ProgramHandle prg)null DrawSprites(integer view_id, Mat3 inv_view_R, VertexLayout vtx_layout, Vec3List pos, Vec2 size, ProgramHandle prg, RenderState state)null DrawSprites(integer view_id, Mat3 inv_view_R, VertexLayout vtx_layout, Vec3List pos, Vec2 size, ProgramHandle prg, RenderState state, integer depth)null DrawSprites(integer view_id, Mat3 inv_view_R, VertexLayout vtx_layout, Vec3List pos, Vec2 size, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures)null DrawSprites(integer view_id, Mat3 inv_view_R, VertexLayout vtx_layout, Vec3List pos, Vec2 size, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState state)null DrawSprites(integer view_id, Mat3 inv_view_R, VertexLayout vtx_layout, Vec3List pos, Vec2 size, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState state, integer depth)Draw a list of sprites to the specified view.
Use UniformSetValueList and UniformSetTextureList to pass uniform values to the shader program.
Note: This function prepares the sprite on the CPU before submitting them all to the GPU as a single draw call.
DrawText Function
null DrawText(integer view_id, Font font, string text, ProgramHandle prg, string page_uniform, integer page_stage, Mat4 mtx)null DrawText(integer view_id, Font font, string text, ProgramHandle prg, string page_uniform, integer page_stage, Mat4 mtx, Vec3 pos)null DrawText(integer view_id, Font font, string text, ProgramHandle prg, string page_uniform, integer page_stage, Mat4 mtx, Vec3 pos, DrawTextHAlign halign, DrawTextVAlign valign)null DrawText(integer view_id, Font font, string text, ProgramHandle prg, string page_uniform, integer page_stage, Mat4 mtx, Vec3 pos, DrawTextHAlign halign, DrawTextVAlign valign, UniformSetValueList values, UniformSetTextureList textures)null DrawText(integer view_id, Font font, string text, ProgramHandle prg, string page_uniform, integer page_stage, Mat4 mtx, Vec3 pos, DrawTextHAlign halign, DrawTextVAlign valign, UniformSetValueList values, UniformSetTextureList textures, RenderState state)null DrawText(integer view_id, Font font, string text, ProgramHandle prg, string page_uniform, integer page_stage, Mat4 mtx, Vec3 pos, DrawTextHAlign halign, DrawTextVAlign valign, UniformSetValueList values, UniformSetTextureList textures, RenderState state, integer depth)Write text to the specified view using the provided shader program and uniform values.
DrawTriangles Function
null DrawTriangles(integer view_id, Vertices vtx, ProgramHandle prg, RenderState state, integer depth)null DrawTriangles(integer view_id, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures)null DrawTriangles(integer view_id, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState state)null DrawTriangles(integer view_id, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState state, integer depth)null DrawTriangles(integer view_id, UInt16List idx, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures)null DrawTriangles(integer view_id, UInt16List idx, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState state)null DrawTriangles(integer view_id, UInt16List idx, Vertices vtx, ProgramHandle prg, UniformSetValueList values, UniformSetTextureList textures, RenderState state, integer depth)Draw a list of triangles to the specified view.
Use UniformSetValueList and UniformSetTextureList to pass uniform values to the shader program.
DuplicateNodeAndChildrenFromAssets Function
Duplicate a node and its child hierarchy. Resources will be loaded from the assets system.
See Resources & Assets.
DuplicateNodeAndChildrenFromFile Function
Duplicate a node and its child hierarchy. Resources will be loaded from the local filesystem.
See Resources & Assets.
DuplicateNodeFromAssets Function
Duplicate a node. Resources will be loaded from the assets system.
See Resources & Assets.
DuplicateNodeFromFile Function
Duplicate a node. Resources will be loaded from the local filesystem.
See Resources & Assets.
DuplicateNodesAndChildrenFromAssets Function
Duplicate each node and children hierarchy of a list. Resources will be loaded from the assets system.
See Resources & Assets.
DuplicateNodesAndChildrenFromFile Function
Duplicate each node and children hierarchy of a list. Resources will be loaded from the local filesystem.
See Resources & Assets.
DuplicateNodesFromAssets Function
Duplicate each node of a list. Resources will be loaded from the assets system.
DuplicateNodesFromFile Function
Duplicate each node of a list. Resources will be loaded from the local filesystem.
See Resources & Assets.
EndProfilerFrame Function
End a profiler frame and return it.
See PrintProfilerFrame to print a profiler frame to the console.
EndProfilerSection Function
null EndProfilerSection(integer section_idx)End a named profiler section. Call BeginProfilerSection to begin a new section.
Error Function
null Error(string msg)null Error(string msg, string details)Exists Function
bool Exists(string path)Return true if a file exists on the local filesystem, false otherwise.
ExtractZoomFactorFromProjectionMatrix Function
Extract zoom factor from a projection matrix.
See ZoomFactorToFov.
ExtractZRangeFromOrthographicProjectionMatrix Function
ExtractZRangeFromPerspectiveProjectionMatrix Function
ExtractZRangeFromProjectionMatrix Function
Extract z near and z far clipping range from a projection matrix.
FaceForward Function
Return the provided vector facing toward the provided direction. If the angle between v and d is less than 90° then v is returned unchanged, v will be returned reversed otherwise.
FactorizePath Function
string FactorizePath(string path)Return the input path with all redundant navigation entries stripped (folder separator, .. and . entries).
FileToString Function
string FileToString(string path)Return the content of a local filesystem as a string.
FitsInside Function
Return wether a fits in b.
Floor Function
Returns a vector whose elements are equal to the nearest integer less than or equal to the vector elements.
FovToZoomFactor Function
float FovToZoomFactor(float fov)Convert from a fov value in radian to a zoom factor value in meters.
FpsController Function
null FpsController(bool key_up, bool key_down, bool key_left, bool key_right, bool btn, float dx, float dy, Vec3 pos, Vec3 rot, float speed, integer dt_t)Implement a first-person-shooter like controller.
The input position and rotation parameters are returned modified according to the state of the control keys.
This function is usually used by passing the current camera position and rotation then updating the camera transformation with the returned values.
Frame Function
integer Frame()Advance the rendering backend to the next frame, execute all queued rendering commands. This function returns the backend current frame.
The frame counter is used by asynchronous functions such as CaptureTexture. You must wait for the frame counter to reach or exceed the value returned by an asynchronous function before accessing its result.
FRand Function
float FRand()float FRand(float range)Return a random floating point value in the provided range, default range is [0;1].
See Rand to generate a random integer value.
FromHLS Function
Convert input hue/luminance/saturation color to RGBA, alpha channel is left unmodified.
FRRand Function
float FRRand()float FRRand(float range_start)float FRRand(float range_start, float range_end)Return a random floating point value in the provided range, default range is [-1;1].
GaussianBlurIsoSurface Function
Apply a Gaussian blur to an iso-surface.
GetArea Function
float GetArea(MinMax minmax)Return the area of the volume.
GetCenter Function
Return the center position of the volume.
GetClock Function
integer GetClock()Return the current clock since the last call to TickClock or ResetClock.
See time_to_sec_f to convert the returned time to second.
GetClockDt Function
integer GetClockDt()Return the elapsed time recorded during the last call to TickClock.
GetColorTexture Function
Retrieves color texture attachment.
GetColumn Function
Returns the nth column.
GetCurrentWorkingDirectory Function
string GetCurrentWorkingDirectory()Return the system current working directory.
GetDepthTexture Function
Retrieves depth texture attachment.
GetFileExtension Function
string GetFileExtension(string path)Return the extension part of a file path.
GetFileName Function
string GetFileName(string path)Return the name part of a file path (including its extension).
GetFilePath Function
string GetFilePath(string path)Return the path part of a file path (excluding file name and extension).
GetForwardPipelineInfo Function
Return the pipeline info object for the forward pipeline.
GetGamepadNames Function
Return a list of names for all supported gamepad devices on the system.
See ReadGamepad.
GetHandJointAngularVelocity Function
GetHandJointLinearVelocity Function
GetHandJointPose Function
GetHandJointRadius Function
GetHeight Function
float GetHeight(Rect rect)integer GetHeight(IntRect rect)Return the height of a rectangle.
GetJoystickDeviceNames Function
GetJoystickNames Function
GetJsonBool Function
Return the value of a boolean JSON key.
GetJsonFloat Function
Return the value of a float JSON key.
GetJsonInt Function
Return the value of an integer JSON key.
GetJsonString Function
Return the value of a string JSON key.
GetKeyboardNames Function
Return a list of names for all supported keyboard devices on the system.
See ReadKeyboard.
GetKeyName Function
string GetKeyName(Key key)Return the name for a keyboard key.
GetMaterialAlphaCut Function
bool GetMaterialAlphaCut(Material mat)GetMaterialAmbientUsesUV1 Function
bool GetMaterialAmbientUsesUV1(Material mat)GetMaterialBlendMode Function
Return a material blending mode.
GetMaterialDepthTest Function
Return a material depth test function.
GetMaterialDiffuseUsesUV1 Function
bool GetMaterialDiffuseUsesUV1(Material mat)GetMaterialFaceCulling Function
Return a material culling mode.
GetMaterialNormalMapInWorldSpace Function
bool GetMaterialNormalMapInWorldSpace(Material mat)GetMaterialSkinning Function
bool GetMaterialSkinning(Material mat)GetMaterialSpecularUsesUV1 Function
bool GetMaterialSpecularUsesUV1(Material mat)GetMaterialTexture Function
Return the texture reference assigned to a material named uniform.
GetMaterialTextures Function
Return the list of names of a material texture uniforms.
GetMaterialValues Function
Return the list of names of a material value uniforms.
GetMaterialWriteRGBA Function
Return the material color mask.
GetMaterialWriteZ Function
bool GetMaterialWriteZ(Material mat)Return the material depth write mask.
GetMonitorModes Function
Return the list of supported monitor modes.
GetMonitorName Function
string GetMonitorName(Monitor monitor)Return the monitor name.
GetMonitorRect Function
Returns a rectangle going from the position, in screen coordinates, of the upper-left corner of the specified monitor to the position of the lower-right corner.
GetMonitors Function
Return a list of monitors connected to the system.
GetMonitorSizeMM Function
Returns the size, in millimetres, of the display area of the specified monitor.
GetMouseNames Function
Return a list of names for all supported mouse devices on the system.
See ReadKeyboard.
GetNodePairContacts Function
GetNodesInContact Function
GetR Function
See GetRotation.
GetRMatrix Function
See GetRotationMatrix.
GetRotation Function
Return the rotation component of a transformation matrix as a Euler triplet.
GetRotationMatrix Function
Return the rotation component of a transformation matrix as a Mat3 rotation matrix.
GetRow Function
Returns the nth row of a matrix.
GetS Function
See GetScale.
GetScale Function
Return the scale component of a matrix a scale vector.
GetSceneForwardPipelineFog Function
GetSceneForwardPipelineLights Function
Filter through the scene lights and return a list of pipeline lights to be used by the scene forward pipeline.
GetSceneForwardPipelinePassViewId Function
integer GetSceneForwardPipelinePassViewId(SceneForwardPipelinePassViewId views, SceneForwardPipelinePass pass)Return the view id for a scene forward pipeline pass id.
GetScenePhysicsBackendName Function
string GetScenePhysicsBackendName()GetSize Function
integer GetSize(File file)Return the size in bytes of a local file.
GetSourceDuration Function
integer GetSourceDuration(SourceRef source)Return the duration of an audio source.
GetSourceState Function
Return the state of an audio source.
GetSourceTimecode Function
integer GetSourceTimecode(SourceRef source)Return the current timecode of a playing audio source.
GetT Function
See GetTranslation.
GetTextures Function
Returns color and depth texture attachments.
GetTranslation Function
Return the translation part of a tranformation matrix as a translation vector.
GetUserFolder Function
string GetUserFolder()Return the system user folder for the current user.
GetVRControllerNames Function
Return a list of names for all supported VR controller devices on the system.
See ReadVRController.
GetVRGenericTrackerNames Function
Return a list of names for all supported VR tracker devices on the system.
GetWidth Function
float GetWidth(Rect rect)integer GetWidth(IntRect rect)Return the width of a rectangle.
GetWindowClientSize Function
Return a window client rectangle. The client area of a window does not include its decorations.
GetWindowContentScale Function
GetWindowHandle Function
Return the system native window handle.
GetWindowInFocus Function
Return the system window with input focus.
GetWindowPos Function
Return a window position on screen.
GetWindowTitle Function
Return a window title.
GetX Function
float GetX(Rect rect)integer GetX(IntRect rect)Return the scaled X axis of a transformation matrix.
GetY Function
float GetY(Rect rect)integer GetY(IntRect rect)Return the scaled Y axis of a transformation matrix.
GetZ Function
Return the scaled Z axis of a transformation matrix.
Grow Function
Grow a rectangle by the specified amount of units.
See Crop.
HasFileExtension Function
bool HasFileExtension(string path)Test the extension of a file path.
HermiteInterpolate Function
float HermiteInterpolate(float y0, float y1, float y2, float y3, float t, float tension, float bias)Perform a Hermite interpolation across four values with t in the [0;1] range between y1 and y2. The tension and bias parameters can be used to control the shape of underlying interpolation curve.
See LinearInterpolate, CosineInterpolate and CubicInterpolate.
HideCursor Function
null HideCursor()Hide the system mouse cursor.
See ShowCursor.
ImGuiAlignTextToFramePadding Function
null ImGuiAlignTextToFramePadding()Vertically align upcoming text baseline to FramePadding y coordinate so that it will align properly to regularly framed items.
ImGuiBegin Function
bool ImGuiBegin(string name)Start a new window.
ImGuiBeginChild Function
bool ImGuiBeginChild(string id)Begin a scrolling region.
ImGuiBeginCombo Function
bool ImGuiBeginCombo(string label, string preview_value)Begin a ImGui Combo Box.
ImGuiBeginFrame Function
null ImGuiBeginFrame(integer width, integer height, integer dt_clock, MouseState mouse, KeyboardState keyboard)null ImGuiBeginFrame(DearImguiContext ctx, integer width, integer height, integer dt_clock, MouseState mouse, KeyboardState keyboard)Begin an ImGui frame. This function must be called once per frame before any other ImGui call.
When using multiple contexts, it must be called for each context you intend to use during the current frame.
See ImGuiEndFrame.
ImGuiBeginGroup Function
null ImGuiBeginGroup()Lock horizontal starting position. Once closing a group it is seen as a single item (so you can use ImGuiIsItemHovered on a group, ImGuiSameLine between groups, etc...).
ImGuiBeginPopup Function
bool ImGuiBeginPopup(string id)Return true if popup is opened and starts outputting to it.
Note: Only call ImGuiEndPopup if this returns true.
ImGuiBeginPopupContextItem Function
bool ImGuiBeginPopupContextItem(string id)bool ImGuiBeginPopupContextItem(string id, integer mouse_button)ImGui helper to open and begin popup when clicked on last item.
ImGuiBeginPopupContextVoid Function
bool ImGuiBeginPopupContextVoid()bool ImGuiBeginPopupContextVoid(string id)bool ImGuiBeginPopupContextVoid(string id, integer mouse_button)ImGui helper to open and begin popup when clicked in void (where there are no ImGui windows)
ImGuiBeginPopupContextWindow Function
bool ImGuiBeginPopupContextWindow()bool ImGuiBeginPopupContextWindow(string id)ImGui helper to open and begin popup when clicked on current window.
ImGuiBeginPopupModal Function
bool ImGuiBeginPopupModal(string name)bool ImGuiBeginPopupModal(string name, bool open)Begin an ImGui modal dialog.
ImGuiBeginTooltip Function
null ImGuiBeginTooltip()Used to create full-featured tooltip windows that aren't just text.
ImGuiBullet Function
null ImGuiBullet()Draw a small circle and keep the cursor on the same line. Advances by the same distance as an empty ImGuiTreeNode call.
ImGuiBulletText Function
null ImGuiBulletText(string label)Draw a bullet followed by a static text.
ImGuiButton Function
bool ImGuiButton(string label)Button widget returning True if the button was pressed.
ImGuiCalcItemWidth Function
float ImGuiCalcItemWidth()Returns the width of item given pushed settings and current cursor position.
Note: This is not necessarily the width of last item.
ImGuiCalcTextSize Function
string text)Compute the bounding rectangle for the provided text.
ImGuiCaptureKeyboardFromApp Function
null ImGuiCaptureKeyboardFromApp(bool capture)Force capture keyboard when your widget is being hovered.
ImGuiCaptureMouseFromApp Function
null ImGuiCaptureMouseFromApp(bool capture)Force capture mouse when your widget is being hovered.
ImGuiCheckbox Function
bool, bool ImGuiCheckbox(string label, bool value)Display a checkbox widget. Returns an interaction flag (user interacted with the widget) and the current widget state (checked or not after user interaction).
was_clicked, my_value = gs.ImGuiCheckBox('My value', my_value)
ImGuiClearInputBuffer Function
null ImGuiClearInputBuffer()Force a reset of the ImGui input buffer.
ImGuiCloseCurrentPopup Function
null ImGuiCloseCurrentPopup()Close the popup we have begin-ed into. Clicking on a menu item or selectable automatically closes the current popup.
ImGuiCollapsingHeader Function
bool ImGuiCollapsingHeader(string label)bool, bool ImGuiCollapsingHeader(string label, bool p_open)Draw a collapsing header, returns False if the header is collapsed so that you may skip drawing the header content.
ImGuiColorButton Function
Color button widget, display a small colored rectangle.
ImGuiColorEdit Function
Color editor, returns the widget current color.
ImGuiColumns Function
null ImGuiColumns()null ImGuiColumns(integer count)null ImGuiColumns(integer count, string id)null ImGuiColumns(integer count, string id, bool with_border)Begin a column layout section.
To move to the next column use ImGuiNextColumn. To end a column layout section pass 1 to this function.
Note: Current implementation supports a maximum of 64 columns.
ImGuiCombo Function
bool, integer ImGuiCombo(string label, integer current_item, StringList items, integer height_in_items)Combo box widget, return the current selection index. Combo items are passed as an array of string.
ImGuiDragFloat Function
bool, float ImGuiDragFloat(string label, float v)bool, float ImGuiDragFloat(string label, float v, float v_speed)bool, float ImGuiDragFloat(string label, float v, float v_speed, float v_min, float v_max)Declare a widget to edit a float value. The widget can be dragged over to modify the underlying value.
ImGuiDragIntVec2 Function
Declare a widget to edit an iVec2 value. The widget can be dragged over to modify the underlying value.
ImGuiDragVec2 Function
Declare a float edit widget that can be dragged over to modify its value.
ImGuiDragVec3 Function
Declare a widget to edit a Vec3 value. The widget can be dragged over to modify the underlying value.
ImGuiDragVec4 Function
Declare a widget to edit a Vec4 value. The widget can be dragged over to modify the underlying value.
ImGuiDummy Function
null ImGuiDummy(Vec2 size)Add a dummy item of given size.
ImGuiEnd Function
null ImGuiEnd()End the current window.
ImGuiEndChild Function
null ImGuiEndChild()End a scrolling region.
ImGuiEndCombo Function
null ImGuiEndCombo()End a combo widget.
ImGuiEndFrame Function
null ImGuiEndFrame(DearImguiContext ctx)null ImGuiEndFrame()null ImGuiEndFrame(integer view_id)End the current ImGui frame.
All ImGui rendering is sent to the specified view. If no view is specified, view 255 is used.
See Drawing to Views.
ImGuiEndGroup Function
null ImGuiEndGroup()End the current group.
ImGuiEndPopup Function
null ImGuiEndPopup()End the current popup.
ImGuiEndTooltip Function
null ImGuiEndTooltip()End the current tooltip window.
See ImGuiBeginTooltip.
ImGuiGetColorU32 Function
integer ImGuiGetColorU32(ImGuiCol idx)integer ImGuiGetColorU32(Color color)Return a style color component as a 32 bit unsigned integer.
See ImGuiPushStyleColor.
ImGuiGetColumnIndex Function
integer ImGuiGetColumnIndex()Returns the index of the current column.
ImGuiGetColumnOffset Function
float ImGuiGetColumnOffset()float ImGuiGetColumnOffset(integer column_index)Returns the current column offset in pixels, from the left side of the content region.
ImGuiGetColumnsCount Function
integer ImGuiGetColumnsCount()Return the number of columns in the current layout section.
See ImGuiColumns.
ImGuiGetColumnWidth Function
float ImGuiGetColumnWidth()float ImGuiGetColumnWidth(integer column_index)Returns the current column width in pixels.
ImGuiGetContentRegionMax Function
Return the available content space including window decorations and scrollbar.
ImGuiGetCursorPos Function
Return the layout cursor position in window space. Next widget declaration will take place at the cursor position.
See ImGuiSetCursorPos and ImGuiSameLine.
ImGuiGetCursorPosX Function
float ImGuiGetCursorPosX()Helper for ImGuiGetCursorPos.
ImGuiGetCursorPosY Function
float ImGuiGetCursorPosY()Helper for ImGuiGetCursorPos.
ImGuiGetCursorScreenPos Function
Return the current layout cursor position in screen space.
ImGuiGetCursorStartPos Function
Return the current layout "line" starting position.
See ImGuiSameLine.
ImGuiGetFont Function
Return the current ImGui font.
ImGuiGetFontSize Function
float ImGuiGetFontSize()Return the font size (height in pixels) of the current ImGui font with the current scale applied.
ImGuiGetFontTexUvWhitePixel Function
Get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API.
ImGuiGetFrameCount Function
integer ImGuiGetFrameCount()Return the ImGui frame counter.
See ImGuiBeginFrame and ImGuiEndFrame.
ImGuiGetFrameHeightWithSpacing Function
float ImGuiGetFrameHeightWithSpacing()Return the following value: FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)
ImGuiGetID Function
integer ImGuiGetID(string id)Return a unique ImGui ID.
ImGuiGetItemRectMax Function
Get bounding rect maximum of last item in screen space.
ImGuiGetItemRectMin Function
Get bounding rect minimum of last item in screen space.
ImGuiGetItemRectSize Function
Get bounding rect size of last item in screen space.
ImGuiGetMouseDragDelta Function
Return the distance covered by the mouse cursor since the last button press.
ImGuiGetMousePos Function
Return the mouse cursor coordinates in screen space.
ImGuiGetMousePosOnOpeningCurrentPopup Function
Retrieve a backup of the mouse position at the time of opening the current popup.
See ImGuiBeginPopup.
ImGuiGetScrollMaxX Function
float ImGuiGetScrollMaxX()Get maximum scrolling amount on the horizontal axis.
ImGuiGetScrollMaxY Function
float ImGuiGetScrollMaxY()Get maximum scrolling amount on the vertical axis.
ImGuiGetScrollX Function
float ImGuiGetScrollX()Get scrolling amount on the horizontal axis.
ImGuiGetScrollY Function
float ImGuiGetScrollY()Get scrolling amount on the vertical axis.
ImGuiGetTextLineHeight Function
float ImGuiGetTextLineHeight()Return the height of a text line using the current font.
See ImGuiPushFont.
ImGuiGetTextLineHeightWithSpacing Function
float ImGuiGetTextLineHeightWithSpacing()Return the height of a text line using the current font plus vertical spacing between two layout lines.
ImGuiGetTime Function
float ImGuiGetTime()Return the current ImGui time in seconds.
ImGuiGetTreeNodeToLabelSpacing Function
float ImGuiGetTreeNodeToLabelSpacing()Return the horizontal distance preceding label when using ImGuiTreeNode or ImGuiBullet.
The value g.FontSize + style.FramePadding.x * 2 is returned for a regular unframed TreeNode.
ImGuiGetWindowContentRegionMax Function
Return the content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with ImGuiSetNextWindowContentSize, in window space.
ImGuiGetWindowContentRegionMin Function
Content boundaries min (roughly (0,0)-Scroll), in window space.
ImGuiGetWindowContentRegionWidth Function
float ImGuiGetWindowContentRegionWidth()Return the width of the content region.
ImGuiGetWindowDrawList Function
Get the draw list associated to the current window, to append your own drawing primitives.
ImGuiGetWindowHeight Function
float ImGuiGetWindowHeight()Return the current window height.
ImGuiGetWindowPos Function
Return the current window position in screen space.
See ImGuiSetWindowPos.
ImGuiGetWindowSize Function
Return the current window size.
See ImGuiSetWindowSize.
ImGuiGetWindowWidth Function
float ImGuiGetWindowWidth()Return the current window width.
ImGuiImage Function
Display a texture as an image widget.
See ImGuiImageButton.
ImGuiImageButton Function
bool ImGuiImageButton(Texture tex, Vec2 size, Vec2 uv0, Vec2 uv1, integer frame_padding, Color bg_col)bool ImGuiImageButton(Texture tex, Vec2 size, Vec2 uv0, Vec2 uv1, integer frame_padding, Color bg_col, Color tint_col)Declare an image button displaying the provided texture.
See ImGuiImage.
ImGuiIndent Function
null ImGuiIndent()null ImGuiIndent(float width)Move content position toward the right.
ImGuiInit Function
Initialize the global ImGui context. This function must be called once before any other ImGui function using the global context.
See ImGuiInitContext.
ImGuiInitContext Function
float font_size, ProgramHandle imgui_program, ProgramHandle imgui_image_program)Initialize an ImGui context. This function must be called once before any other ImGui function using the context.
See ImGuiInit.
ImGuiInputFloat Function
bool, float ImGuiInputFloat(string label, float v)bool, float ImGuiInputFloat(string label, float v, float step, float step_fast)bool, float ImGuiInputFloat(string label, float v, float step, float step_fast, integer decimal_precision)bool, float ImGuiInputFloat(string label, float v, float step, float step_fast, integer decimal_precision, ImGuiInputTextFlags flags)Float field widget.
ImGuiInputInt Function
bool, integer ImGuiInputInt(string label, integer v)bool, integer ImGuiInputInt(string label, integer v, integer step, integer step_fast)bool, integer ImGuiInputInt(string label, integer v, integer step, integer step_fast, ImGuiInputTextFlags flags)Integer field widget.
ImGuiInputIntVec2 Function
ImGuiInputText Function
bool, string ImGuiInputText(string label, string text, integer max_size)Text input widget, returns the current widget buffer content.
ImGuiInputVec2 Function
bool, Vec2 ImGuiInputVec2(string label, Vec2 v, integer decimal_precision, ImGuiInputTextFlags flags)Vec2 field widget.
ImGuiInputVec3 Function
bool, Vec3 ImGuiInputVec3(string label, Vec3 v, integer decimal_precision, ImGuiInputTextFlags flags)Vec3 field widget.
ImGuiInputVec4 Function
bool, Vec4 ImGuiInputVec4(string label, Vec4 v, integer decimal_precision, ImGuiInputTextFlags flags)Vec4 field widget.
ImGuiInvisibleButton Function
Invisible button widget, return True if the button was pressed.
ImGuiIsAnyItemActive Function
bool ImGuiIsAnyItemActive()Return true if any item is active, false otherwise.
ImGuiIsAnyItemHovered Function
bool ImGuiIsAnyItemHovered()Return true if any item is hovered by the mouse cursor, false otherwise.
ImGuiIsItemActive Function
bool ImGuiIsItemActive()Was the last item active.
e.g. button being held, text field being edited - items that do not interact will always return false.
ImGuiIsItemClicked Function
bool ImGuiIsItemClicked()bool ImGuiIsItemClicked(integer mouse_button)Was the last item clicked.
ImGuiIsItemHovered Function
bool ImGuiIsItemHovered()bool ImGuiIsItemHovered(ImGuiHoveredFlags flags)Was the last item hovered by mouse.
ImGuiIsItemVisible Function
bool ImGuiIsItemVisible()Was the last item visible and not out of sight due to clipping/scrolling.
ImGuiIsKeyDown Function
bool ImGuiIsKeyDown(integer key_index)Was the specified key down during the last frame?
ImGuiIsKeyPressed Function
bool ImGuiIsKeyPressed(integer key_index)bool ImGuiIsKeyPressed(integer key_index, bool repeat)Was the specified key pressed? A key press implies that the key was down and is currently released.
ImGuiIsKeyReleased Function
bool ImGuiIsKeyReleased(integer key_index)Was the specified key released during the last frame?
ImGuiIsMouseClicked Function
bool ImGuiIsMouseClicked(integer button)bool ImGuiIsMouseClicked(integer button, bool repeat)Was the specified mouse button clicked during the last frame? A mouse click implies that the button pressed earlier and released during the last frame.
ImGuiIsMouseDoubleClicked Function
bool ImGuiIsMouseDoubleClicked(integer button)Was the specified mouse button double-clicked during the last frame? A double-click implies two rapid successive clicks of the same button with the mouse cursor staying in the same position.
ImGuiIsMouseDown Function
bool ImGuiIsMouseDown(integer button)Was the specified mouse button down during the last frame?
ImGuiIsMouseDragging Function
bool ImGuiIsMouseDragging(ImGuiMouseButton button)Is mouse dragging?
ImGuiIsMouseHoveringRect Function
Test whether the mouse cursor is hovering the specified rectangle.
ImGuiIsMouseReleased Function
bool ImGuiIsMouseReleased(integer button)Was the specified mouse button released during the last frame?
ImGuiIsRectVisible Function
bool ImGuiIsRectVisible(Vec2 size)Test if a rectangle of the specified size starting from cursor position is visible/not clipped. Or test if a rectangle in screen space is visible/not clipped.
ImGuiIsWindowCollapsed Function
bool ImGuiIsWindowCollapsed()Is the current window collapsed.
ImGuiIsWindowFocused Function
bool ImGuiIsWindowFocused()bool ImGuiIsWindowFocused(ImGuiFocusedFlags flags)Is the current window focused.
ImGuiIsWindowHovered Function
bool ImGuiIsWindowHovered()bool ImGuiIsWindowHovered(ImGuiHoveredFlags flags)Is the current window hovered and hoverable (not blocked by a popup), differentiates child windows from each others.
ImGuiLabelText Function
null ImGuiLabelText(string label, string text)Display text+label aligned the same way as value+label widgets.
ImGuiListBox Function
bool, integer ImGuiListBox(string label, integer current_item, StringList items, integer height_in_items)List widget.
ImGuiMouseDrawCursor Function
null ImGuiMouseDrawCursor(bool draw_cursor)Enable/disable the ImGui software mouse cursor.
ImGuiNewFrame Function
null ImGuiNewFrame()ImGuiNewLine Function
null ImGuiNewLine()Undo a ImGuiSameLine call or force a new line when in an horizontal layout.
ImGuiNextColumn Function
null ImGuiNextColumn()Start the next column in multi-column layout.
See ImGuiColumns.
ImGuiOpenPopup Function
null ImGuiOpenPopup(string id)Mark a named popup as open.
Popup windows are closed when the user:
- Clicks outside of their client rect,
- Activates a pressable item,
- ImGuiCloseCurrentPopup is called within a ImGuiBeginPopup/ImGuiEndPopup block.
Popup identifiers are relative to the current ID stack so ImGuiOpenPopup and ImGuiBeginPopup need to be at the same level of the ID stack.
ImGuiPopAllowKeyboardFocus Function
null ImGuiPopAllowKeyboardFocus()Undo the last call to ImGuiPushAllowKeyboardFocus.
ImGuiPopButtonRepeat Function
null ImGuiPopButtonRepeat()Undo the last call to ImGuiPushButtonRepeat.
ImGuiPopClipRect Function
null ImGuiPopClipRect()Undo the last call to ImGuiPushClipRect.
ImGuiPopFont Function
null ImGuiPopFont()Undo the last call to ImGuiPushFont.
ImGuiPopID Function
null ImGuiPopID()Undo the last call to ImGuiPushID.
ImGuiPopItemWidth Function
null ImGuiPopItemWidth()Undo the last call to ImGuiPushItemWidth.
ImGuiPopStyleColor Function
null ImGuiPopStyleColor()null ImGuiPopStyleColor(integer count)Undo the last call to ImGuiPushStyleColor.
ImGuiPopStyleVar Function
null ImGuiPopStyleVar()null ImGuiPopStyleVar(integer count)Undo the last call to ImGuiPushStyleVar.
ImGuiPopTextWrapPos Function
null ImGuiPopTextWrapPos()Undo the last call to ImGuiPushTextWrapPos.
ImGuiProgressBar Function
null ImGuiProgressBar(float fraction)Draw a progress bar, fraction must be between 0.0 and 1.0.
ImGuiPushAllowKeyboardFocus Function
null ImGuiPushAllowKeyboardFocus(bool v)Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets.
ImGuiPushButtonRepeat Function
null ImGuiPushButtonRepeat(bool repeat)In repeat mode, ButtonXXX functions return repeated true in a typematic manner.
Note that you can call ImGuiIsItemActive after any Button to tell if the button is held in the current frame.
ImGuiPushClipRect Function
null ImGuiPushClipRect(Vec2 clip_rect_min, Vec2 clip_rect_max, bool intersect_with_current_clip_rect)Push a new clip rectangle onto the clipping stack.
ImGuiPushFont Function
null ImGuiPushFont(ImFont font)Push a font on top of the font stack and make it current for subsequent text rendering operations.
ImGuiPushID Function
null ImGuiPushID(string id)null ImGuiPushID(integer id)Push a string into the ID stack.
ImGuiPushItemWidth Function
null ImGuiPushItemWidth(float item_width)Set the width of items for common large item+label widgets.
>0: width in pixels<0: alignxpixels to the right of window (so -1 always align width to the right side)=0: default to ~2/3 of the window width
See ImGuiPopItemWidth.
ImGuiPushStyleColor Function
Push a value on the style stack for the specified style color.
See ImGuiPopStyleColor.
ImGuiPushStyleVar Function
Push a value on the style stack for the specified style variable.
See ImGuiPopStyleVar.
ImGuiPushTextWrapPos Function
null ImGuiPushTextWrapPos()null ImGuiPushTextWrapPos(float wrap_pos_x)Push word-wrapping position for text commands.
<0: No wrapping.=0: Wrap to the end of the window or column.>0: Wrap atwrap_pos_xposition in window local space.
See ImGuiPopTextWrapPos.
ImGuiRadioButton Function
bool ImGuiRadioButton(string label, bool active)bool, integer ImGuiRadioButton(string label, integer v, integer v_button)Radio button widget, return the button state.
ImGuiRender Function
null ImGuiRender()ImGuiResetMouseDragDelta Function
null ImGuiResetMouseDragDelta()null ImGuiResetMouseDragDelta(ImGuiMouseButton button)ImGuiSameLine Function
null ImGuiSameLine()null ImGuiSameLine(float pos_x)null ImGuiSameLine(float pos_x, float spacing_w)Call between widgets or groups to layout them horizontally.
ImGuiSelectable Function
bool ImGuiSelectable(string label)bool ImGuiSelectable(string label, bool selected)Selectable item.
The following width values are possible:
= 0.0: Use remaining width.> 0.0: Specific width.
The following height values are possible:
= 0.0: Use label height.> 0.0: Specific height.
ImGuiSeparator Function
null ImGuiSeparator()Output an horizontal line to separate two distinct UI sections.
ImGuiSetColumnOffset Function
null ImGuiSetColumnOffset(integer column_index, float offset_x)Set the position of a column line in pixels, from the left side of the contents region.
ImGuiSetColumnWidth Function
null ImGuiSetColumnWidth(integer column_index, float width)Set the column width in pixels.
ImGuiSetCursorPos Function
null ImGuiSetCursorPos(Vec2 local_pos)Set the current widget output cursor position in window space.
ImGuiSetCursorPosX Function
null ImGuiSetCursorPosX(float x)See ImGuiSetCursorPos.
ImGuiSetCursorPosY Function
null ImGuiSetCursorPosY(float y)See ImGuiSetCursorPos.
ImGuiSetCursorScreenPos Function
null ImGuiSetCursorScreenPos(Vec2 pos)Set the widget cursor output position in screen space.
ImGuiSetItemAllowOverlap Function
null ImGuiSetItemAllowOverlap()Allow the last item to be overlapped by a subsequent item. Sometimes useful with invisible buttons, selectables, etc... to catch unused areas.
ImGuiSetItemDefaultFocus Function
null ImGuiSetItemDefaultFocus()Make the last item the default focused item of a window.
ImGuiSetKeyboardFocusHere Function
null ImGuiSetKeyboardFocusHere()null ImGuiSetKeyboardFocusHere(integer offset)Focus keyboard on the next widget.
Use positive offset value to access sub components of a multiple component widget. Use -1 to access the previous widget.
ImGuiSetNextItemOpen Function
null ImGuiSetNextItemOpen(bool is_open)Set next item open state.
ImGuiSetNextWindowCollapsed Function
Set next window collapsed state, call before ImGuiBegin.
ImGuiSetNextWindowContentSize Function
null ImGuiSetNextWindowContentSize(Vec2 size)Set the size of the content area of the next declared window. Call before ImGuiBegin.
ImGuiSetNextWindowContentWidth Function
null ImGuiSetNextWindowContentWidth(float width)ImGuiSetNextWindowFocus Function
null ImGuiSetNextWindowFocus()Set the next window to be focused/top-most. Call before ImGuiBegin.
ImGuiSetNextWindowPos Function
null ImGuiSetNextWindowPos(Vec2 pos)Set next window position, call before ImGuiBegin.
ImGuiSetNextWindowPosCenter Function
null ImGuiSetNextWindowPosCenter()null ImGuiSetNextWindowPosCenter(ImGuiCond condition)Set next window position to be centered on screen, call before ImGuiBegin.
ImGuiSetNextWindowSize Function
null ImGuiSetNextWindowSize(Vec2 size)Set next window size, call before ImGuiBegin. A value of 0 for an axis will auto-fit it.
ImGuiSetNextWindowSizeConstraints Function
Set the next window size limits.
Use -1,-1 on either X/Y axis to preserve the current size. Sizes will be rounded down.
ImGuiSetScrollFromPosY Function
null ImGuiSetScrollFromPosY(float pos_y)null ImGuiSetScrollFromPosY(float pos_y, float center_y_ratio)Adjust scrolling amount to make a given position visible. Generally ImGuiGetCursorStartPos + offset to compute a valid position.
ImGuiSetScrollHereY Function
null ImGuiSetScrollHereY()null ImGuiSetScrollHereY(float center_y_ratio)Adjust scrolling amount to make current cursor position visible.
- 0: Top.
- 0.5: Center.
- 1: Bottom.
When using to make a default/current item visible, consider using ImGuiSetItemDefaultFocus instead.
ImGuiSetScrollX Function
null ImGuiSetScrollX(float scroll_x)Set scrolling amount between [0;ImGuiGetScrollMaxX].
ImGuiSetScrollY Function
null ImGuiSetScrollY(float scroll_y)Set scrolling amount between [0;ImGuiGetScrollMaxY].
ImGuiSetTooltip Function
null ImGuiSetTooltip(string text)Set tooltip under mouse-cursor, typically used with ImGuiIsItemHovered/ImGuiIsAnyItemHovered. Last call wins.
ImGuiSetWindowCollapsed Function
null ImGuiSetWindowCollapsed(string name, bool collapsed)Set named window collapsed state, prefer using ImGuiSetNextWindowCollapsed.
ImGuiSetWindowFocus Function
null ImGuiSetWindowFocus(string name)Set named window to be focused/top-most.
ImGuiSetWindowFontScale Function
null ImGuiSetWindowFontScale(float scale)Per-window font scale.
ImGuiSetWindowPos Function
Set named window position.
ImGuiSetWindowSize Function
Set named window size.
ImGuiShutdown Function
null ImGuiShutdown()Shutdown the global ImGui context.
ImGuiSliderFloat Function
bool, float ImGuiSliderFloat(string label, float v, float v_min, float v_max)bool, float ImGuiSliderFloat(string label, float v, float v_min, float v_max, string format)Float slider widget.
ImGuiSliderInt Function
bool, integer ImGuiSliderInt(string label, integer v, integer v_min, integer v_max)bool, integer ImGuiSliderInt(string label, integer v, integer v_min, integer v_max, string format)Integer slider widget.
ImGuiSliderIntVec2 Function
ImGuiSliderVec2 Function
Vec2 slider widget.
ImGuiSliderVec3 Function
Vec3 slider widget.
ImGuiSliderVec4 Function
Vec4 slider widget.
ImGuiSmallButton Function
bool ImGuiSmallButton(string label)Small button widget fitting the height of a text line, return True if the button was pressed.
ImGuiSpacing Function
null ImGuiSpacing()Add spacing.
ImGuiText Function
null ImGuiText(string text)Static text.
ImGuiTextColored Function
Colored static text.
ImGuiTextDisabled Function
null ImGuiTextDisabled(string text)Disabled static text.
ImGuiTextUnformatted Function
null ImGuiTextUnformatted(string text)Raw text without formatting. Roughly equivalent to ImGuiText but faster, recommended for long chunks of text.
ImGuiTextWrapped Function
null ImGuiTextWrapped(string text)Wrapped static text.
Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, you may need to set a size using ImGuiSetNextWindowSize.
ImGuiTreeNode Function
bool ImGuiTreeNode(string label)If returning true the node is open and the user is responsible for calling ImGuiTreePop.
ImGuiTreeNodeEx Function
See ImGuiTreeNode.
ImGuiTreePop Function
null ImGuiTreePop()Pop the current tree node.
ImGuiTreePush Function
null ImGuiTreePush(string id)Already called by ImGuiTreeNode, but you can call ImGuiTreePush/ImGuiTreePop yourself for layouting purpose.
ImGuiUnindent Function
null ImGuiUnindent()null ImGuiUnindent(float width)Move content position back to the left (cancel ImGuiIndent).
ImGuiWantCaptureMouse Function
bool ImGuiWantCaptureMouse()ImGui wants mouse capture. Use this function to determine when to pause mouse processing from other parts of your program.
Inch Function
float Inch(float inch)Convert a value in inches to the Harfang internal unit system.
InputInit Function
null InputInit()Initialize the Input system. Must be invoked before any call to WindowSystemInit to work properly.
hg.InputInit()
hg.WindowSystemInit()
InputShutdown Function
null InputShutdown()Shutdown the Input system.
Inside Function
Test if a value is inside a containing volume.
int_to_VoidPointer Function
integer ptr)Cast an integer to a void pointer.
This function is only used to provide access to low-level structures and should not be needed most of the time.
Intersection Function
Return the intersection of two rectangles.
IntersectRay Function
Intersect an infinite ray with an axis-aligned bounding box, if the first returned value is true it is followed by the near and far intersection points.
Intersects Function
Return true if rect a intersects rect b.
Inverse Function
Return the inverse of a matrix, vector or quaternion.
InverseFast Function
IsAssetFile Function
bool IsAssetFile(string name)Test if an asset file exists in the assets system.
See Resources & Assets.
IsDir Function
bool IsDir(string path)Returns true if path is a directory on the local filesystem, false otherwise.
IsEOF Function
bool IsEOF(File file)Returns true if the cursor is at the end of the file, false otherwise.
IsFile Function
bool IsFile(string path)Test if a file exists on the local filesystem.
IsFinite Function
bool IsFinite(float v)Test if a floating point value is finite.
IsHandJointActive Function
bool IsHandJointActive(HandsSide hand)IsMonitorConnected Function
bool IsMonitorConnected(Monitor monitor)Test if the specified monitor is connected to the host device.
IsoSurfaceSphere Function
null IsoSurfaceSphere(IsoSurface surface, integer width, integer height, integer depth, float x, float y, float z, float radius)null IsoSurfaceSphere(IsoSurface surface, integer width, integer height, integer depth, float x, float y, float z, float radius, float value)null IsoSurfaceSphere(IsoSurface surface, integer width, integer height, integer depth, float x, float y, float z, float radius, float value, float exponent)Output a sphere to an iso-surface.
IsoSurfaceToModel Function
bool IsoSurfaceToModel(ModelBuilder builder, IsoSurface surface, integer width, integer height, integer depth)bool IsoSurfaceToModel(ModelBuilder builder, IsoSurface surface, integer width, integer height, integer depth, integer material)bool IsoSurfaceToModel(ModelBuilder builder, IsoSurface surface, integer width, integer height, integer depth, integer material, float isolevel)bool IsoSurfaceToModel(ModelBuilder builder, IsoSurface surface, integer width, integer height, integer depth, integer material, float isolevel, float scale_x, float scale_y, float scale_z)Convert an iso-surface to a render model, this function is geared toward efficiency and meant for realtime.
IsPathAbsolute Function
bool IsPathAbsolute(string path)Test if the provided path is an absolute or relative path.
IsPrimaryMonitor Function
bool IsPrimaryMonitor(Monitor monitor)Return true if the monitor is the primary host device monitor, false otherwise.
IsValid Function
bool IsValid(File file)bool IsValid(Texture t)bool IsValid(FrameBuffer fb)bool IsValid(ForwardPipelineAAA pipeline)bool IsValid(IAudioStreamer streamer)bool IsValid(IVideoStreamer streamer)Test if a resource if valid.
IsWindowOpen Function
bool IsWindowOpen(Window window)Return true if the window is open, false otherwise.
Km Function
float Km(float km)Convert a value in kilometers to the Harfang internal unit system.
Len Function
float Len(Vec2 v)integer Len(iVec2 v)float Len(Quaternion q)float Len(Vec3 v)Return the length of the vector.
Len2 Function
float Len2(Vec2 v)integer Len2(iVec2 v)float Len2(Quaternion q)float Len2(Vec3 v)Return the length of the vector squared.
Lerp Function
integer Lerp(integer a, integer b, float t)float Lerp(float a, float b, float t)See LinearInterpolate.
LerpAsOrthonormalBase Function
Linear interpolate between two transformation matrices on the [0;1] interval.
LinearInterpolate Function
float LinearInterpolate(float y0, float y1, float t)Linear interpolate between two values on the [0;1] interval.
See CosineInterpolate, CubicInterpolate and HermiteInterpolate.
ListDir Function
Get the content of a directory on the local filesystem, this function does not recurse into subfolders.
See ListDirRecursive.
ListDirRecursive Function
Get the content of a directory on the local filesystem, this function recurses into subfolders.
See ListDir.
LoadBMP Function
LoadDataFromFile Function
LoadFontFromAssets Function
string name)string name, float size, integer resolution, integer padding, string glyphs)Load a TrueType (TTF) font from the assets system.
See Resources & Assets.
LoadFontFromFile Function
string path)Load a TrueType (TTF) font from the local filesystem.
See Resources & Assets.
LoadForwardPipelineAAAConfigFromAssets Function
LoadForwardPipelineAAAConfigFromFile Function
LoadGIF Function
LoadJPG Function
LoadJsonFromAssets Function
string name)Load a JSON from the assets system.
See Resources & Assets.
LoadJsonFromFile Function
string path)Load a JSON from the local filesystem.
LoadLPCMSound Function
Load a sound from a decoded raw LPCM memory block and return a reference to it.
The input pointer is borrowed only for the duration of the call. The audio data is copied to the audio backend before the function returns.
LoadModelFromAssets Function
string name)Load a render model from the assets system.
See DrawModel and Resources & Assets.
LoadModelFromFile Function
string path)Load a render model from the local filesystem.
LoadOGGSoundAsset Function
string name)LoadOGGSoundFile Function
string path)LoadPicture Function
Load a Picture content from the filesystem.
LoadPipelineProgramFromAssets Function
string name, PipelineResources resources, PipelineInfo pipeline)Load a pipeline shader program from the assets system.
See Resources & Assets.
LoadPipelineProgramFromFile Function
string path, PipelineResources resources, PipelineInfo pipeline)Load a pipeline shader program from the local filesystem.
LoadPipelineProgramRefFromAssets Function
string name, PipelineResources resources, PipelineInfo pipeline)LoadPipelineProgramRefFromFile Function
string path, PipelineResources resources, PipelineInfo pipeline)LoadPNG Function
LoadProgramFromAssets Function
string name)Load a shader program from the assets system.
See Resources & Assets.
LoadProgramFromFile Function
string path)Load a shader program from the local filesystem.
LoadPSD Function
LoadSceneBinaryFromAssets Function
bool LoadSceneBinaryFromAssets(string name, Scene scene, PipelineResources resources, PipelineInfo pipeline)bool LoadSceneBinaryFromAssets(string name, Scene scene, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)Load a scene in binary format from the assets system. Loaded content is added to the existing scene content.
See Resources & Assets.
LoadSceneBinaryFromDataAndAssets Function
bool LoadSceneBinaryFromDataAndAssets(Data data, string name, Scene scene, PipelineResources resources, PipelineInfo pipeline)bool LoadSceneBinaryFromDataAndAssets(Data data, string name, Scene scene, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)LoadSceneBinaryFromDataAndFile Function
bool LoadSceneBinaryFromDataAndFile(Data data, string name, Scene scene, PipelineResources resources, PipelineInfo pipeline)bool LoadSceneBinaryFromDataAndFile(Data data, string name, Scene scene, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)LoadSceneBinaryFromFile Function
bool LoadSceneBinaryFromFile(string path, Scene scene, PipelineResources resources, PipelineInfo pipeline)bool LoadSceneBinaryFromFile(string path, Scene scene, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)Load a scene in binary format from the local filesystem. Loaded content is added to the existing scene content.
LoadSceneFromAssets Function
bool LoadSceneFromAssets(string name, Scene scene, PipelineResources resources, PipelineInfo pipeline)bool LoadSceneFromAssets(string name, Scene scene, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)LoadSceneFromFile Function
bool LoadSceneFromFile(string path, Scene scene, PipelineResources resources, PipelineInfo pipeline)bool LoadSceneFromFile(string path, Scene scene, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)LoadSceneJsonFromAssets Function
bool LoadSceneJsonFromAssets(string name, Scene scene, PipelineResources resources, PipelineInfo pipeline)bool LoadSceneJsonFromAssets(string name, Scene scene, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)Load a scene in JSON format from the assets system. Loaded content is added to the existing scene content.
See Resources & Assets.
LoadSceneJsonFromFile Function
bool LoadSceneJsonFromFile(string path, Scene scene, PipelineResources resources, PipelineInfo pipeline)bool LoadSceneJsonFromFile(string path, Scene scene, PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)Load a scene in JSON format from the local filesystem. Loaded content is added to the existing scene content.
LoadTextureFlagsFromAssets Function
string name)Load texture flags in the texture metafile from the assets system.
See Resources & Assets.
LoadTextureFlagsFromFile Function
string path)Load texture flags in the texture metafile from the local filesystem.
LoadTextureFromAssets Function
Load a texture from the assets system.
- When not using pipeline resources the texture informations are returned directly.
- When using pipeline resources the texture informations can be retrieved from the PipelineResources object.
See Resources & Assets.
LoadTextureFromFile Function
Load a texture from the local filesystem.
- When not using pipeline resources the texture informations are returned directly.
- When using pipeline resources the texture informations can be retrieved from the PipelineResources object.
LoadTGA Function
LoadWAVSoundAsset Function
string name)Load a sound in WAV format from the assets system and return a reference to it.
See Resources & Assets.
LoadWAVSoundFile Function
string path)Load a sound in WAV format from the local filesystem and return a reference to it.
Log Function
null Log(string msg)null Log(string msg, string details)MakeAudioStreamer Function
string module_path)MakeForwardPipelineLinearLight Function
float priority)float priority, ForwardPipelineShadowType shadow_type)float priority, ForwardPipelineShadowType shadow_type, float shadow_bias)Create a forward pipeline linear light.
See ForwardPipelineLights, PrepareForwardPipelineLights, SubmitSceneToForwardPipeline and Drawing a Scene.
MakeForwardPipelinePointLight Function
float radius)float radius, float priority)float radius, float priority, ForwardPipelineShadowType shadow_type)float radius, float priority, ForwardPipelineShadowType shadow_type, float shadow_bias)Create a forward pipeline point light.
See ForwardPipelineLights, PrepareForwardPipelineLights, SubmitSceneToForwardPipeline and Drawing a Scene.
MakeForwardPipelineSpotLight Function
float radius)float radius, float inner_angle)float radius, float inner_angle, float outer_angle)float radius, float inner_angle, float outer_angle, float priority)float radius, float inner_angle, float outer_angle, float priority, ForwardPipelineShadowType shadow_type)float radius, float inner_angle, float outer_angle, float priority, ForwardPipelineShadowType shadow_type, float shadow_bias)Create a forward pipeline spot light.
See ForwardPipelineLights, PrepareForwardPipelineLights, SubmitSceneToForwardPipeline and Drawing a Scene.
MakeFrustum Function
Create a projection frustum. This object can then be used to perform culling using TestVisibility.
# Compute a perspective matrix
proj = hg.ComputePerspectiveProjectionMatrix(0.1, 1000, hg.FovToZoomFactor(math.pi/4), 1280/720)
# Make a frustum from this projection matrix
frustum = hg.MakeFrustum(proj)
MakePlane Function
Geometrical plane in 3D space.
p: a point lying on the plane.n: the plane normal.m: an affine transformation matrix that will be applied topandn.
MakeRectFromWidthHeight Function
Make a rectangle from width and height.
MakeUniformSetTexture Function
Create a uniform set texture object.
This object can be added to a UniformSetTextureList to control the shader program uniform values for a subsequent call to DrawModel.
MakeUniformSetValue Function
Create a uniform set value object.
This object can be added to a UniformSetValueList to control the shader program uniform values for a subsequent call to DrawModel.
MakeVec3 Function
MakeVertex Function
MakeVideoStreamer Function
string module_path)Mat3LookAt Function
Return a rotation matrix looking down the provided vector. The input vector does not need to be normalized.
Mat4LookAt Function
Return a look at matrix whose orientation points at the specified position.
Mat4LookAtUp Function
Return a look at matrix whose orientation points at the specified position and up direction.
Mat4LookToward Function
Return a look at matrix whose orientation points toward the specified direction.
Mat4LookTowardUp Function
Return a look at matrix whose orientation points toward the specified directions.
Max Function
float Max(float a, float b)integer Max(integer a, integer b)Return a vector whose elements are the maximum of each of the two specified vectors.
Min Function
float Min(float a, float b)integer Min(integer a, integer b)Return a vector whose elements are the minimum of each of the two specified vectors.
MinMaxFromPositionSize Function
Set min = p - size/2 and max = p + size/2.
MkDir Function
bool MkDir(string path)bool MkDir(string path, integer permissions)Create a new directory.
See MkTree.
MkTree Function
bool MkTree(string path)bool MkTree(string path, integer permissions)Create a directory tree on the local filesystem. This function is recursive and creates each missing directory in the path.
See MkDir.
Mm Function
float Mm(float mm)Convert a value in millimeters to the Harfang internal unit system.
Ms Function
float Ms(float milliseconds)Convert a value in milliseconds to the Harfang internal unit system.
Mtr Function
float Mtr(float m)Convert a value in meters to the Harfang internal unit system.
NewFullscreenWindow Function
string title, Monitor monitor, integer mode_index, MonitorRotation rotation)Create a new fullscreen window.
NewIsoSurface Function
Return a new iso-surface object.
See IsoSurfaceSphere to draw to an iso-surface and IsoSurfaceToModel to draw it.
NewWindow Function
string title, integer width, integer height, integer bpp, WindowVisibility visibility)Create a new window.
NewWindowFrom Function
Wrap a native window handle in a Window object.
Normalize Function
Return the input vector scaled so that its length is one.
NormalizePath Function
string NormalizePath(string path)Normalize a path according to the following conventions:
- Replace all whitespaces by underscores.
Offset Function
Offset a rectangle by the specified amount of units.
Open Function
string path)Open a file in binary mode.
See OpenText, OpenWrite, OpenWriteText
OpenFileDialog Function
Open a native OpenFile dialog.
OpenFolderDialog Function
bool, string OpenFolderDialog(string title, string folder_name)bool, string OpenFolderDialog(string title, string folder_name, string initial_dir)Open a native OpenFolder dialog.
OpenTemp Function
string template_path)Return a handle to a temporary file on the local filesystem.
OpenText Function
string path)Open a file as text. Return a handle to the opened file.
See Open, OpenWrite, OpenWriteText
OpenVRCreateEyeFrameBuffer Function
Creates and returns an Virtual Reality eye framebuffer, with the desired level of anti-aliasing. This function must be invoked twice, for the left and right eyes.
OpenVRDestroyEyeFrameBuffer Function
null OpenVRDestroyEyeFrameBuffer(OpenVREyeFrameBuffer eye_fb)Destroy an eye framebuffer.
OpenVRGetColorTexture Function
Return the color texture attached to an eye framebuffer.
OpenVRGetDepthTexture Function
Return the depth texture attached to an eye framebuffer.
OpenVRGetFrameBufferSize Function
OpenVRGetState Function
Returns the current OpenVR state including the body, head and eye transformations.
OpenVRInit Function
bool OpenVRInit()Initialize OpenVR. Start the device display, its controllers and trackers.
OpenVRIsHMDMounted Function
bool OpenVRIsHMDMounted()OpenVRPostPresentHandoff Function
null OpenVRPostPresentHandoff()Signal to the OpenVR compositor that it can immediatly start processing the current frame.
OpenVRShutdown Function
null OpenVRShutdown()Shutdown OpenVR.
OpenVRStateToViewState Function
Compute the left and right eye view states from an OpenVR state.
See OpenVRGetState.
OpenVRSubmitFrame Function
Submit the left and right eye textures to the OpenVR compositor.
OpenWrite Function
string path)Open a file as binary in write mode.
See Open, OpenText, OpenWriteText
OpenWriteText Function
string path)OpenXRCreateEyeFrameBuffer Function
OpenXRDestroyEyeFrameBuffer Function
null OpenXRDestroyEyeFrameBuffer(OpenXREyeFrameBuffer eye_fb)OpenXRFinishSubmitFrameBuffer Function
null OpenXRFinishSubmitFrameBuffer(OpenXRFrameInfo frameInfo)OpenXRGetColorTexture Function
OpenXRGetColorTextureFromId Function
integer index)OpenXRGetDepthTexture Function
OpenXRGetDepthTextureFromId Function
integer index)OpenXRGetEyeGaze Function
bool, Mat4 OpenXRGetEyeGaze()OpenXRGetHeadPose Function
bool, Mat4 OpenXRGetHeadPose()OpenXRGetInstanceInfo Function
string OpenXRGetInstanceInfo()OpenXRInit Function
bool OpenXRInit()bool OpenXRInit(integer ExtensionsFlagsEnable)OpenXRShutdown Function
null OpenXRShutdown()OpenXRSubmitSceneToForwardPipeline Function
integer OpenXRSubmitSceneToForwardPipeline(Mat4 cam_offset, update_controllersCallback update_controllers, draw_sceneCallback draw_scene, integer view_id, float z_near, float z_far)Orthonormalize Function
Return a matrix where the row vectors form an orthonormal basis. All vectors are normalized and perpendicular to each other.
Overlap Function
Return true if the provided volume overlaps with this volume, false otherwise. The test can optionally be restricted to a specific axis.
PathJoin Function
string PathJoin(StringList elements)Return a file path from a set of string elements.
PathStartsWith Function
bool PathStartsWith(string path, string with)Test if the provided path starts with the provided prefix.
PathStripPrefix Function
string PathStripPrefix(string path, string prefix)Return a copy of the input path stripped of the provided prefix.
PathStripSuffix Function
string PathStripSuffix(string path, string suffix)Return a copy of the input path stripped of the provided suffix.
PathToDisplay Function
string PathToDisplay(string path)Format a path for display.
PauseSource Function
null PauseSource(SourceRef source)Pause a playing audio source.
See PlayStereo and PlaySpatialized.
PlaySpatialized Function
Start playing a spatialized sound. Return a handle to the started source.
PlayStereo Function
Start playing a stereo sound. Return a handle to the started source.
PrepareForwardPipelineLights Function
Prepare a list of forward pipeline lights into a structure ready for submitting to the forward pipeline.
Lights are sorted by priority/type and the most important lights are assigned to available lighting slot of the forward pipeline.
For the public scripting API, see SubmitSceneToForwardPipeline and Drawing a Scene.
PrepareSceneForwardPipelineCommonRenderData Function
integer, SceneForwardPipelinePassViewId PrepareSceneForwardPipelineCommonRenderData(integer view_id, Scene scene, SceneForwardPipelineRenderData render_data, ForwardPipeline pipeline, PipelineResources resources, SceneForwardPipelinePassViewId views)integer, SceneForwardPipelinePassViewId PrepareSceneForwardPipelineCommonRenderData(integer view_id, Scene scene, SceneForwardPipelineRenderData render_data, ForwardPipeline pipeline, PipelineResources resources, SceneForwardPipelinePassViewId views, string debug_name)Prepare the common render data to submit a scene to the forward pipeline.
Note: When rendering multiple views of the same scene, common data only needs to be prepared once.
PrepareSceneForwardPipelineViewDependentRenderData Function
integer, SceneForwardPipelinePassViewId PrepareSceneForwardPipelineViewDependentRenderData(integer view_id, ViewState view_state, Scene scene, SceneForwardPipelineRenderData render_data, ForwardPipeline pipeline, PipelineResources resources, SceneForwardPipelinePassViewId views)integer, SceneForwardPipelinePassViewId PrepareSceneForwardPipelineViewDependentRenderData(integer view_id, ViewState view_state, Scene scene, SceneForwardPipelineRenderData render_data, ForwardPipeline pipeline, PipelineResources resources, SceneForwardPipelinePassViewId views, string debug_name)Prepare the view dependent render data to submit a scene to the forward pipeline.
PrintProfilerFrame Function
null PrintProfilerFrame(ProfilerFrame profiler_frame)Print a profiler frame to the console. Print all sections in the frame, their duration and event count.
ProcessLoadQueues Function
integer ProcessLoadQueues(PipelineResources res)ProcessModelLoadQueue Function
integer ProcessModelLoadQueue(PipelineResources res)ProcessTextureLoadQueue Function
integer ProcessTextureLoadQueue(PipelineResources res)Process the texture load queue. This function must be called to load textures queued while loading a scene or model with the LSSF_QueueTextureLoads flag.
See LoadSaveSceneFlags.
ProjectOrthoToClipSpace Function
ProjectOrthoToScreenSpace Function
ProjectToClipSpace Function
Project a world position to the clipping space.
ProjectToScreenSpace Function
Project a world position to screen coordinates.
ProjectZToClipSpace Function
Project a depth value to clip space.
Quantize Function
float Quantize(float v, float q)Return the provided value quantized to the specified step.
QuaternionFromAxisAngle Function
Return a quaternion rotation from a 3d axis and a rotation around that axis.
QuaternionFromEuler Function
Return a quaternion 3d rotation from its Euler vector representation.
QuaternionFromMatrix3 Function
Return a quaternion rotation from its Mat3 representation.
QuaternionLookAt Function
Return a quaternion 3d rotation oriented toward the specified position when sitting on the world's origin {0, 0, 0}.
Rad Function
float Rad(float radians)Convert an angle in radians to the engine unit system.
Rad3 Function
Convert a triplet of angles in radians to the engine unit system.
RadianToDegree Function
float RadianToDegree(float radians)Convert an angle in radians to degrees.
Rand Function
integer Rand()integer Rand(integer range)Return a random integer value in the provided range, default range is [0;65535].
See FRand to generate a random floating point value.
RandomVec3 Function
Return a vector with each component randomized in the inclusive provided range.
RandomVec4 Function
Return a vector with each component randomized in the inclusive provided range.
ReadFloat Function
float ReadFloat(File file)Read a binary 32 bit floating point value from a local file.
ReadGamepad Function
string name)Read the current state of a named gamepad. If no name is passed, default is implied.
See GetGamepadNames.
ReadJoystick Function
string name)ReadKeyboard Function
string name)Read the current state of a named keyboard. If no name is passed, default is implied.
See GetKeyboardNames.
ReadMouse Function
string name)Read the current state of a named mouse. If no name is passed, default is implied.
See GetMouseNames.
ReadString Function
string ReadString(File file)Read a binary string from a local file.
Strings are stored as a uint32_t length field followed by the string content in UTF-8.
ReadUInt16 Function
integer ReadUInt16(File file)Read a binary 16 bit unsigned integer value from a local file.
ReadUInt32 Function
integer ReadUInt32(File file)Read a binary 32 bit unsigned integer value from a local file.
ReadUInt8 Function
integer ReadUInt8(File file)Read a binary 8 bit unsigned integer value from a local file.
ReadVRController Function
string name)Read the current state of a named VR controller. If no name is passed, default is implied.
See GetVRControllerNames.
ReadVRGenericTracker Function
string name)Read the current state of a named VR generic tracked. If no name is passed, default is implied.
Reflect Function
Return the input vector reflected around the specified normal.
Refract Function
Return the input vector refracted around the provided surface normal.
k_in: IOR of the medium the vector is exiting.k_out: IOR of the medium the vector is entering.
RemoveAssetsFolder Function
null RemoveAssetsFolder(string path)Remove a folder from the assets system.
See Resources & Assets.
RemoveAssetsPackage Function
null RemoveAssetsPackage(string path)Remove a package from the assets system.
See Resources & Assets.
RenderInit Function
bool RenderInit(Window window)integer width, integer height, ResetFlags reset_flags, TextureFormat format, DebugFlags debug_flags)integer width, integer height, RendererType type, ResetFlags reset_flags, TextureFormat format)integer width, integer height, RendererType type, ResetFlags reset_flags, TextureFormat format, DebugFlags debug_flags)string window_title, integer width, integer height, ResetFlags reset_flags, TextureFormat format)string window_title, integer width, integer height, ResetFlags reset_flags, TextureFormat format, DebugFlags debug_flags)string window_title, integer width, integer height, RendererType type, ResetFlags reset_flags)string window_title, integer width, integer height, RendererType type, ResetFlags reset_flags, TextureFormat format)string window_title, integer width, integer height, RendererType type, ResetFlags reset_flags, TextureFormat format, DebugFlags debug_flags)Initialize the render system.
To change the states of the render system afterward use RenderReset.
RenderReset Function
null RenderReset(integer width, integer height)Change the states of the render system at runtime.
RenderResetToWindow Function
bool, integer, integer RenderResetToWindow(Window win, integer width, integer height, integer reset_flags)Resize the renderer backbuffer to the provided window client area dimensions. Return true if a reset was needed and carried out.
RenderShutdown Function
null RenderShutdown()Shutdown the render system.
ResetClock Function
null ResetClock()Reset the elapsed time counter.
Reverse Function
Return the provided vector pointing in the opposite direction.
ReverseRotationOrder Function
Return the rotation order processing each axis in the reverse order of the input rotation order.
Rewind Function
null Rewind(File file)Rewind the read/write cursor of an open file.
RGBA32 Function
integer RGBA32(integer r, integer g, integer b)integer RGBA32(integer r, integer g, integer b, integer a)Create a 32 bit integer RGBA color.
RmDir Function
bool RmDir(string path)Remove an empty folder on the local filesystem.
See RmTree.
RmTree Function
bool RmTree(string path)Remove a folder on the local filesystem.
Warning: This function will through all subfolders and erase all files and folders in the target folder.
RotationMat2D Function
Return a 2D rotation matrix by a radians around the specified pivot point.
RotationMat3 Function
Return a 3x3 rotation matrix.
RotationMat4 Function
Return a 4x3 rotation matrix from euler angles. The default rotation order is YXZ.
RotationMatX Function
float angle)Return a 3x3 rotation matrix around the world X axis {1, 0, 0}.
RotationMatXY Function
Return a 3x3 rotation matrix around the X axis followed by a rotation around the Y axis.
RotationMatXYZ Function
Return a 3x3 rotation matrix around the X axis followed by a rotation around the Y axis then a rotation around the Z axis.
RotationMatXZY Function
Return a 3x3 rotation matrix around the X axis followed by a rotation around the Z axis then a rotation around the Y axis.
RotationMatY Function
float angle)Return a 3x3 rotation matrix around the world Y axis {0, 1, 0}.
RotationMatYXZ Function
Return a 3x3 rotation matrix around the Y axis followed by a rotation around the X axis then a rotation around the Z axis.
RotationMatYZX Function
Return a 3x3 rotation matrix around the Y axis followed by a rotation around the Z axis then a rotation around the X axis.
RotationMatZ Function
float angle)Return a 3x3 rotation matrix around the world Z axis {0, 0, 1}.
RotationMatZXY Function
Return a 3x3 rotation matrix around the Z axis followed by a rotation around the X axis then a rotation around the Y axis.
RotationMatZYX Function
Return a 3x3 rotation matrix around the Z axis followed by a rotation around the Y axis then a rotation around the X axis.
SaveBMP Function
SaveDataToFile Function
SaveFileDialog Function
Open a native SaveFile dialog.
SaveForwardPipelineAAAConfigToFile Function
SaveGeometryToFile Function
Save a geometry to the local filesystem.
Note that in order to render a geometry it must have been converted to model by the asset compiler.
See GeometryBuilder and ModelBuilder.
SaveJsonToFile Function
Save a JSON object to the local filesystem.
SavePNG Function
SaveSceneBinaryToData Function
bool SaveSceneBinaryToData(Data data, Scene scene, PipelineResources resources, LoadSaveSceneFlags flags)SaveSceneBinaryToFile Function
bool SaveSceneBinaryToFile(string path, Scene scene, PipelineResources resources, LoadSaveSceneFlags flags)SaveSceneJsonToFile Function
bool SaveSceneJsonToFile(string path, Scene scene, PipelineResources resources, LoadSaveSceneFlags flags)SaveTGA Function
ScaleMat3 Function
Return a 3x3 scale matrix from a 2D vector.
ScaleMat4 Function
float scale)Return a 4x3 scale matrix from the parameter scaling vector.
SceneClearSystems Function
null SceneClearSystems(Scene scene)Clear scene and all optional systems.
SceneGarbageCollectSystems Function
integer SceneGarbageCollectSystems(Scene scene)Garbage collect a scene and all its optional systems.
SceneSyncToSystemsFromAssets Function
Synchronize optional systems (eg. physics or script) states with the scene states. Load resources from the assets system if required.
See Resources & Assets.
SceneSyncToSystemsFromFile Function
Synchronize optional systems (eg. physics or script) states with the scene states. Load resources from the local filesystem if required.
See Resources & Assets.
SceneUpdateSystems Function
null SceneUpdateSystems(Scene scene, SceneClocks clocks, integer dt, ScenePhysics physics, integer step, integer max_physics_step)null SceneUpdateSystems(Scene scene, SceneClocks clocks, integer dt, ScenePhysics physics, integer step, integer max_physics_step, SceneLuaVM vm)null SceneUpdateSystems(Scene scene, SceneClocks clocks, integer dt, ScenePhysics physics, NodePairContacts contacts, integer step, integer max_physics_step)null SceneUpdateSystems(Scene scene, SceneClocks clocks, integer dt, ScenePhysics physics, NodePairContacts contacts, integer step, integer max_physics_step, SceneLuaVM vm)null SceneUpdateSystems(Scene scene, SceneClocks clocks, integer dt, SceneBullet3Physics physics, integer step, integer max_physics_step)null SceneUpdateSystems(Scene scene, SceneClocks clocks, integer dt, SceneBullet3Physics physics, integer step, integer max_physics_step, SceneLuaVM vm)null SceneUpdateSystems(Scene scene, SceneClocks clocks, integer dt, SceneBullet3Physics physics, NodePairContacts contacts, integer step, integer max_physics_step)null SceneUpdateSystems(Scene scene, SceneClocks clocks, integer dt, SceneBullet3Physics physics, NodePairContacts contacts, integer step, integer max_physics_step, SceneLuaVM vm)Update a scene and all its optional systems.
ScreenSpaceToClipSpace Function
Transform a screen position to clip space.
Sec Function
float Sec(float seconds)Convert a value in seconds to the Harfang internal unit system.
Seed Function
null Seed(integer seed)Set the starting seed of the pseudo-random number generator.
Seek Function
Move the handle cursor to a specific position in the file.
SendVRControllerHapticPulse Function
null SendVRControllerHapticPulse(integer duration)null SendVRControllerHapticPulse(integer duration, string name)Send an haptic pulse to a named VR controller.
See GetVRControllerNames.
SetAxises Function
Inject X, Y and Z axises into a 3x3 matrix.
SetColumn Function
Returns the nth column.
SetHeight Function
Set a rectangle height.
SetJsonValue Function
Set a JSON key value.
SetListener Function
Set the listener transformation and velocity for spatialization by the audio system.
SetLogDetailed Function
null SetLogDetailed(bool is_detailed)Display the details field of log outputs.
SetLogLevel Function
null SetLogLevel(LogLevel log_level)SetMaterialAlphaCut Function
SetMaterialAmbientUsesUV1 Function
SetMaterialBlendMode Function
Set material blend mode.
SetMaterialDepthTest Function
Set material depth test.
SetMaterialDiffuseUsesUV1 Function
SetMaterialFaceCulling Function
Set material face culling.
SetMaterialNormalMapInWorldSpace Function
SetMaterialProgram Function
Set material pipeline program.
You should call UpdateMaterialPipelineProgramVariant after changing a material pipeline program so that the correct variant is selected according to the material states.
SetMaterialSkinning Function
SetMaterialSpecularUsesUV1 Function
SetMaterialTexture Function
Set a material uniform texture and texture stage.
Note: The texture stage specified should match the uniform declaration in the shader program.
SetMaterialTextureRef Function
Set a material uniform texture reference.
See PipelineResources.
SetMaterialValue Function
Set a material uniform value.
SetMaterialWriteRGBA Function
Set a material color write mask.
SetMaterialWriteZ Function
Set a material depth write mask.
SetRenderDebug Function
null SetRenderDebug(DebugFlags flags)Set render system debug flags.
SetRow Function
Sets the nth row of a matrix.
SetS Function
Shortcut for SetScale.
SetSaturation Function
SetScale Function
Set the scaling part of the transformation matrix.
SetSourcePanning Function
Set a playing audio source panning.
SetSourceRepeat Function
Set audio source repeat mode.
SetSourceTimecode Function
Set timecode of the audio source.
SetSourceTransform Function
Set a playing spatialized audio source transformation.
SetSourceVolume Function
Set audio source volume.
SetT Function
Shortcut for SetTranslation.
SetTransform Function
null SetTransform(Mat4 mtx)Set the model matrix for the next drawn primitive.
If not called, model will be rendered with the identity model matrix.
SetTranslation Function
Sets the 2D translation part, i.e. the first 2 elements of the last matrix row.
SetView2D Function
null SetView2D(integer id, integer x, integer y, integer res_x, integer res_y)null SetView2D(integer id, integer x, integer y, integer res_x, integer res_y, float znear, float zfar)null SetView2D(integer id, integer x, integer y, integer res_x, integer res_y, float znear, float zfar, ClearFlags flags, Color color, float depth, integer stencil)null SetView2D(integer id, integer x, integer y, integer res_x, integer res_y, float znear, float zfar, ClearFlags flags, Color color, float depth, integer stencil, bool y_up)High-level wrapper function to setup a view for 2D rendering.
This function calls SetViewClear, SetViewRect then SetViewTransform.
SetViewClear Function
Set a view clear parameters.
See Drawing to Views.
SetViewFrameBuffer Function
Set view output framebuffer.
See Drawing to Views.
SetViewMode Function
Set view draw ordering mode.
SetViewOrthographic Function
null SetViewOrthographic(integer id, integer x, integer y, integer res_x, integer res_y, Mat4 world)null SetViewOrthographic(integer id, integer x, integer y, integer res_x, integer res_y, Mat4 world, float znear, float zfar)null SetViewOrthographic(integer id, integer x, integer y, integer res_x, integer res_y, Mat4 world, float znear, float zfar, float size)null SetViewOrthographic(integer id, integer x, integer y, integer res_x, integer res_y, Mat4 world, float znear, float zfar, float size, ClearFlags flags, Color color, float depth, integer stencil)High-level wrapper function to setup a view for 3D orthographic rendering.
This function calls SetViewClear, SetViewRect then SetViewTransform.
SetViewPerspective Function
null SetViewPerspective(integer id, integer x, integer y, integer res_x, integer res_y, Mat4 world, float znear, float zfar)null SetViewPerspective(integer id, integer x, integer y, integer res_x, integer res_y, Mat4 world, float znear, float zfar, float zoom_factor)null SetViewPerspective(integer id, integer x, integer y, integer res_x, integer res_y, Mat4 world, float znear, float zfar, float zoom_factor, ClearFlags flags, Color color, float depth, integer stencil)High-level wrapper function to setup a view for 3D perspective rendering.
This function calls SetViewClear, SetViewRect then SetViewTransform.
SetViewRect Function
null SetViewRect(integer view_id, integer x, integer y, integer w, integer h)SetViewTransform Function
Set view transforms, namely the view and projection matrices.
SetWidth Function
Set a rectangle width.
SetWindowClientSize Function
Set the window client size. The client area of a window excludes its decoration.
SetWindowPos Function
Set window position.
SetWindowTitle Function
Set window title.
SetX Function
Sets the first row.
SetY Function
Sets the second row.
SetZ Function
Sets the third row.
ShowCursor Function
null ShowCursor()Show the system mouse cursor.
See HideCursor.
Sign Function
Returns a vector whose elements are -1 if the corresponding vector element is < 0 and 1 if it's >= 0.
SkipClock Function
null SkipClock()Skip elapsed time since the last call to TickClock.
Sleep Function
null Sleep(integer duration)Sleep the caller thread, this function will resume execution after waiting for at least the specified amount of time.
Slerp Function
Interpolate between the rotation represented by two quaternions. The Spherical Linear Interpolation will always take the shortest path between the two rotations.
SRanipalGetState Function
Return the current SRanipal device state.
SRanipalInit Function
bool SRanipalInit()Initial the SRanipal eye detection SDK.
SRanipalIsViveProEye Function
bool SRanipalIsViveProEye()Return true if the eye detection device in use is Vive Pro Eye.
SRanipalLaunchEyeCalibration Function
null SRanipalLaunchEyeCalibration()Launch the eye detection calibration sequence.
SRanipalShutdown Function
null SRanipalShutdown()Shutdown the SRanipal eye detection SDK.
StopAllSources Function
null StopAllSources()Stop all playing audio sources.
StopSource Function
null StopSource(SourceRef source)Stop a playing audio source.
StreamAudioFileSpatialized Function
string path, SpatializedSourceState state)StreamAudioFileStereo Function
StreamModuleFileSpatialized Function
StreamModuleFileStereo Function
StreamOGGAssetSpatialized Function
StreamOGGAssetStereo Function
StreamOGGFileSpatialized Function
StreamOGGFileStereo Function
StreamWAVAssetSpatialized Function
Start an audio stream from a WAV file from the assets system.
See SetSourceTransform and Resources & Assets.
StreamWAVAssetStereo Function
Start an audio stream from a WAV file from the assets system.
See Resources & Assets.
StreamWAVFileSpatialized Function
Start an audio stream from a WAV file on the local filesystem.
See SetSourceTransform.
StreamWAVFileStereo Function
Start an audio stream from a WAV file on the local filesystem.
See Resources & Assets.
StringToFile Function
bool StringToFile(string path, string value)Return the content of a file on the local filesystem as a string.
SubmitSceneToForwardPipeline Function
integer SubmitSceneToForwardPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, SceneForwardPipelineRenderData render_data, PipelineResources resources)integer SubmitSceneToForwardPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, SceneForwardPipelineRenderData render_data, PipelineResources resources, FrameBufferHandle frame_buffer)integer SubmitSceneToForwardPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, SceneForwardPipelineRenderData render_data, PipelineResources resources, FrameBufferHandle frame_buffer, string debug_name)integer SubmitSceneToForwardPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, SceneForwardPipelineRenderData render_data, PipelineResources resources, SceneForwardPipelinePassViewId views, ForwardPipelineAAA aaa, ForwardPipelineAAAConfig aaa_config, integer frame)integer SubmitSceneToForwardPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, SceneForwardPipelineRenderData render_data, PipelineResources resources, SceneForwardPipelinePassViewId views, ForwardPipelineAAA aaa, ForwardPipelineAAAConfig aaa_config, integer frame, FrameBufferHandle frame_buffer)integer SubmitSceneToForwardPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, SceneForwardPipelineRenderData render_data, PipelineResources resources, SceneForwardPipelinePassViewId views, ForwardPipelineAAA aaa, ForwardPipelineAAAConfig aaa_config, integer frame, FrameBufferHandle frame_buffer, string debug_name)Submit a scene to a forward pipeline.
See PrepareSceneForwardPipelineCommonRenderData and PrepareSceneForwardPipelineViewDependentRenderData if you need to render the same scene from different points of view.
SubmitSceneToPipeline Function
integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, PipelineResources resources)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, PipelineResources resources, FrameBufferHandle fb)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, PipelineResources resources, FrameBufferHandle fb, string debug_name)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, bool fov_axis_is_horizontal, ForwardPipeline pipeline, PipelineResources resources)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, bool fov_axis_is_horizontal, ForwardPipeline pipeline, PipelineResources resources, FrameBufferHandle fb)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, bool fov_axis_is_horizontal, ForwardPipeline pipeline, PipelineResources resources, FrameBufferHandle fb, string debug_name)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, PipelineResources resources, ForwardPipelineAAA aaa, ForwardPipelineAAAConfig aaa_config, integer frame)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, PipelineResources resources, ForwardPipelineAAA aaa, ForwardPipelineAAAConfig aaa_config, integer frame, FrameBufferHandle frame_buffer)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, ViewState view_state, ForwardPipeline pipeline, PipelineResources resources, ForwardPipelineAAA aaa, ForwardPipelineAAAConfig aaa_config, integer frame, FrameBufferHandle frame_buffer, string debug_name)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, bool fov_axis_is_horizontal, ForwardPipeline pipeline, PipelineResources resources, ForwardPipelineAAA aaa, ForwardPipelineAAAConfig aaa_config, integer frame)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, bool fov_axis_is_horizontal, ForwardPipeline pipeline, PipelineResources resources, ForwardPipelineAAA aaa, ForwardPipelineAAAConfig aaa_config, integer frame, FrameBufferHandle frame_buffer)integer SubmitSceneToPipeline(integer view_id, Scene scene, IntRect rect, bool fov_axis_is_horizontal, ForwardPipeline pipeline, PipelineResources resources, ForwardPipelineAAA aaa, ForwardPipelineAAAConfig aaa_config, integer frame, FrameBufferHandle frame_buffer, string debug_name)SwapFileExtension Function
string SwapFileExtension(string path, string ext)Return the input file path with its extension replaced.
Tell Function
integer Tell(File file)Return the current handle cursor position in bytes.
TestVisibility Function
Test if a list of 3d points are inside or outside a Frustum.
TickClock Function
integer TickClock()Advance the engine clock and return the elapsed time since the last call to this function. See GetClock to retrieve the current clock.
See GetClockDt.
time_from_day Function
integer time_from_day(integer day)Convert days to time.
time_from_hour Function
integer time_from_hour(integer hour)Convert hours to time.
time_from_min Function
integer time_from_min(integer min)Convert minutes to time.
time_from_ms Function
integer time_from_ms(integer ms)Convert milliseconds to time.
time_from_ms_f Function
integer time_from_ms_f(float ms)Convert milliseconds to time.
time_from_ns Function
integer time_from_ns(integer ns)Convert nanoseconds to time.
time_from_sec Function
integer time_from_sec(integer sec)Convert seconds to time.
time_from_sec_f Function
integer time_from_sec_f(float sec)Convert fractional seconds to time.
time_from_us Function
integer time_from_us(integer us)Convert microseconds to time.
time_from_us_f Function
integer time_from_us_f(float us)Convert fractional microseconds to time.
time_now Function
integer time_now()Return the current system time.
time_to_day Function
integer time_to_day(integer t)Convert time to days.
time_to_hour Function
integer time_to_hour(integer t)Convert time to hours.
time_to_min Function
integer time_to_min(integer t)Convert time to minutes.
time_to_ms Function
integer time_to_ms(integer t)Convert time to milliseconds.
time_to_ms_f Function
float time_to_ms_f(integer t)Convert time to miliseconds.
time_to_ns Function
integer time_to_ns(integer t)Convert time to nanoseconds.
time_to_sec Function
integer time_to_sec(integer t)Convert time to seconds.
time_to_sec_f Function
float time_to_sec_f(integer t)Convert time to fractional seconds.
time_to_string Function
string time_to_string(integer t)Return time as a human-readable string.
time_to_us Function
integer time_to_us(integer t)Convert time to microseconds.
time_to_us_f Function
float time_to_us_f(integer t)Convert time to fractional microseconds.
ToEuler Function
Convert a quaternion rotation to its Euler vector representation.
ToFloatRect Function
Return an integer rectangle as a floating point rectangle.
ToHLS Function
Convert input RGBA color to hue/luminance/saturation, alpha channel is left unmodified.
ToIntRect Function
Return a floating point rectangle as an integer rectangle.
ToMatrix3 Function
Convert a quaternion rotation to its Mat3 representation.
Touch Function
null Touch(integer view_id)Submit an empty primitive to the view.
See Frame.
TransformationMat4 Function
Creates a 4x3 transformation matrix from the translation vector p, the 3x3 rotation Matrix m (or YXZ euler rotation vector e) and the scaling vector s.
This is a more efficient version of TranslationMat4(p) * ScaleMat4(s) * m
TransformFrustum Function
Return the input frustum transformed by the provided world matrix.
TranslationMat3 Function
Return a 2D translation 3x3 matrix from the first 2 components (x,y) of the parameter vector.
TranslationMat4 Function
Return a 4x3 translation matrix from the parameter displacement vector.
Transpose Function
Return the transpose of the input matrix.
For a pure rotation matrix this returns the opposite transformation so that M*MT=I.
Union Function
Compute the union of this bounding volume with another volume or a 3d position.
Unlink Function
bool Unlink(string path)Remove a file from the local filesystem.
UnloadSound Function
null UnloadSound(SoundRef snd)Unload a sound from the audio system.
UnprojectFromClipSpace Function
Unproject a clip space position to view space.
UnprojectFromScreenSpace Function
Unproject a screen space position to view space.
UnprojectOrthoFromClipSpace Function
UnprojectOrthoFromScreenSpace Function
UpdateMaterialPipelineProgramVariant Function
Select the proper pipeline program variant for the current material state.
UpdateTexture Function
bool, Texture, iVec2, TextureFormat UpdateTexture(IVideoStreamer streamer, integer handle, Texture texture, iVec2 size, TextureFormat format)bool, Texture, iVec2, TextureFormat UpdateTexture(IVideoStreamer streamer, integer handle, Texture texture, iVec2 size, TextureFormat format, bool destroy)UpdateTextureFromPicture Function
Update texture content from the provided picture.
Note: The picture is expected to be in a format compatible with the texture format.
UpdateWindow Function
bool UpdateWindow(Window window)Update a window on the host system.
Vec3I Function
Create a vector from integer values in the [0;255] range.
Vec4I Function
Create a vector from integer values in the [0;255] range.
VectorMat3 Function
Return a vector as a matrix.
VertexLayoutPosFloatColorFloat Function
VertexLayoutPosFloatColorUInt8 Function
VertexLayoutPosFloatNormFloat Function
Simple vertex layout with float position and normal.
vtx_layout = VertexLayout()
vtx_layout.Begin()
vtx_layout.Add(hg.A_Position, 3, hg.AT_Float)
vtx_layout.Add(hg.A_Normal, 3, hg.AT_Float)
vtx_layout.End()
VertexLayoutPosFloatNormUInt8 Function
Simple vertex layout with float position and 8-bit unsigned integer normal.
vtx_layout = VertexLayout()
vtx_layout.Begin()
vtx_layout.Add(hg.A_Position, 3, hg.AT_Float)
vtx_layout.Add(hg.A_Normal, 3, hg.AT_Uint8, True, True)
vtx_layout.End()
VertexLayoutPosFloatNormUInt8TexCoord0UInt8 Function
VertexLayoutPosFloatTexCoord0UInt8 Function
Warn Function
null Warn(string msg)null Warn(string msg, string details)WindowHasFocus Function
bool WindowHasFocus(Window window)Return true if the provided window has focus, false otherwise.
WindowSystemInit Function
null WindowSystemInit()Initialize the Window system.
WindowSystemShutdown Function
null WindowSystemShutdown()Shutdown the window system.
See WindowSystemInit.
Wrap Function
float Wrap(float v, float start, float end)integer Wrap(integer v, integer start, integer end)Wrap the input value so that it fits in the specified inclusive range.
WriteFloat Function
Write a binary 32 bit floating point value to a file.
WriteString Function
Write a string to a file as 32 bit integer size followed by the string content in UTF8.
WriteUInt16 Function
Write a binary 16 bit unsigned integer to a file.
WriteUInt32 Function
Write a binary 32 bit unsigned integer to a file.
WriteUInt8 Function
Write a binary 8 bit unsigned integer to a file.
ZoomFactorToFov Function
float ZoomFactorToFov(float zoom_factor)Convert from a zoom factor value in meters to a fov value in radian.