API Functions Python
Abs Function
float) -> floatint) -> intReturn 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
str) -> boolMount a local filesystem folder as an assets source.
See Resources & Assets.
AddAssetsPackage Function
str) -> boolMount 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
int, rect: IntRect, input: Texture, output: FrameBufferHandle, bloom: Bloom, threshold: float, smoothness: float, intensity: float) -> intProcess 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
int, g: int, b: int) -> intint, g: int, b: int, a: int) -> intCreate a 32 bit integer ARGB color.
ARGB32ToRGBA32 Function
int) -> intConvert a 32 bit integer ARGB color to RGBA.
AudioInit Function
boolInitialize the audio system.
AudioShutdown Function
NoneShutdown 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
str) -> intstr, section_details: str) -> intBegin 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
int, resources: PipelineResources, tex: TextureRef, read_back: Texture, pic: Picture) -> int, intCapture 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, min: float, max: float) -> floatint, min: int, max: int) -> intReturn 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
str) -> strCleanup 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
boolClose a file handle.
Cm Function
float) -> floatConvert a value in centimeters to the Harfang internal unit system.
ColorFromABGR32 Function
int) -> ColorCreate a color from a 32 bit ABGR integer.
ColorFromRGBA32 Function
int) -> ColorCreate 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
intReturn a 32 bit ABGR integer from a color.
ColorToGrayscale Function
floatReturn the grayscale representation of a color. A weighted average is used to account for human perception of colors.
ColorToRGBA32 Function
intReturn a 32 bit RGBA integer from a color.
Compute2DProjectionMatrix Function
float, zfar: float, res_x: float, res_y: float, y_up: bool) -> Mat44Returns 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, zfar: float, size: float, aspect_ratio: Vec2) -> Mat44float, zfar: float, size: float, aspect_ratio: Vec2, offset: Vec2) -> Mat44Compute 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, znear: float, zfar: float, aspect_ratio: Vec2) -> ViewStateCompute 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, zfar: float, zoom_factor: float, aspect_ratio: Vec2) -> Mat44float, zfar: float, zoom_factor: float, aspect_ratio: Vec2, offset: Vec2) -> Mat44Compute a perspective projection matrix, , fov is the field of view angle, see Deg and Rad.
See ZoomFactorToFov, FovToZoomFactor, ComputeAspectRatioX and ComputeAspectRatioY.
ComputePerspectiveViewState Function
float, znear: float, zfar: float, aspect_ratio: Vec2) -> ViewStateCompute a perspective view state.
See ComputePerspectiveProjectionMatrix, ZoomFactorToFov, FovToZoomFactor, ComputeAspectRatioX and ComputeAspectRatioY.
ComputeRenderState Function
bool) -> RenderStatebool, write_r: bool) -> RenderStatebool, write_r: bool, write_g: bool) -> RenderStatebool, write_r: bool, write_g: bool, write_b: bool) -> RenderStatebool, write_r: bool, write_g: bool, write_b: bool, write_a: bool) -> RenderStatebool, write_r: bool, write_g: bool, write_b: bool) -> RenderStatebool, write_r: bool, write_g: bool, write_b: bool, write_a: bool) -> RenderStateCompute 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
float) -> intCompute 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, height: float, max_acceleration: float, max_speed: float, collision_query_range: float, path_optimization_range: float, separation_weight: float) -> CrowdAgentParamsCreate 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
str, dst: str) -> boolCopy a directory on the local filesystem, this function does not recurse through subdirectories.
See CopyDirRecursive.
CopyDirRecursive Function
str, dst: str) -> boolCopy a directory on the local filesystem, recurse through subdirectories.
CopyFile Function
str, dst: str) -> boolCopy a file on the local filesystem.
CosineInterpolate Function
float, y1: float, t: float) -> floatCompute the cosine interpolated value between y0 and y1 at t.
See LinearInterpolate, CubicInterpolate and HermiteInterpolate.
CreateBloomFromAssets Function
CreateBloomFromFile Function
CreateCamera Function
CreateCapsuleModel Function
float, height: float, subdiv_x: int, subdiv_y: int) -> ModelCreate 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
int) -> ForwardPipelineCreate a forward pipeline and its resources.
CreateForwardPipelineAAAFromAssets Function
str, config: ForwardPipelineAAAConfig) -> ForwardPipelineAAAstr, config: ForwardPipelineAAAConfig, ssgi_ratio: BackbufferRatio) -> ForwardPipelineAAAstr, config: ForwardPipelineAAAConfig, ssgi_ratio: BackbufferRatio, ssr_ratio: BackbufferRatio) -> ForwardPipelineAAACreateForwardPipelineAAAFromFile Function
str, config: ForwardPipelineAAAConfig, ssgi_ratio: BackbufferRatio) -> ForwardPipelineAAAstr, config: ForwardPipelineAAAConfig, ssgi_ratio: BackbufferRatio, ssr_ratio: BackbufferRatio) -> ForwardPipelineAAACreateFrameBuffer Function
int, name: str) -> FrameBufferint, height: int, color_format: TextureFormat, depth_format: TextureFormat, aa: int, name: str) -> FrameBufferCreate a framebuffer and its texture attachments.
See DestroyFrameBuffer.
CreateInstanceFromAssets Function
str, resources: PipelineResources, pipeline: PipelineInfo) -> Node, boolstr, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> Node, boolHelper 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
str, resources: PipelineResources, pipeline: PipelineInfo) -> Node, boolstr, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> Node, boolHelper 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) -> Nodefloat, shadow_type: LightShadowType) -> Nodefloat, shadow_type: LightShadowType, shadow_bias: float, pssm_split: Vec4) -> Nodefloat, specular: Color) -> Nodefloat, specular: Color, specular_intensity: float) -> Nodefloat, specular: Color, specular_intensity: float, priority: float) -> Nodefloat, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType) -> NodeCreateMaterial Function
str, value_0: Vec4, value_name_1: str, value_1: Vec4) -> MaterialHelper 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, mtx: Mat4, model_ref: ModelRef, materials: MaterialList) -> Nodefloat, mtx: Mat4, model_ref: ModelRef, materials: MaterialList, mass: float) -> NodeCreatePlaneModel Function
float, length: float, subdiv_x: int, subdiv_z: int) -> ModelCreate a plane render model.
CreatePointLight Function
float, diffuse: Color, specular: Color, priority: float) -> Nodefloat, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType) -> Nodefloat, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType, shadow_bias: float) -> Nodefloat, diffuse: Color, diffuse_intensity: float) -> Nodefloat, diffuse: Color, diffuse_intensity: float, specular: Color) -> Nodefloat, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float) -> Nodefloat, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float) -> Nodefloat, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType) -> NodeCreateSAOFromAssets 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, inner_angle: float, outer_angle: float) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color, priority: float) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType, shadow_bias: float) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType, shadow_bias: float, shadow_near: float) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType, shadow_bias: float, shadow_near: float, shadow_far: float) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, diffuse_intensity: float) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, diffuse_intensity: float, specular: Color) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType, shadow_bias: float) -> Nodefloat, inner_angle: float, outer_angle: float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType, shadow_bias: float, shadow_near: float) -> NodeCreateTexture Function
int, height: int, name: str, flags: TextureFlags, format: TextureFormat) -> TextureCreate an empty texture.
CreateTextureFromPicture Function
str, flags: TextureFlags, format: TextureFormat) -> TextureCreate 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, y1: float, y2: float, y3: float, t: float) -> floatPerform a cubic interpolation across four values with t in the [0;1] range between y1 and y2.
See LinearInterpolate, CosineInterpolate and HermiteInterpolate.
CutFileExtension Function
str) -> strReturn a file path with its extension stripped.
See CutFilePath and CutFileName.
CutFileName Function
str) -> strReturn the name part of a file path. All folder navigation and extension are stripped.
See CutFileExtension and CutFilePath.
CutFilePath Function
str) -> strReturn the folder navigation part of a file path. The file name and its extension are stripped.
See CutFileExtension and CutFileName.
Debug Function
str) -> Nonestr, details: str) -> NoneDebugSceneExplorer Function
Decompose Function
Decompose a transformation matrix into its translation, scaling and rotation components.
Deg Function
float) -> floatConvert 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) -> floatConvert an angle in degrees to radians.
DestroyBloom Function
NoneDestroy a bloom post process object and all associated resources.
DestroyForwardPipeline Function
NoneDestroy a forward pipeline object.
DestroyForwardPipelineAAA Function
NoneDestroyFrameBuffer Function
NoneDestroy a frame buffer and its resources.
DestroyProgram Function
NoneDestroy a shader program.
DestroySAO Function
NoneDestroy an ambient occlusion post process object and its resources.
DestroyTexture Function
NoneDestroy a texture object.
DestroyWindow Function
boolDestroy a window object.
Det Function
floatReturn the determinant of a matrix.
DisableCursor Function
NoneDist 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
int, vtx: Vertices, prg: ProgramHandle, render_state: RenderState, depth: int) -> Noneint, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList) -> Noneint, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, render_state: RenderState) -> Noneint, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, render_state: RenderState, depth: int) -> Noneint, idx: UInt16List, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList) -> Noneint, idx: UInt16List, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, render_state: RenderState) -> Noneint, idx: UInt16List, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, render_state: RenderState, depth: int) -> NoneDraw a list of lines to the specified view.
Use UniformSetValueList and UniformSetTextureList to pass uniform values to the shader program.
DrawModel Function
int, mdl: Model, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, matrix: Mat4) -> Noneint, mdl: Model, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, matrix: Mat4, render_state: RenderState) -> Noneint, mdl: Model, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, matrix: Mat4, render_state: RenderState, depth: int) -> Noneint, mdl: Model, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, matrices: Mat4List) -> Noneint, mdl: Model, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, matrices: Mat4List, render_state: RenderState) -> Noneint, mdl: Model, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, matrices: Mat4List, render_state: RenderState, depth: int) -> NoneDraw a model to the specified view.
Use UniformSetValueList and UniformSetTextureList to pass uniform values to the shader program.
DrawSprites Function
int, inv_view_R: Mat3, vtx_layout: VertexLayout, pos: Vec3List, size: Vec2, prg: ProgramHandle) -> Noneint, inv_view_R: Mat3, vtx_layout: VertexLayout, pos: Vec3List, size: Vec2, prg: ProgramHandle, state: RenderState) -> Noneint, inv_view_R: Mat3, vtx_layout: VertexLayout, pos: Vec3List, size: Vec2, prg: ProgramHandle, state: RenderState, depth: int) -> Noneint, inv_view_R: Mat3, vtx_layout: VertexLayout, pos: Vec3List, size: Vec2, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList) -> Noneint, inv_view_R: Mat3, vtx_layout: VertexLayout, pos: Vec3List, size: Vec2, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, state: RenderState) -> Noneint, inv_view_R: Mat3, vtx_layout: VertexLayout, pos: Vec3List, size: Vec2, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, state: RenderState, depth: int) -> NoneDraw 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
int, font: Font, text: str, prg: ProgramHandle, page_uniform: str, page_stage: int, mtx: Mat4) -> Noneint, font: Font, text: str, prg: ProgramHandle, page_uniform: str, page_stage: int, mtx: Mat4, pos: Vec3) -> Noneint, font: Font, text: str, prg: ProgramHandle, page_uniform: str, page_stage: int, mtx: Mat4, pos: Vec3, halign: DrawTextHAlign, valign: DrawTextVAlign) -> Noneint, font: Font, text: str, prg: ProgramHandle, page_uniform: str, page_stage: int, mtx: Mat4, pos: Vec3, halign: DrawTextHAlign, valign: DrawTextVAlign, values: UniformSetValueList, textures: UniformSetTextureList) -> Noneint, font: Font, text: str, prg: ProgramHandle, page_uniform: str, page_stage: int, mtx: Mat4, pos: Vec3, halign: DrawTextHAlign, valign: DrawTextVAlign, values: UniformSetValueList, textures: UniformSetTextureList, state: RenderState) -> Noneint, font: Font, text: str, prg: ProgramHandle, page_uniform: str, page_stage: int, mtx: Mat4, pos: Vec3, halign: DrawTextHAlign, valign: DrawTextVAlign, values: UniformSetValueList, textures: UniformSetTextureList, state: RenderState, depth: int) -> NoneWrite text to the specified view using the provided shader program and uniform values.
DrawTriangles Function
int, vtx: Vertices, prg: ProgramHandle, state: RenderState, depth: int) -> Noneint, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList) -> Noneint, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, state: RenderState) -> Noneint, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, state: RenderState, depth: int) -> Noneint, idx: UInt16List, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList) -> Noneint, idx: UInt16List, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, state: RenderState) -> Noneint, idx: UInt16List, vtx: Vertices, prg: ProgramHandle, values: UniformSetValueList, textures: UniformSetTextureList, state: RenderState, depth: int) -> NoneDraw 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
int) -> NoneEnd a named profiler section. Call BeginProfilerSection to begin a new section.
Error Function
str) -> Nonestr, details: str) -> NoneExists Function
str) -> boolReturn 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
str) -> strReturn the input path with all redundant navigation entries stripped (folder separator, .. and . entries).
FileToString Function
str) -> strReturn 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) -> floatConvert from a fov value in radian to a zoom factor value in meters.
FpsController Function
bool, key_down: bool, key_left: bool, key_right: bool, btn: bool, dx: float, dy: float, pos: Vec3, rot: Vec3, speed: float, dt_t: int) -> Nonefloat, dt: int) -> NoneImplement 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
intAdvance 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
floatfloat) -> floatReturn 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
floatfloat) -> floatfloat, range_end: float) -> floatReturn 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
floatReturn the area of the volume.
GetCenter Function
Return the center position of the volume.
GetClock Function
intReturn 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
intReturn the elapsed time recorded during the last call to TickClock.
GetColorTexture Function
Retrieves color texture attachment.
GetColumn Function
Returns the nth column.
GetCurrentWorkingDirectory Function
strReturn the system current working directory.
GetDepthTexture Function
Retrieves depth texture attachment.
GetFileExtension Function
str) -> strReturn the extension part of a file path.
GetFileName Function
str) -> strReturn the name part of a file path (including its extension).
GetFilePath Function
str) -> strReturn 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
floatintReturn 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
strReturn the name for a keyboard key.
GetMaterialAlphaCut Function
boolGetMaterialAmbientUsesUV1 Function
boolGetMaterialBlendMode Function
Return a material blending mode.
GetMaterialDepthTest Function
Return a material depth test function.
GetMaterialDiffuseUsesUV1 Function
boolGetMaterialFaceCulling Function
Return a material culling mode.
GetMaterialNormalMapInWorldSpace Function
boolGetMaterialSkinning Function
boolGetMaterialSpecularUsesUV1 Function
boolGetMaterialTexture 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
boolReturn the material depth write mask.
GetMonitorModes Function
Return the list of supported monitor modes.
GetMonitorName Function
strReturn 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
intReturn the view id for a scene forward pipeline pass id.
GetScenePhysicsBackendName Function
strGetSize Function
intReturn the size in bytes of a local file.
GetSourceDuration Function
intReturn the duration of an audio source.
GetSourceState Function
Return the state of an audio source.
GetSourceTimecode Function
intReturn 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
strReturn 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
floatintReturn 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
floatintReturn the scaled X axis of a transformation matrix.
GetY Function
floatintReturn 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
str) -> boolTest the extension of a file path.
HermiteInterpolate Function
float, y1: float, y2: float, y3: float, t: float, tension: float, bias: float) -> floatPerform 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
NoneHide the system mouse cursor.
See ShowCursor.
ImGuiAlignTextToFramePadding Function
NoneVertically align upcoming text baseline to FramePadding y coordinate so that it will align properly to regularly framed items.
ImGuiBegin Function
str) -> boolStart a new window.
ImGuiBeginChild Function
str) -> boolBegin a scrolling region.
ImGuiBeginCombo Function
str, preview_value: str) -> boolBegin a ImGui Combo Box.
ImGuiBeginFrame Function
int, height: int, dt_clock: int, mouse: MouseState, keyboard: KeyboardState) -> Noneint, height: int, dt_clock: int, mouse: MouseState, keyboard: KeyboardState) -> NoneBegin 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
NoneLock 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
str) -> boolReturn true if popup is opened and starts outputting to it.
Note: Only call ImGuiEndPopup if this returns true.
ImGuiBeginPopupContextItem Function
str) -> boolstr, mouse_button: int) -> boolImGui helper to open and begin popup when clicked on last item.
ImGuiBeginPopupContextVoid Function
boolstr) -> boolstr, mouse_button: int) -> boolImGui helper to open and begin popup when clicked in void (where there are no ImGui windows)
ImGuiBeginPopupContextWindow Function
boolstr) -> boolImGui helper to open and begin popup when clicked on current window.
ImGuiBeginPopupModal Function
str) -> boolstr, open: bool) -> boolBegin an ImGui modal dialog.
ImGuiBeginTooltip Function
NoneUsed to create full-featured tooltip windows that aren't just text.
ImGuiBullet Function
NoneDraw a small circle and keep the cursor on the same line. Advances by the same distance as an empty ImGuiTreeNode call.
ImGuiBulletText Function
str) -> NoneDraw a bullet followed by a static text.
ImGuiButton Function
str) -> boolButton widget returning True if the button was pressed.
ImGuiCalcItemWidth Function
floatReturns the width of item given pushed settings and current cursor position.
Note: This is not necessarily the width of last item.
ImGuiCalcTextSize Function
str) -> Vec2Compute the bounding rectangle for the provided text.
ImGuiCaptureKeyboardFromApp Function
bool) -> NoneForce capture keyboard when your widget is being hovered.
ImGuiCaptureMouseFromApp Function
bool) -> NoneForce capture mouse when your widget is being hovered.
ImGuiCheckbox Function
str, value: bool) -> bool, boolDisplay 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
NoneForce a reset of the ImGui input buffer.
ImGuiCloseCurrentPopup Function
NoneClose the popup we have begin-ed into. Clicking on a menu item or selectable automatically closes the current popup.
ImGuiCollapsingHeader Function
str) -> boolstr, p_open: bool) -> bool, boolDraw 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
Noneint) -> Noneint, id: str) -> Noneint, id: str, with_border: bool) -> NoneBegin 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
Combo box widget, return the current selection index. Combo items are passed as an array of string.
ImGuiDragFloat Function
str, v: float) -> bool, floatstr, v: float, v_speed: float) -> bool, floatstr, v: float, v_speed: float, v_min: float, v_max: float) -> bool, floatDeclare 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
NoneAdd a dummy item of given size.
ImGuiEnd Function
NoneEnd the current window.
ImGuiEndChild Function
NoneEnd a scrolling region.
ImGuiEndCombo Function
NoneEnd a combo widget.
ImGuiEndFrame Function
NoneNoneint) -> NoneEnd 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
NoneEnd the current group.
ImGuiEndPopup Function
NoneEnd the current popup.
ImGuiEndTooltip Function
NoneEnd the current tooltip window.
See ImGuiBeginTooltip.
ImGuiGetColorU32 Function
intintReturn a style color component as a 32 bit unsigned integer.
See ImGuiPushStyleColor.
ImGuiGetColumnIndex Function
intReturns the index of the current column.
ImGuiGetColumnOffset Function
floatint) -> floatReturns the current column offset in pixels, from the left side of the content region.
ImGuiGetColumnsCount Function
intReturn the number of columns in the current layout section.
See ImGuiColumns.
ImGuiGetColumnWidth Function
floatint) -> floatReturns 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
floatHelper for ImGuiGetCursorPos.
ImGuiGetCursorPosY Function
floatHelper 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
floatReturn 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
intReturn the ImGui frame counter.
See ImGuiBeginFrame and ImGuiEndFrame.
ImGuiGetFrameHeightWithSpacing Function
floatReturn the following value: FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)
ImGuiGetID Function
str) -> intReturn 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
floatGet maximum scrolling amount on the horizontal axis.
ImGuiGetScrollMaxY Function
floatGet maximum scrolling amount on the vertical axis.
ImGuiGetScrollX Function
floatGet scrolling amount on the horizontal axis.
ImGuiGetScrollY Function
floatGet scrolling amount on the vertical axis.
ImGuiGetTextLineHeight Function
floatReturn the height of a text line using the current font.
See ImGuiPushFont.
ImGuiGetTextLineHeightWithSpacing Function
floatReturn the height of a text line using the current font plus vertical spacing between two layout lines.
ImGuiGetTime Function
floatReturn the current ImGui time in seconds.
ImGuiGetTreeNodeToLabelSpacing Function
floatReturn 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
floatReturn 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
floatReturn 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
floatReturn the current window width.
ImGuiImage Function
NoneDisplay a texture as an image widget.
See ImGuiImageButton.
ImGuiImageButton Function
int, bg_col: Color) -> boolint, bg_col: Color, tint_col: Color) -> boolDeclare an image button displaying the provided texture.
See ImGuiImage.
ImGuiIndent Function
Nonefloat) -> NoneMove content position toward the right.
ImGuiInit Function
float, imgui_program: ProgramHandle, imgui_image_program: ProgramHandle) -> NoneInitialize the global ImGui context. This function must be called once before any other ImGui function using the global context.
See ImGuiInitContext.
ImGuiInitContext Function
float, imgui_program: ProgramHandle, imgui_image_program: ProgramHandle) -> DearImguiContextInitialize an ImGui context. This function must be called once before any other ImGui function using the context.
See ImGuiInit.
ImGuiInputFloat Function
str, v: float) -> bool, floatstr, v: float, step: float, step_fast: float) -> bool, floatstr, v: float, step: float, step_fast: float, decimal_precision: int) -> bool, floatstr, v: float, step: float, step_fast: float, decimal_precision: int, flags: ImGuiInputTextFlags) -> bool, floatFloat field widget.
ImGuiInputInt Function
str, v: int) -> bool, intstr, v: int, step: int, step_fast: int) -> bool, intstr, v: int, step: int, step_fast: int, flags: ImGuiInputTextFlags) -> bool, intInteger field widget.
ImGuiInputIntVec2 Function
ImGuiInputText Function
str, text: str, max_size: int) -> bool, strText input widget, returns the current widget buffer content.
ImGuiInputVec2 Function
str, v: Vec2, decimal_precision: int, flags: ImGuiInputTextFlags) -> bool, Vec2Vec2 field widget.
ImGuiInputVec3 Function
str, v: Vec3, decimal_precision: int, flags: ImGuiInputTextFlags) -> bool, Vec3Vec3 field widget.
ImGuiInputVec4 Function
str, v: Vec4, decimal_precision: int, flags: ImGuiInputTextFlags) -> bool, Vec4Vec4 field widget.
ImGuiInvisibleButton Function
Invisible button widget, return True if the button was pressed.
ImGuiIsAnyItemActive Function
boolReturn true if any item is active, false otherwise.
ImGuiIsAnyItemHovered Function
boolReturn true if any item is hovered by the mouse cursor, false otherwise.
ImGuiIsItemActive Function
boolWas the last item active.
e.g. button being held, text field being edited - items that do not interact will always return false.
ImGuiIsItemClicked Function
boolint) -> boolWas the last item clicked.
ImGuiIsItemHovered Function
boolboolWas the last item hovered by mouse.
ImGuiIsItemVisible Function
boolWas the last item visible and not out of sight due to clipping/scrolling.
ImGuiIsKeyDown Function
int) -> boolWas the specified key down during the last frame?
ImGuiIsKeyPressed Function
int) -> boolint, repeat: bool) -> boolWas the specified key pressed? A key press implies that the key was down and is currently released.
ImGuiIsKeyReleased Function
int) -> boolWas the specified key released during the last frame?
ImGuiIsMouseClicked Function
int) -> boolint, repeat: bool) -> boolWas 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
int) -> boolWas 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
int) -> boolWas the specified mouse button down during the last frame?
ImGuiIsMouseDragging Function
boolIs mouse dragging?
ImGuiIsMouseHoveringRect Function
Test whether the mouse cursor is hovering the specified rectangle.
ImGuiIsMouseReleased Function
int) -> boolWas the specified mouse button released during the last frame?
ImGuiIsRectVisible Function
boolTest 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
boolIs the current window collapsed.
ImGuiIsWindowFocused Function
boolboolIs the current window focused.
ImGuiIsWindowHovered Function
boolboolIs the current window hovered and hoverable (not blocked by a popup), differentiates child windows from each others.
ImGuiLabelText Function
str, text: str) -> NoneDisplay text+label aligned the same way as value+label widgets.
ImGuiListBox Function
List widget.
ImGuiMouseDrawCursor Function
bool) -> NoneEnable/disable the ImGui software mouse cursor.
ImGuiNewFrame Function
NoneImGuiNewLine Function
NoneUndo a ImGuiSameLine call or force a new line when in an horizontal layout.
ImGuiNextColumn Function
NoneStart the next column in multi-column layout.
See ImGuiColumns.
ImGuiOpenPopup Function
str) -> NoneMark 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
NoneUndo the last call to ImGuiPushAllowKeyboardFocus.
ImGuiPopButtonRepeat Function
NoneUndo the last call to ImGuiPushButtonRepeat.
ImGuiPopClipRect Function
NoneUndo the last call to ImGuiPushClipRect.
ImGuiPopFont Function
NoneUndo the last call to ImGuiPushFont.
ImGuiPopID Function
NoneUndo the last call to ImGuiPushID.
ImGuiPopItemWidth Function
NoneUndo the last call to ImGuiPushItemWidth.
ImGuiPopStyleColor Function
Noneint) -> NoneUndo the last call to ImGuiPushStyleColor.
ImGuiPopStyleVar Function
Noneint) -> NoneUndo the last call to ImGuiPushStyleVar.
ImGuiPopTextWrapPos Function
NoneUndo the last call to ImGuiPushTextWrapPos.
ImGuiProgressBar Function
float) -> NoneDraw a progress bar, fraction must be between 0.0 and 1.0.
ImGuiPushAllowKeyboardFocus Function
bool) -> NoneAllow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets.
ImGuiPushButtonRepeat Function
bool) -> NoneIn 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
bool) -> NonePush a new clip rectangle onto the clipping stack.
ImGuiPushFont Function
NonePush a font on top of the font stack and make it current for subsequent text rendering operations.
ImGuiPushID Function
str) -> Noneint) -> NonePush a string into the ID stack.
ImGuiPushItemWidth Function
float) -> NoneSet 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
Nonefloat) -> NonePush 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
str, active: bool) -> boolstr, v: int, v_button: int) -> bool, intRadio button widget, return the button state.
ImGuiRender Function
NoneImGuiResetMouseDragDelta Function
NoneNoneImGuiSameLine Function
Nonefloat) -> Nonefloat, spacing_w: float) -> NoneCall between widgets or groups to layout them horizontally.
ImGuiSelectable Function
str) -> boolstr, selected: bool) -> boolSelectable 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
NoneOutput an horizontal line to separate two distinct UI sections.
ImGuiSetColumnOffset Function
int, offset_x: float) -> NoneSet the position of a column line in pixels, from the left side of the contents region.
ImGuiSetColumnWidth Function
int, width: float) -> NoneSet the column width in pixels.
ImGuiSetCursorPos Function
NoneSet the current widget output cursor position in window space.
ImGuiSetCursorPosX Function
float) -> NoneSee ImGuiSetCursorPos.
ImGuiSetCursorPosY Function
float) -> NoneSee ImGuiSetCursorPos.
ImGuiSetCursorScreenPos Function
NoneSet the widget cursor output position in screen space.
ImGuiSetItemAllowOverlap Function
NoneAllow the last item to be overlapped by a subsequent item. Sometimes useful with invisible buttons, selectables, etc... to catch unused areas.
ImGuiSetItemDefaultFocus Function
NoneMake the last item the default focused item of a window.
ImGuiSetKeyboardFocusHere Function
Noneint) -> NoneFocus 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
bool) -> NoneSet next item open state.
ImGuiSetNextWindowCollapsed Function
Set next window collapsed state, call before ImGuiBegin.
ImGuiSetNextWindowContentSize Function
NoneSet the size of the content area of the next declared window. Call before ImGuiBegin.
ImGuiSetNextWindowContentWidth Function
float) -> NoneImGuiSetNextWindowFocus Function
NoneSet the next window to be focused/top-most. Call before ImGuiBegin.
ImGuiSetNextWindowPos Function
NoneSet next window position, call before ImGuiBegin.
ImGuiSetNextWindowPosCenter Function
NoneNoneSet next window position to be centered on screen, call before ImGuiBegin.
ImGuiSetNextWindowSize Function
NoneSet 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
float) -> Nonefloat, center_y_ratio: float) -> NoneAdjust scrolling amount to make a given position visible. Generally ImGuiGetCursorStartPos + offset to compute a valid position.
ImGuiSetScrollHereY Function
Nonefloat) -> NoneAdjust 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
float) -> NoneSet scrolling amount between [0;ImGuiGetScrollMaxX].
ImGuiSetScrollY Function
float) -> NoneSet scrolling amount between [0;ImGuiGetScrollMaxY].
ImGuiSetTooltip Function
str) -> NoneSet tooltip under mouse-cursor, typically used with ImGuiIsItemHovered/ImGuiIsAnyItemHovered. Last call wins.
ImGuiSetWindowCollapsed Function
str, collapsed: bool) -> NoneSet named window collapsed state, prefer using ImGuiSetNextWindowCollapsed.
ImGuiSetWindowFocus Function
str) -> NoneSet named window to be focused/top-most.
ImGuiSetWindowFontScale Function
float) -> NonePer-window font scale.
ImGuiSetWindowPos Function
Set named window position.
ImGuiSetWindowSize Function
Set named window size.
ImGuiShutdown Function
NoneShutdown the global ImGui context.
ImGuiSliderFloat Function
str, v: float, v_min: float, v_max: float) -> bool, floatstr, v: float, v_min: float, v_max: float, format: str) -> bool, floatFloat slider widget.
ImGuiSliderInt Function
str, v: int, v_min: int, v_max: int) -> bool, intstr, v: int, v_min: int, v_max: int, format: str) -> bool, intInteger slider widget.
ImGuiSliderIntVec2 Function
ImGuiSliderVec2 Function
Vec2 slider widget.
ImGuiSliderVec3 Function
Vec3 slider widget.
ImGuiSliderVec4 Function
Vec4 slider widget.
ImGuiSmallButton Function
str) -> boolSmall button widget fitting the height of a text line, return True if the button was pressed.
ImGuiSpacing Function
NoneAdd spacing.
ImGuiText Function
str) -> NoneStatic text.
ImGuiTextColored Function
Colored static text.
ImGuiTextDisabled Function
str) -> NoneDisabled static text.
ImGuiTextUnformatted Function
str) -> NoneRaw text without formatting. Roughly equivalent to ImGuiText but faster, recommended for long chunks of text.
ImGuiTextWrapped Function
str) -> NoneWrapped 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
str) -> boolIf returning true the node is open and the user is responsible for calling ImGuiTreePop.
ImGuiTreeNodeEx Function
See ImGuiTreeNode.
ImGuiTreePop Function
NonePop the current tree node.
ImGuiTreePush Function
str) -> NoneAlready called by ImGuiTreeNode, but you can call ImGuiTreePush/ImGuiTreePop yourself for layouting purpose.
ImGuiUnindent Function
Nonefloat) -> NoneMove content position back to the left (cancel ImGuiIndent).
ImGuiWantCaptureMouse Function
boolImGui wants mouse capture. Use this function to determine when to pause mouse processing from other parts of your program.
Inch Function
float) -> floatConvert a value in inches to the Harfang internal unit system.
InputInit Function
NoneInitialize the Input system. Must be invoked before any call to WindowSystemInit to work properly.
hg.InputInit()
hg.WindowSystemInit()
InputShutdown Function
NoneShutdown the Input system.
Inside Function
Test if a value is inside a containing volume.
int_to_VoidPointer Function
int) -> VoidPointerCast 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
str) -> boolTest if an asset file exists in the assets system.
See Resources & Assets.
IsDir Function
str) -> boolReturns true if path is a directory on the local filesystem, false otherwise.
IsEOF Function
boolReturns true if the cursor is at the end of the file, false otherwise.
IsFile Function
str) -> boolTest if a file exists on the local filesystem.
IsFinite Function
float) -> boolTest if a floating point value is finite.
IsHandJointActive Function
boolIsMonitorConnected Function
boolTest if the specified monitor is connected to the host device.
IsoSurfaceSphere Function
int, height: int, depth: int, x: float, y: float, z: float, radius: float) -> Noneint, height: int, depth: int, x: float, y: float, z: float, radius: float, value: float) -> Noneint, height: int, depth: int, x: float, y: float, z: float, radius: float, value: float, exponent: float) -> NoneOutput a sphere to an iso-surface.
IsoSurfaceToModel Function
int, height: int, depth: int) -> boolint, height: int, depth: int, material: int) -> boolint, height: int, depth: int, material: int, isolevel: float) -> boolint, height: int, depth: int, material: int, isolevel: float, scale_x: float, scale_y: float, scale_z: float) -> boolConvert an iso-surface to a render model, this function is geared toward efficiency and meant for realtime.
IsPathAbsolute Function
str) -> boolTest if the provided path is an absolute or relative path.
IsPrimaryMonitor Function
boolReturn true if the monitor is the primary host device monitor, false otherwise.
IsValid Function
boolboolboolboolboolboolTest if a resource if valid.
IsWindowOpen Function
boolReturn true if the window is open, false otherwise.
Km Function
float) -> floatConvert a value in kilometers to the Harfang internal unit system.
Len Function
floatintfloatfloatReturn the length of the vector.
Len2 Function
floatintfloatfloatReturn the length of the vector squared.
Lerp Function
int, b: int, t: float) -> intfloat, b: float, t: float) -> floatSee LinearInterpolate.
LerpAsOrthonormalBase Function
Linear interpolate between two transformation matrices on the [0;1] interval.
LinearInterpolate Function
float, y1: float, t: float) -> floatLinear 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
str) -> FontLoad a TrueType (TTF) font from the assets system.
See Resources & Assets.
LoadFontFromFile Function
str) -> FontLoad a TrueType (TTF) font from the local filesystem.
See Resources & Assets.
LoadForwardPipelineAAAConfigFromAssets Function
LoadForwardPipelineAAAConfigFromFile Function
LoadGIF Function
LoadJPG Function
LoadJsonFromAssets Function
str) -> JSONLoad a JSON from the assets system.
See Resources & Assets.
LoadJsonFromFile Function
str) -> JSONLoad 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
str) -> ModelLoad a render model from the assets system.
See DrawModel and Resources & Assets.
LoadModelFromFile Function
str) -> ModelLoad a render model from the local filesystem.
LoadOGGSoundAsset Function
str) -> SoundRefLoadOGGSoundFile Function
str) -> SoundRefLoadPicture Function
Load a Picture content from the filesystem.
LoadPipelineProgramFromAssets Function
str, resources: PipelineResources, pipeline: PipelineInfo) -> PipelineProgramLoad a pipeline shader program from the assets system.
See Resources & Assets.
LoadPipelineProgramFromFile Function
str, resources: PipelineResources, pipeline: PipelineInfo) -> PipelineProgramLoad a pipeline shader program from the local filesystem.
LoadPipelineProgramRefFromAssets Function
str, resources: PipelineResources, pipeline: PipelineInfo) -> PipelineProgramRefLoadPipelineProgramRefFromFile Function
str, resources: PipelineResources, pipeline: PipelineInfo) -> PipelineProgramRefLoadPNG Function
LoadProgramFromAssets Function
str) -> ProgramHandleLoad a shader program from the assets system.
See Resources & Assets.
LoadProgramFromFile Function
str) -> ProgramHandleLoad a shader program from the local filesystem.
LoadPSD Function
LoadSceneBinaryFromAssets Function
str, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo) -> boolstr, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> boolLoad a scene in binary format from the assets system. Loaded content is added to the existing scene content.
See Resources & Assets.
LoadSceneBinaryFromDataAndAssets Function
str, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo) -> boolstr, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> boolLoadSceneBinaryFromDataAndFile Function
str, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo) -> boolstr, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> boolLoadSceneBinaryFromFile Function
str, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo) -> boolstr, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> boolLoad a scene in binary format from the local filesystem. Loaded content is added to the existing scene content.
LoadSceneFromAssets Function
str, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo) -> boolstr, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> boolLoadSceneFromFile Function
str, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo) -> boolstr, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> boolLoadSceneJsonFromAssets Function
str, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo) -> boolstr, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> boolLoad a scene in JSON format from the assets system. Loaded content is added to the existing scene content.
See Resources & Assets.
LoadSceneJsonFromFile Function
str, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo) -> boolstr, scene: Scene, resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> boolLoad a scene in JSON format from the local filesystem. Loaded content is added to the existing scene content.
LoadTextureFlagsFromAssets Function
str) -> TextureFlagsLoad texture flags in the texture metafile from the assets system.
See Resources & Assets.
LoadTextureFlagsFromFile Function
str) -> TextureFlagsLoad 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
str) -> SoundRefLoad a sound in WAV format from the assets system and return a reference to it.
See Resources & Assets.
LoadWAVSoundFile Function
str) -> SoundRefLoad a sound in WAV format from the local filesystem and return a reference to it.
Log Function
str) -> Nonestr, details: str) -> NoneMakeAudioStreamer Function
str) -> IAudioStreamerMakeForwardPipelineLinearLight Function
float) -> ForwardPipelineLightfloat, shadow_type: ForwardPipelineShadowType) -> ForwardPipelineLightfloat, shadow_type: ForwardPipelineShadowType, shadow_bias: float) -> ForwardPipelineLightCreate a forward pipeline linear light.
See ForwardPipelineLights, PrepareForwardPipelineLights, SubmitSceneToForwardPipeline and Drawing a Scene.
MakeForwardPipelinePointLight Function
float) -> ForwardPipelineLightfloat, priority: float) -> ForwardPipelineLightfloat, priority: float, shadow_type: ForwardPipelineShadowType) -> ForwardPipelineLightfloat, priority: float, shadow_type: ForwardPipelineShadowType, shadow_bias: float) -> ForwardPipelineLightCreate a forward pipeline point light.
See ForwardPipelineLights, PrepareForwardPipelineLights, SubmitSceneToForwardPipeline and Drawing a Scene.
MakeForwardPipelineSpotLight Function
float) -> ForwardPipelineLightfloat, inner_angle: float) -> ForwardPipelineLightfloat, inner_angle: float, outer_angle: float) -> ForwardPipelineLightfloat, inner_angle: float, outer_angle: float, priority: float) -> ForwardPipelineLightfloat, inner_angle: float, outer_angle: float, priority: float, shadow_type: ForwardPipelineShadowType) -> ForwardPipelineLightfloat, inner_angle: float, outer_angle: float, priority: float, shadow_type: ForwardPipelineShadowType, shadow_bias: float) -> ForwardPipelineLightCreate 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
str) -> IVideoStreamerMat3LookAt 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, b: float) -> floatint, b: int) -> intReturn a vector whose elements are the maximum of each of the two specified vectors.
Min Function
float, b: float) -> floatint, b: int) -> intReturn 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
str) -> boolstr, permissions: int) -> boolCreate a new directory.
See MkTree.
MkTree Function
str) -> boolstr, permissions: int) -> boolCreate a directory tree on the local filesystem. This function is recursive and creates each missing directory in the path.
See MkDir.
Mm Function
float) -> floatConvert a value in millimeters to the Harfang internal unit system.
Ms Function
float) -> floatConvert a value in milliseconds to the Harfang internal unit system.
Mtr Function
float) -> floatConvert a value in meters to the Harfang internal unit system.
NewFullscreenWindow Function
str, monitor: Monitor, mode_index: int, rotation: MonitorRotation) -> WindowCreate 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
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
str) -> strNormalize 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
str) -> FileOpen a file in binary mode.
See OpenText, OpenWrite, OpenWriteText
OpenFileDialog Function
Open a native OpenFile dialog.
OpenFolderDialog Function
str, folder_name: str) -> bool, strstr, folder_name: str, initial_dir: str) -> bool, strOpen a native OpenFolder dialog.
OpenTemp Function
str) -> FileReturn a handle to a temporary file on the local filesystem.
OpenText Function
str) -> FileOpen 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
NoneDestroy 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
boolInitialize OpenVR. Start the device display, its controllers and trackers.
OpenVRIsHMDMounted Function
boolOpenVRPostPresentHandoff Function
NoneSignal to the OpenVR compositor that it can immediatly start processing the current frame.
OpenVRShutdown Function
NoneShutdown 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
str) -> FileOpen a file as binary in write mode.
See Open, OpenText, OpenWriteText
OpenWriteText Function
str) -> FileOpenXRCreateEyeFrameBuffer Function
OpenXRDestroyEyeFrameBuffer Function
NoneOpenXRFinishSubmitFrameBuffer Function
NoneOpenXRGetColorTexture Function
OpenXRGetColorTextureFromId Function
int) -> TextureOpenXRGetDepthTexture Function
OpenXRGetDepthTextureFromId Function
int) -> TextureOpenXRGetEyeGaze Function
bool, Mat4OpenXRGetHeadPose Function
bool, Mat4OpenXRGetInstanceInfo Function
strOpenXRInit Function
boolint) -> boolOpenXRShutdown Function
NoneOpenXRSubmitSceneToForwardPipeline Function
int, z_near: float, z_far: float) -> OpenXRFrameInfo, intOrthonormalize 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
strReturn a file path from a set of string elements.
PathStartsWith Function
str, with: str) -> boolTest if the provided path starts with the provided prefix.
PathStripPrefix Function
str, prefix: str) -> strReturn a copy of the input path stripped of the provided prefix.
PathStripSuffix Function
str, suffix: str) -> strReturn a copy of the input path stripped of the provided suffix.
PathToDisplay Function
str) -> strFormat a path for display.
PauseSource Function
NonePause 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
int, scene: Scene, render_data: SceneForwardPipelineRenderData, pipeline: ForwardPipeline, resources: PipelineResources, views: SceneForwardPipelinePassViewId) -> int, SceneForwardPipelinePassViewIdint, scene: Scene, render_data: SceneForwardPipelineRenderData, pipeline: ForwardPipeline, resources: PipelineResources, views: SceneForwardPipelinePassViewId, debug_name: str) -> int, SceneForwardPipelinePassViewIdPrepare 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
int, view_state: ViewState, scene: Scene, render_data: SceneForwardPipelineRenderData, pipeline: ForwardPipeline, resources: PipelineResources, views: SceneForwardPipelinePassViewId) -> int, SceneForwardPipelinePassViewIdint, view_state: ViewState, scene: Scene, render_data: SceneForwardPipelineRenderData, pipeline: ForwardPipeline, resources: PipelineResources, views: SceneForwardPipelinePassViewId, debug_name: str) -> int, SceneForwardPipelinePassViewIdPrepare the view dependent render data to submit a scene to the forward pipeline.
PrintProfilerFrame Function
NonePrint a profiler frame to the console. Print all sections in the frame, their duration and event count.
ProcessLoadQueues Function
intProcessModelLoadQueue Function
intProcessTextureLoadQueue Function
intProcess 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, q: float) -> floatReturn 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) -> floatConvert 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) -> floatConvert an angle in radians to degrees.
Rand Function
intint) -> intReturn 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
floatRead a binary 32 bit floating point value from a local file.
ReadGamepad Function
str) -> GamepadStateRead the current state of a named gamepad. If no name is passed, default is implied.
See GetGamepadNames.
ReadJoystick Function
str) -> JoystickStateReadKeyboard Function
str) -> KeyboardStateRead the current state of a named keyboard. If no name is passed, default is implied.
See GetKeyboardNames.
ReadMouse Function
str) -> MouseStateRead the current state of a named mouse. If no name is passed, default is implied.
See GetMouseNames.
ReadString Function
strRead 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
intRead a binary 16 bit unsigned integer value from a local file.
ReadUInt32 Function
intRead a binary 32 bit unsigned integer value from a local file.
ReadUInt8 Function
intRead a binary 8 bit unsigned integer value from a local file.
ReadVRController Function
str) -> VRControllerStateRead the current state of a named VR controller. If no name is passed, default is implied.
See GetVRControllerNames.
ReadVRGenericTracker Function
str) -> VRGenericTrackerStateRead 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
str) -> NoneRemove a folder from the assets system.
See Resources & Assets.
RemoveAssetsPackage Function
str) -> NoneRemove a package from the assets system.
See Resources & Assets.
RenderInit Function
boolint, height: int, reset_flags: ResetFlags, format: TextureFormat, debug_flags: DebugFlags) -> Windowint, height: int, type: RendererType, reset_flags: ResetFlags, format: TextureFormat) -> Windowint, height: int, type: RendererType, reset_flags: ResetFlags, format: TextureFormat, debug_flags: DebugFlags) -> Windowstr, width: int, height: int, reset_flags: ResetFlags, format: TextureFormat) -> Windowstr, width: int, height: int, reset_flags: ResetFlags, format: TextureFormat, debug_flags: DebugFlags) -> Windowstr, width: int, height: int, type: RendererType, reset_flags: ResetFlags) -> Windowstr, width: int, height: int, type: RendererType, reset_flags: ResetFlags, format: TextureFormat) -> Windowstr, width: int, height: int, type: RendererType, reset_flags: ResetFlags, format: TextureFormat, debug_flags: DebugFlags) -> WindowInitialize the render system.
To change the states of the render system afterward use RenderReset.
RenderReset Function
int, height: int) -> NoneChange the states of the render system at runtime.
RenderResetToWindow Function
Resize the renderer backbuffer to the provided window client area dimensions. Return true if a reset was needed and carried out.
RenderShutdown Function
NoneShutdown the render system.
ResetClock Function
NoneReset 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
NoneRewind the read/write cursor of an open file.
RGBA32 Function
int, g: int, b: int) -> intint, g: int, b: int, a: int) -> intCreate a 32 bit integer RGBA color.
RmDir Function
str) -> boolRemove an empty folder on the local filesystem.
See RmTree.
RmTree Function
str) -> boolRemove 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) -> Mat3Return 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) -> Mat3Return 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) -> Mat3Return 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
boolSaveSceneBinaryToFile Function
str, scene: Scene, resources: PipelineResources, flags: LoadSaveSceneFlags) -> boolSaveSceneJsonToFile Function
str, scene: Scene, resources: PipelineResources, flags: LoadSaveSceneFlags) -> boolSaveTGA Function
ScaleMat3 Function
Return a 3x3 scale matrix from a 2D vector.
ScaleMat4 Function
float) -> Mat4Return a 4x3 scale matrix from the parameter scaling vector.
SceneClearSystems Function
NoneClear scene and all optional systems.
SceneGarbageCollectSystems Function
intGarbage 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
int, physics: ScenePhysics, step: int, max_physics_step: int) -> Noneint, physics: ScenePhysics, step: int, max_physics_step: int, vm: SceneLuaVM) -> Noneint, physics: ScenePhysics, contacts: NodePairContacts, step: int, max_physics_step: int) -> Noneint, physics: ScenePhysics, contacts: NodePairContacts, step: int, max_physics_step: int, vm: SceneLuaVM) -> Noneint, physics: SceneBullet3Physics, step: int, max_physics_step: int) -> Noneint, physics: SceneBullet3Physics, step: int, max_physics_step: int, vm: SceneLuaVM) -> Noneint, physics: SceneBullet3Physics, contacts: NodePairContacts, step: int, max_physics_step: int) -> Noneint, physics: SceneBullet3Physics, contacts: NodePairContacts, step: int, max_physics_step: int, vm: SceneLuaVM) -> NoneUpdate a scene and all its optional systems.
ScreenSpaceToClipSpace Function
Transform a screen position to clip space.
Sec Function
float) -> floatConvert a value in seconds to the Harfang internal unit system.
Seed Function
int) -> NoneSet the starting seed of the pseudo-random number generator.
Seek Function
Move the handle cursor to a specific position in the file.
SendVRControllerHapticPulse Function
int) -> Noneint, name: str) -> NoneSend 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
bool) -> NoneDisplay the details field of log outputs.
SetLogLevel Function
NoneSetMaterialAlphaCut 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
bool, write_g: bool, write_b: bool, write_a: bool) -> NoneSet a material color write mask.
SetMaterialWriteZ Function
Set a material depth write mask.
SetRenderDebug Function
NoneSet 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
NoneSet 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
int, x: int, y: int, res_x: int, res_y: int) -> Noneint, x: int, y: int, res_x: int, res_y: int, znear: float, zfar: float) -> Noneint, x: int, y: int, res_x: int, res_y: int, znear: float, zfar: float, flags: ClearFlags, color: Color, depth: float, stencil: int) -> Noneint, x: int, y: int, res_x: int, res_y: int, znear: float, zfar: float, flags: ClearFlags, color: Color, depth: float, stencil: int, y_up: bool) -> NoneHigh-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
int, x: int, y: int, res_x: int, res_y: int, world: Mat4, znear: float, zfar: float) -> Noneint, x: int, y: int, res_x: int, res_y: int, world: Mat4, znear: float, zfar: float, size: float) -> Noneint, x: int, y: int, res_x: int, res_y: int, world: Mat4, znear: float, zfar: float, size: float, flags: ClearFlags, color: Color, depth: float, stencil: int) -> NoneHigh-level wrapper function to setup a view for 3D orthographic rendering.
This function calls SetViewClear, SetViewRect then SetViewTransform.
SetViewPerspective Function
int, x: int, y: int, res_x: int, res_y: int, world: Mat4, znear: float, zfar: float) -> Noneint, x: int, y: int, res_x: int, res_y: int, world: Mat4, znear: float, zfar: float, zoom_factor: float) -> Noneint, x: int, y: int, res_x: int, res_y: int, world: Mat4, znear: float, zfar: float, zoom_factor: float, flags: ClearFlags, color: Color, depth: float, stencil: int) -> NoneHigh-level wrapper function to setup a view for 3D perspective rendering.
This function calls SetViewClear, SetViewRect then SetViewTransform.
SetViewRect Function
int, x: int, y: int, w: int, h: int) -> NoneSetViewTransform 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
NoneShow 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
NoneSkip elapsed time since the last call to TickClock.
Sleep Function
int) -> NoneSleep 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
boolInitial the SRanipal eye detection SDK.
SRanipalIsViveProEye Function
boolReturn true if the eye detection device in use is Vive Pro Eye.
SRanipalLaunchEyeCalibration Function
NoneLaunch the eye detection calibration sequence.
SRanipalShutdown Function
NoneShutdown the SRanipal eye detection SDK.
StopAllSources Function
NoneStop all playing audio sources.
StopSource Function
NoneStop a playing audio source.
StreamAudioFileSpatialized Function
str, state: SpatializedSourceState) -> SourceRefStreamAudioFileStereo 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
str, value: str) -> boolReturn the content of a file on the local filesystem as a string.
SubmitSceneToForwardPipeline Function
int, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, render_data: SceneForwardPipelineRenderData, resources: PipelineResources) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, render_data: SceneForwardPipelineRenderData, resources: PipelineResources, frame_buffer: FrameBufferHandle) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, render_data: SceneForwardPipelineRenderData, resources: PipelineResources, frame_buffer: FrameBufferHandle, debug_name: str) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, render_data: SceneForwardPipelineRenderData, resources: PipelineResources, views: SceneForwardPipelinePassViewId, aaa: ForwardPipelineAAA, aaa_config: ForwardPipelineAAAConfig, frame: int) -> intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, render_data: SceneForwardPipelineRenderData, resources: PipelineResources, views: SceneForwardPipelinePassViewId, aaa: ForwardPipelineAAA, aaa_config: ForwardPipelineAAAConfig, frame: int, frame_buffer: FrameBufferHandle) -> intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, render_data: SceneForwardPipelineRenderData, resources: PipelineResources, views: SceneForwardPipelinePassViewId, aaa: ForwardPipelineAAA, aaa_config: ForwardPipelineAAAConfig, frame: int, frame_buffer: FrameBufferHandle, debug_name: str) -> intSubmit 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
int, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, resources: PipelineResources) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, resources: PipelineResources, fb: FrameBufferHandle) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, resources: PipelineResources, fb: FrameBufferHandle, debug_name: str) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, fov_axis_is_horizontal: bool, pipeline: ForwardPipeline, resources: PipelineResources) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, fov_axis_is_horizontal: bool, pipeline: ForwardPipeline, resources: PipelineResources, fb: FrameBufferHandle) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, fov_axis_is_horizontal: bool, pipeline: ForwardPipeline, resources: PipelineResources, fb: FrameBufferHandle, debug_name: str) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, resources: PipelineResources, aaa: ForwardPipelineAAA, aaa_config: ForwardPipelineAAAConfig, frame: int) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, resources: PipelineResources, aaa: ForwardPipelineAAA, aaa_config: ForwardPipelineAAAConfig, frame: int, frame_buffer: FrameBufferHandle) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, view_state: ViewState, pipeline: ForwardPipeline, resources: PipelineResources, aaa: ForwardPipelineAAA, aaa_config: ForwardPipelineAAAConfig, frame: int, frame_buffer: FrameBufferHandle, debug_name: str) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, fov_axis_is_horizontal: bool, pipeline: ForwardPipeline, resources: PipelineResources, aaa: ForwardPipelineAAA, aaa_config: ForwardPipelineAAAConfig, frame: int) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, fov_axis_is_horizontal: bool, pipeline: ForwardPipeline, resources: PipelineResources, aaa: ForwardPipelineAAA, aaa_config: ForwardPipelineAAAConfig, frame: int, frame_buffer: FrameBufferHandle) -> SceneForwardPipelinePassViewId, intint, scene: Scene, rect: IntRect, fov_axis_is_horizontal: bool, pipeline: ForwardPipeline, resources: PipelineResources, aaa: ForwardPipelineAAA, aaa_config: ForwardPipelineAAAConfig, frame: int, frame_buffer: FrameBufferHandle, debug_name: str) -> SceneForwardPipelinePassViewId, intSwapFileExtension Function
str, ext: str) -> strReturn the input file path with its extension replaced.
Tell Function
intReturn the current handle cursor position in bytes.
TestVisibility Function
Test if a list of 3d points are inside or outside a Frustum.
TickClock Function
intAdvance 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
int) -> intConvert days to time.
time_from_hour Function
int) -> intConvert hours to time.
time_from_min Function
int) -> intConvert minutes to time.
time_from_ms Function
int) -> intConvert milliseconds to time.
time_from_ms_f Function
float) -> intConvert milliseconds to time.
time_from_ns Function
int) -> intConvert nanoseconds to time.
time_from_sec Function
int) -> intConvert seconds to time.
time_from_sec_f Function
float) -> intConvert fractional seconds to time.
time_from_us Function
int) -> intConvert microseconds to time.
time_from_us_f Function
float) -> intConvert fractional microseconds to time.
time_now Function
intReturn the current system time.
time_to_day Function
int) -> intConvert time to days.
time_to_hour Function
int) -> intConvert time to hours.
time_to_min Function
int) -> intConvert time to minutes.
time_to_ms Function
int) -> intConvert time to milliseconds.
time_to_ms_f Function
int) -> floatConvert time to miliseconds.
time_to_ns Function
int) -> intConvert time to nanoseconds.
time_to_sec Function
int) -> intConvert time to seconds.
time_to_sec_f Function
int) -> floatConvert time to fractional seconds.
time_to_string Function
int) -> strReturn time as a human-readable string.
time_to_us Function
int) -> intConvert time to microseconds.
time_to_us_f Function
int) -> floatConvert 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
int) -> NoneSubmit 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
str) -> boolRemove a file from the local filesystem.
UnloadSound Function
NoneUnload 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
int, texture: Texture, size: iVec2, format: TextureFormat) -> bool, Texture, iVec2, TextureFormatint, texture: Texture, size: iVec2, format: TextureFormat, destroy: bool) -> bool, Texture, iVec2, TextureFormatUpdateTextureFromPicture 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
boolUpdate 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
str) -> Nonestr, details: str) -> NoneWindowHasFocus Function
boolReturn true if the provided window has focus, false otherwise.
WindowSystemInit Function
NoneInitialize the Window system.
WindowSystemShutdown Function
NoneShutdown the window system.
See WindowSystemInit.
Wrap Function
float, start: float, end: float) -> floatint, start: int, end: int) -> intWrap 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) -> floatConvert from a zoom factor value in meters to a fov value in radian.