API Classes Lua

Bloom Class

Bloom post-process object holding internal states and resources.

Create with CreateBloomFromAssets or CreateBloomFromFile, use with ApplyBloom, finally call DestroyBloom to dispose of resources when done.

btGeneric6DofConstraint Class

Camera Class

Add this component to a Node to implement the camera aspect.

Create a camera component with Scene.CreateCamera, use CreateCamera to create a complete camera node.

Functions

NamePrototypeDocumentation
GetFov
number GetFov()

Return the camera field of view.

GetIsOrthographic
boolean GetIsOrthographic()

Return true if orthographic projection is used, false if perspective projection.

GetSize
number GetSize()
GetZFar
number GetZFar()

Return the camera far clipping plane.

GetZNear
number GetZNear()

Return the camera near clipping plane.

GetZRange
CameraZRange GetZRange()
IsValid
boolean IsValid()
SetFov
nil SetFov(number v)

Set the camera field of view.

SetIsOrthographic
nil SetIsOrthographic(boolean v)

Configure the camera to use orthographic or perspective projection.

SetSize
nil SetSize(number v)
SetZFar
nil SetZFar(number v)

Set the camera far clipping plane.

SetZNear
nil SetZNear(number v)

Set the camera near clipping plane.

SetZRange
nil SetZRange(CameraZRange z)
operator==
boolean operator==(Camera c)

CameraZRange Class

Variables

NameType
zfarnumber
znearnumber

Functions

NamePrototypeDocumentation
Constructor
CameraZRange Constructor()

Canvas Class

Holds the canvas properties of a scene, see the canvas member of class Scene.

Variables

NameType
clear_colorboolean
clear_zboolean
colorColor

Collision Class

Collision component, see Physics.

Functions

NamePrototypeDocumentation
GetCollisionResource
string GetCollisionResource()
GetHeight
number GetHeight()
GetLocalTransform
Mat4 GetLocalTransform()
GetMass
number GetMass()

Return the collision shape mass in Kg.

GetRadius
number GetRadius()
GetType
CollisionType GetType()

Return the CollisionType of a Collision component.

IsValid
boolean IsValid()
SetCollisionResource
nil SetCollisionResource(string path)
SetHeight
nil SetHeight(number height)
SetLocalTransform
nil SetLocalTransform(Mat4 m)
SetMass
nil SetMass(number mass)

Set the collision shape mass in Kg.

SetRadius
nil SetRadius(number radius)
SetSize
nil SetSize(Vec3 size)
SetType
nil SetType(CollisionType type)

Set the CollisionType of a Collision component.

operator==
boolean operator==(Collision c)

Color Class

Four-component RGBA color object.

Variables

NameType
Blackstatic Color
Bluestatic Color
Greenstatic Color
Greystatic Color
Onestatic Color
Orangestatic Color
Purplestatic Color
Redstatic Color
Transparentstatic Color
Whitestatic Color
Yellowstatic Color
Zerostatic Color
anumber
bnumber
gnumber
rnumber

Functions

NamePrototypeDocumentation
Constructor
Color Constructor()
Color Constructor(Color color)
Color Constructor(number r, number g, number b)
Color Constructor(number r, number g, number b, number a)

Construct a new color object. The red, green, blue and alpha components are in normalized range [0;1].

operator!=
boolean operator!=(Color color)
operator*
Color operator*(Color color)
Color operator*(number k)
operator*=
nil operator*=(Color color)
nil operator*=(number k)
operator+
Color operator+(Color color)
Color operator+(number k)
operator+=
nil operator+=(Color color)
nil operator+=(number k)
operator-
Color operator-(Color color)
Color operator-(number k)
operator-=
nil operator-=(Color color)
nil operator-=(number k)
operator/
Color operator/(Color color)
Color operator/(number k)
operator/=
nil operator/=(Color color)
nil operator/=(number k)
operator==
boolean operator==(Color color)

ColorList Class

Functions

NamePrototypeDocumentation
at
Color at(integer idx)
clear
nil clear()
push_back
nil push_back(Color v)
reserve
nil reserve(integer size)
size
integer size()

Contact Class

Object containing the world space position, normal and depth of a contact as reported by the collision system.

Variables

NameType
NVec3
PVec3
dnumber

ContactList Class

Functions

NamePrototypeDocumentation
at
Contact at(integer idx)
clear
nil clear()
push_back
nil push_back(Contact v)
reserve
nil reserve(integer size)
size
integer size()

Crowd Class

A group of navigation agents to efficiently simulate a crowd, see Navigation.

Functions

NamePrototypeDocumentation
AddAgent
integer AddAgent(Vec3 pos, CrowdAgentParams params)
Constructor
Crowd Constructor()
GetEditableAgent
CrowdAgent GetEditableAgent(integer idx)
Init
boolean Init(integer max_agent, number maxAgentRadius, NavMesh mesh)
RemoveAgent
nil RemoveAgent(integer idx)
RequestMoveTarget
boolean RequestMoveTarget(integer idx, Vec3 pos, NavMeshQuery query)
Update
nil Update(number dt)

CrowdAgent Class

State of a crowd agent.

Functions

NamePrototypeDocumentation
GetPos
Vec3 GetPos()
GetVel
Vec3 GetVel()
SetPos
nil SetPos(Vec3 pos)

CrowdAgentParams Class

Data Class

Functions

NamePrototypeDocumentation
Constructor
Data Constructor()
GetSize
integer GetSize()
Rewind
nil Rewind()

DearImguiContext Class

Context to render immediate GUI.

DirEntry Class

Variables

NameType
namestring
typeinteger

DirEntryList Class

Functions

NamePrototypeDocumentation
at
DirEntry at(integer idx)
clear
nil clear()
push_back
nil push_back(DirEntry v)
reserve
nil reserve(integer size)
size
integer size()

draw_sceneCallback Class

Environment Class

Environment properties of a scene, see environment member of the Scene class.

Variables

NameType
ambientColor
brdf_mapTextureRef
fog_colorColor
fog_farnumber
fog_nearnumber

File Class

Interface to a file on the host local filesystem.

FileFilter Class

Variables

NameType
namestring
patternstring

Functions

NamePrototypeDocumentation
Constructor
FileFilter Constructor()

FileFilterList Class

Functions

NamePrototypeDocumentation
at
FileFilter at(integer idx)
clear
nil clear()
push_back
nil push_back(FileFilter v)
reserve
nil reserve(integer size)
size
integer size()

Font Class

Font object for realtime rendering.

ForwardPipeline Class

Rendering pipeline implementing a forward rendering strategy.

The main characteristics of this pipeline are:

  • Render in two passes: opaque display lists then transparent ones.
  • Fixed 8 light slots supporting 1 linear light with PSSM shadow mapping, 1 spot with shadow mapping and up to 6 point lights with no shadow mapping.

ForwardPipelineAAA Class

Functions

NamePrototypeDocumentation
Flip
nil Flip(ViewState view_state)

ForwardPipelineAAAConfig Class

Variables

NameType
bloom_biasnumber
bloom_intensitynumber
bloom_thresholdnumber
compositing_params0Vec4
compositing_params1Vec4
compositing_params2Vec4
compositing_params3Vec4
dof_focus_lengthnumber
dof_focus_pointnumber
exposurenumber
gammanumber
max_distancenumber
motion_blurnumber
sample_countinteger
temporal_aa_weightnumber
z_thicknessnumber

Functions

NamePrototypeDocumentation
Constructor

ForwardPipelineFog Class

Fog properties for the forward pipeline.

Variables

NameType
colorColor
farnumber
nearnumber

Functions

NamePrototypeDocumentation
Constructor
ForwardPipelineFog Constructor()

ForwardPipelineLight Class

Single light for the forward pipeline. The complete lighting rig is passed as a ForwardPipelineLights, see PrepareForwardPipelineLights.

Variables

NameType
diffuseColor
inner_anglenumber
outer_anglenumber
prioritynumber
pssm_splitVec4
radiusnumber
specularColor
typeForwardPipelineLightType
worldMat4

Functions

NamePrototypeDocumentation
Constructor
ForwardPipelineLight Constructor()

ForwardPipelineLightList Class

Functions

NamePrototypeDocumentation
at
ForwardPipelineLight at(integer idx)
clear
nil clear()
push_back
nil push_back(ForwardPipelineLight v)
reserve
nil reserve(integer size)
size
integer size()

ForwardPipelineLights Class

FrameBuffer Class

Variables

NameType
handleFrameBufferHandle

FrameBufferHandle Class

Frustum Class

A view frustum, perspective or orthographic, holding the necessary information to perform culling queries. It can be used to test wether a volume is inside or outside the frustum it represents.

Functions

NamePrototypeDocumentation
GetBottom
Vec4 GetBottom()
GetFar
Vec4 GetFar()
GetLeft
Vec4 GetLeft()
GetNear
Vec4 GetNear()
GetRight
Vec4 GetRight()
GetTop
Vec4 GetTop()
SetBottom
nil SetBottom(Vec4 plane)
SetFar
nil SetFar(Vec4 plane)
SetLeft
nil SetLeft(Vec4 plane)
SetNear
nil SetNear(Vec4 plane)
SetRight
nil SetRight(Vec4 plane)
SetTop
nil SetTop(Vec4 plane)

Gamepad Class

Helper class holding the current and previous device state to enable delta state queries.

Use GetGamepadNames to query for available gamepad devices.

Functions

NamePrototypeDocumentation
Axes
number Axes(GamepadAxes axis)

Return the value of a gamepad axis.

Connected
boolean Connected()

Gamepad was connected since the last update.

Constructor
Gamepad Constructor()
Gamepad Constructor(string name)
Disconnected
boolean Disconnected()

Gamepad was disconnected since the last update.

Down
boolean Down(GamepadButton btn)
DtAxes
number DtAxes(GamepadAxes axis)
IsConnected
boolean IsConnected()

Gamepad is currently connected.

Pressed
boolean Pressed(GamepadButton btn)
Released
boolean Released(GamepadButton btn)
Update
nil Update()

GamepadState Class

Functions

NamePrototypeDocumentation
Axes
number Axes(GamepadAxes idx)
Button
boolean Button(GamepadButton btn)
IsConnected
boolean IsConnected()

Geometry Class

Base geometry object. Before a geometry can be displayed, it must be converted to Model by the asset compiler (see Compiling to Assets).

To programmatically create a geometry use GeometryBuilder.

GeometryBuilder Class

Use the geometry builder to programmatically create geometries. No optimization are performed by the geometry builder on the input data.

To programmatically build a geometry for immediate display see ModelBuilder to directly build models.

Functions

NamePrototypeDocumentation
AddPolygon
nil AddPolygon(UInt32List idxs, integer material)
AddQuad
nil AddQuad(integer a, integer b, integer c, integer d, integer material)
AddTriangle
nil AddTriangle(integer a, integer b, integer c, integer material)
AddVertex
nil AddVertex(Vertex vtx)
Clear
nil Clear()
Constructor
GeometryBuilder Constructor()
Make
Geometry Make()

IAudioStreamer Class

Functions

NamePrototypeDocumentation
Close
integer Close(integer ref)
GetDuration
integer GetDuration(integer ref)
GetTimeStamp
integer GetTimeStamp(integer ref)
IsEnded
integer IsEnded(integer ref)
Open
integer Open(string name)
Seek
integer Seek(integer ref, integer t)
Shutdown
nil Shutdown()
Startup
integer Startup()

ImDrawList Class

Immediate GUI drawing list. This object can be used to perform custom drawing operations on top of an imgui window.

Functions

NamePrototypeDocumentation
AddBezierCubic
nil AddBezierCubic(Vec2 pos0, Vec2 cp0, Vec2 cp1, Vec2 pos1, integer col, number thickness)
nil AddBezierCubic(Vec2 pos0, Vec2 cp0, Vec2 cp1, Vec2 pos1, integer col, number thickness, integer num_segments)
AddCircle
nil AddCircle(Vec2 centre, number radius, integer col)
nil AddCircle(Vec2 centre, number radius, integer col, integer num_segments)
nil AddCircle(Vec2 centre, number radius, integer col, integer num_segments, number thickness)
AddCircleFilled
nil AddCircleFilled(Vec2 centre, number radius, integer col)
nil AddCircleFilled(Vec2 centre, number radius, integer col, integer num_segments)
AddConvexPolyFilled
nil AddConvexPolyFilled(Vec2List points, integer col)
AddImage
nil AddImage(Texture tex, Vec2 a, Vec2 b)
nil AddImage(Texture tex, Vec2 a, Vec2 b, Vec2 uv_a, Vec2 uv_b)
nil AddImage(Texture tex, Vec2 a, Vec2 b, Vec2 uv_a, Vec2 uv_b, integer col)
AddImageQuad
nil AddImageQuad(Texture tex, Vec2 a, Vec2 b, Vec2 c, Vec2 d)
nil AddImageQuad(Texture tex, Vec2 a, Vec2 b, Vec2 c, Vec2 d, Vec2 uv_a, Vec2 uv_b, Vec2 uv_c, Vec2 uv_d)
nil AddImageQuad(Texture tex, Vec2 a, Vec2 b, Vec2 c, Vec2 d, Vec2 uv_a, Vec2 uv_b, Vec2 uv_c, Vec2 uv_d, integer col)
AddImageRounded
nil AddImageRounded(Texture tex, Vec2 a, Vec2 b, Vec2 uv_a, Vec2 uv_b, integer col, number rounding)
nil AddImageRounded(Texture tex, Vec2 a, Vec2 b, Vec2 uv_a, Vec2 uv_b, integer col, number rounding, ImDrawFlags flags)
AddLine
nil AddLine(Vec2 a, Vec2 b, integer col)
nil AddLine(Vec2 a, Vec2 b, integer col, number thickness)
AddPolyline
nil AddPolyline(Vec2List points, integer col, boolean closed, number thickness)
AddQuad
nil AddQuad(Vec2 a, Vec2 b, Vec2 c, Vec2 d, integer col)
nil AddQuad(Vec2 a, Vec2 b, Vec2 c, Vec2 d, integer col, number thickness)
AddQuadFilled
nil AddQuadFilled(Vec2 a, Vec2 b, Vec2 c, Vec2 d, integer col)
AddRect
nil AddRect(Vec2 a, Vec2 b, integer col)
nil AddRect(Vec2 a, Vec2 b, integer col, number rounding)
nil AddRect(Vec2 a, Vec2 b, integer col, number rounding, integer rounding_corner_flags)
nil AddRect(Vec2 a, Vec2 b, integer col, number rounding, integer rounding_corner_flags, number thickness)
AddRectFilled
nil AddRectFilled(Vec2 a, Vec2 b, integer col)
nil AddRectFilled(Vec2 a, Vec2 b, integer col, number rounding)
nil AddRectFilled(Vec2 a, Vec2 b, integer col, number rounding, integer rounding_corner_flags)
AddRectFilledMultiColor
nil AddRectFilledMultiColor(Vec2 a, Vec2 b, integer col_upr_left, integer col_upr_right, integer col_bot_right, integer col_bot_left)
AddText
nil AddText(Vec2 pos, integer col, string text)
nil AddText(ImFont font, number font_size, Vec2 pos, integer col, string text)
nil AddText(ImFont font, number font_size, Vec2 pos, integer col, string text, number wrap_width)
nil AddText(ImFont font, number font_size, Vec2 pos, integer col, string text, number wrap_width, Vec4 cpu_fine_clip_rect)
AddTriangle
nil AddTriangle(Vec2 a, Vec2 b, Vec2 c, integer col)
nil AddTriangle(Vec2 a, Vec2 b, Vec2 c, integer col, number thickness)
AddTriangleFilled
nil AddTriangleFilled(Vec2 a, Vec2 b, Vec2 c, integer col)
ChannelsMerge
nil ChannelsMerge()
ChannelsSetCurrent
nil ChannelsSetCurrent(integer channel_index)
ChannelsSplit
nil ChannelsSplit(integer channels_count)
GetClipRectMax
Vec2 GetClipRectMax()
GetClipRectMin
Vec2 GetClipRectMin()
PathArcTo
nil PathArcTo(Vec2 centre, number radius, number a_min, number a_max)
nil PathArcTo(Vec2 centre, number radius, number a_min, number a_max, integer num_segments)
PathArcToFast
nil PathArcToFast(Vec2 centre, number radius, integer a_min_of_12, integer a_max_of_12)
PathBezierCubicCurveTo
nil PathBezierCubicCurveTo(Vec2 p1, Vec2 p2, Vec2 p3)
nil PathBezierCubicCurveTo(Vec2 p1, Vec2 p2, Vec2 p3, integer num_segments)
PathClear
nil PathClear()
PathFillConvex
nil PathFillConvex(integer col)
PathLineTo
nil PathLineTo(Vec2 pos)
PathLineToMergeDuplicate
nil PathLineToMergeDuplicate(Vec2 pos)
PathRect
nil PathRect(Vec2 rect_min, Vec2 rect_max)
nil PathRect(Vec2 rect_min, Vec2 rect_max, number rounding)
nil PathRect(Vec2 rect_min, Vec2 rect_max, number rounding, ImDrawFlags flags)
PathStroke
nil PathStroke(integer col, boolean closed)
nil PathStroke(integer col, boolean closed, number thickness)
PopClipRect
nil PopClipRect()
PopTextureID
nil PopTextureID()
PushClipRect
nil PushClipRect(Vec2 clip_rect_min, Vec2 clip_rect_max)
nil PushClipRect(Vec2 clip_rect_min, Vec2 clip_rect_max, boolean intersect_with_curent_clip_rect)
PushClipRectFullScreen
nil PushClipRectFullScreen()
PushTextureID
nil PushTextureID(Texture tex)

ImFont Class

Immediate GUI font.

Instance Class

Component to instantiate a scene as a child of a node upon setup.

Functions

NamePrototypeDocumentation
ClearOnInstantiateAnim
nil ClearOnInstantiateAnim()
GetOnInstantiateAnim
string GetOnInstantiateAnim()
GetOnInstantiateAnimLoopMode
AnimLoopMode GetOnInstantiateAnimLoopMode()
GetOnInstantiatePlayAnimRef
ScenePlayAnimRef GetOnInstantiatePlayAnimRef()
GetPath
string GetPath()
IsValid
boolean IsValid()
SetOnInstantiateAnim
nil SetOnInstantiateAnim(string anim)
SetOnInstantiateAnimLoopMode
nil SetOnInstantiateAnimLoopMode(AnimLoopMode loop_mode)
SetPath
nil SetPath(string path)
operator==
boolean operator==(Instance i)

intList Class

Functions

NamePrototypeDocumentation
at
integer at(integer idx)
clear
nil clear()
push_back
nil push_back(integer v)
reserve
nil reserve(integer size)
size
integer size()

IntRect Class

Variables

NameType
exinteger
eyinteger
sxinteger
syinteger

Functions

NamePrototypeDocumentation
Constructor
IntRect Constructor()
IntRect Constructor(integer x, integer y)
IntRect Constructor(integer sx, integer sy, integer ex, integer ey)
IntRect Constructor(IntRect rect)

IsoSurface Class

An iso-surface represents points of a constant value within a volume of space. This class holds a fixed-size 3-dimensional grid of values that can efficiently be converted to a Model at runtime.

iVec2 Class

2-dimensional integer vector.

Variables

NameType
Onestatic iVec2
Zerostatic iVec2
xinteger
yinteger

Functions

NamePrototypeDocumentation
Constructor
iVec2 Constructor()
iVec2 Constructor(integer x, integer y)
iVec2 Constructor(iVec2 v)
iVec2 Constructor(Vec3 v)
iVec2 Constructor(Vec4 v)
Set
nil Set(integer x, integer y)
operator*
iVec2 operator*(iVec2 v)
iVec2 operator*(integer k)
operator*=
nil operator*=(iVec2 v)
nil operator*=(integer k)
operator+
iVec2 operator+(iVec2 v)
iVec2 operator+(integer k)
operator+=
nil operator+=(iVec2 v)
nil operator+=(integer k)
operator-
iVec2 operator-(iVec2 v)
iVec2 operator-(integer k)
operator-=
nil operator-=(iVec2 v)
nil operator-=(integer k)
operator/
iVec2 operator/(iVec2 v)
iVec2 operator/(integer k)
operator/=
nil operator/=(iVec2 v)
nil operator/=(integer k)

iVec2List Class

Functions

NamePrototypeDocumentation
at
iVec2 at(integer idx)
clear
nil clear()
push_back
nil push_back(iVec2 v)
reserve
nil reserve(integer size)
size
integer size()

IVideoStreamer Class

Functions

NamePrototypeDocumentation
Close
integer Close(integer h)
FreeFrame
integer FreeFrame(integer h, integer frame)
GetDuration
integer GetDuration(integer h)
GetFrame
integer, integer, integer, integer, integer, VideoFrameFormat GetFrame(integer h, integer ptr, integer width, integer height, integer pitch, VideoFrameFormat format)
GetTimeStamp
integer GetTimeStamp(integer h)
IsEnded
integer IsEnded(integer h)
Open
integer Open(string name)
Pause
integer Pause(integer h)
Play
integer Play(integer h)
Seek
integer Seek(integer h, integer t)
Shutdown
nil Shutdown()
Startup
integer Startup()

Joystick Class

Functions

NamePrototypeDocumentation
Axes
number Axes(integer axis)
AxesCount
integer AxesCount()
ButtonsCount
integer ButtonsCount()
Connected
boolean Connected()
Constructor
Joystick Constructor()
Joystick Constructor(string name)
Disconnected
boolean Disconnected()
Down
boolean Down(integer btn)
DtAxes
number DtAxes(integer axis)
GetDeviceName
string GetDeviceName()
IsConnected
boolean IsConnected()
Pressed
boolean Pressed(integer btn)
Released
boolean Released(integer btn)
Update
nil Update()

JoystickState Class

Functions

NamePrototypeDocumentation
Axes
number Axes(integer idx)
Button
boolean Button(integer btn)
IsConnected
boolean IsConnected()

JSON Class

JSON read/write object.

Keyboard Class

Helper class holding the current and previous device state to enable delta state queries.

Use GetKeyboardNames to query for available keyboard devices.

Functions

NamePrototypeDocumentation
Constructor
Keyboard Constructor()
Keyboard Constructor(string name)
Down
boolean Down(Key key)
GetOldState
KeyboardState GetOldState()
GetState
KeyboardState GetState()
Pressed
boolean Pressed(Key key)
Released
boolean Released(Key key)
Update
nil Update()

KeyboardState Class

Functions

NamePrototypeDocumentation
Key
boolean Key(Key key)

Light Class

Add this component to a node to turn it into a light source, see Using the Forward Pipeline.

Functions

NamePrototypeDocumentation
GetDiffuseColor
Color GetDiffuseColor()
GetDiffuseIntensity
number GetDiffuseIntensity()
GetInnerAngle
number GetInnerAngle()
GetOuterAngle
number GetOuterAngle()
GetPSSMSplit
Vec4 GetPSSMSplit()
GetPriority
number GetPriority()
GetRadius
number GetRadius()

Get the light range in meters.

GetShadowFar
number GetShadowFar()
GetShadowNear
number GetShadowNear()
GetShadowType
LightShadowType GetShadowType()
GetSpecularColor
Color GetSpecularColor()
GetSpecularIntensity
number GetSpecularIntensity()
GetType
LightType GetType()

Return the LightType.

IsValid
boolean IsValid()
SetDiffuseColor
nil SetDiffuseColor(Color v)
SetDiffuseIntensity
nil SetDiffuseIntensity(number v)
SetInnerAngle
nil SetInnerAngle(number v)
SetOuterAngle
nil SetOuterAngle(number v)
SetPSSMSplit
nil SetPSSMSplit(Vec4 v)
SetPriority
nil SetPriority(number v)
SetRadius
nil SetRadius(number v)

Set the light range in meters. No light will be contributed to elements further away than this distance from the node world position.

SetShadowFar
nil SetShadowFar(number v)
SetShadowNear
nil SetShadowNear(number v)
SetShadowType
nil SetShadowType(LightShadowType v)
SetSpecularColor
nil SetSpecularColor(Color v)
SetSpecularIntensity
nil SetSpecularIntensity(number v)
SetType
nil SetType(LightType v)

Set the LightType.

operator==
boolean operator==(Light l)

LuaObject Class

Opaque reference to an Lua object. This type is used to transfer values between VMs, see Scripting.

LuaObjectList Class

Functions

NamePrototypeDocumentation
at
LuaObject at(integer idx)
clear
nil clear()
push_back
nil push_back(LuaObject v)
reserve
nil reserve(integer size)
size
integer size()

Mat3 Class

A 3x3 matrix used to store rotation.

Mat4 Class

A 3x4 matrix used to store complete transformation including rotation, scale and position.

Mat44 Class

A 4x4 matrix used to store projection matrices.

Mat4List Class

Functions

NamePrototypeDocumentation
at
Mat4 at(integer idx)
clear
nil clear()
push_back
nil push_back(Mat4 v)
reserve
nil reserve(integer size)
size
integer size()

Material Class

High-level description of visual aspects of a surface. A material is comprised of a PipelineProgramRef, per-uniform value or texture, and a RenderState.

See Using the Forward Pipeline and Writing a Pipeline Shader.

MaterialList Class

Functions

NamePrototypeDocumentation
at
Material at(integer idx)
clear
nil clear()
push_back
nil push_back(Material v)
reserve
nil reserve(integer size)
size
integer size()

MaterialRef Class

Reference to a Material inside a PipelineResources object.

MinMax Class

3D bounding volume defined by a minimum and maximum position.

Variables

NameType
mnVec3
mxVec3

Functions

NamePrototypeDocumentation
Constructor
MinMax Constructor()
MinMax Constructor(Vec3 min, Vec3 max)
operator!=
boolean operator!=(MinMax minmax)
operator==
boolean operator==(MinMax minmax)

Model Class

Runtime version of a Geometry. A model can be drawn to screen by calling DrawModel or by assigning it to the Object component of a node.

To programmatically create a model see ModelBuilder.

ModelBuilder Class

Use the model builder to programmatically build models at runtime.

The input data is optimized upon submission.

Functions

NamePrototypeDocumentation
AddPolygon
nil AddPolygon(UInt32List idxs)
AddQuad
nil AddQuad(integer a, integer b, integer c, integer d)
AddTriangle
nil AddTriangle(integer a, integer b, integer c)
AddVertex
integer AddVertex(Vertex vtx)

Add a vertex to the builder database. Use the returned optimized index to submit primitives using methods such as ModelBuilder.AddTriangle.

Clear
nil Clear()

Clear all submitted data up to this point.

Constructor
ModelBuilder Constructor()
EndList
nil EndList(integer material)

End the current primitive list and start a new one.

GetCurrentListIndexCount
integer GetCurrentListIndexCount()

Return the number of indexes in the current list.

See ModelBuilder.EndList.

MakeModel
Model MakeModel(VertexLayout decl)

Create a model from all data submitted up to this point.

ModelRef Class

Monitor Class

MonitorList Class

Functions

NamePrototypeDocumentation
at
Monitor at(integer idx)
clear
nil clear()
push_back
nil push_back(Monitor v)
reserve
nil reserve(integer size)
size
integer size()

MonitorMode Class

Variables

NameType
frequencyinteger
namestring
rectIntRect
rotationMonitorRotation
supported_rotationsinteger

MonitorModeList Class

Functions

NamePrototypeDocumentation
at
MonitorMode at(integer idx)
clear
nil clear()
push_back
nil push_back(MonitorMode v)
reserve
nil reserve(integer size)
size
integer size()

Mouse Class

Helper class holding the current and previous device state to enable delta state queries.

Use GetMouseNames to query for available mouse devices.

Functions

NamePrototypeDocumentation
Constructor
Mouse Constructor()
Mouse Constructor(string name)
Down
boolean Down(integer button)
DtX
integer DtX()
DtY
integer DtY()
GetOldState
MouseState GetOldState()
GetState
MouseState GetState()
HWheel
integer HWheel()
Pressed
boolean Pressed(integer button)
Released
boolean Released(integer button)
Update
nil Update()
Wheel
integer Wheel()
X
integer X()
Y
integer Y()

MouseState Class

Functions

NamePrototypeDocumentation
Button
boolean Button(MouseButton btn)
HWheel
integer HWheel()
Wheel
integer Wheel()
X
integer X()
Y
integer Y()

NavMesh Class

Navigation mesh that can be queried using a NavMeshQuery to compute the most efficient path between two world-space positions.

NavMeshQuery Class

Navigation mesh query object. Queries are performed in world space.

See Navigation.

Node Class

The base element of a scene, see Working with Scene.

Functions

NamePrototypeDocumentation
ComputeCameraViewState
ViewState ComputeCameraViewState(Vec2 aspect_ratio)
ComputeWorld
Mat4 ComputeWorld()
DestroyInstance
nil DestroyInstance()
Disable
nil Disable()
Enable
nil Enable()
GetCamera
Camera GetCamera()

Return the Camera component of the node.

GetCollision
Collision GetCollision(integer slot)

Return the Collision component attached to the Node at the desired slot.

GetCollisionCount
integer GetCollisionCount()

Return the amount of Collision components of a Node.

GetFlags
integer GetFlags()
GetInstance
Instance GetInstance()

Return the Instance component of a Node.

GetInstanceSceneAnim
SceneAnimRef GetInstanceSceneAnim(string path)
GetInstanceSceneView
SceneView GetInstanceSceneView()
GetLight
Light GetLight()

Return the Light component of the node.

GetMinMax
boolean, MinMax GetMinMax(PipelineResources resources)
GetName
string GetName()

Return the node name.

GetObject
Object GetObject()

Return Object component of the node.

GetRigidBody
RigidBody GetRigidBody()

Return the RigidBody component of a Node.

GetScript
Script GetScript(integer idx)
GetScriptCount
integer GetScriptCount()
GetTransform
Transform GetTransform()

Return the Transform component of the node.

GetUid
integer GetUid()

Return the unique ID.

GetWorld
Mat4 GetWorld()
HasCamera
boolean HasCamera()

Return true if the Node has a Camera component.

HasInstance
boolean HasInstance()

Return true if the Node has an Instance component.

HasLight
boolean HasLight()

Return true if the Node has a Light component.

HasObject
boolean HasObject()

Return true if the Node has an Object (a geometry) component.

HasRigidBody
boolean HasRigidBody()

Return true if the Node has a RigidBody component.

HasTransform
boolean HasTransform()

Return true if the Node has a Transform component.

IsEnabled
boolean IsEnabled()
IsInstantiatedBy
Node IsInstantiatedBy()
IsItselfEnabled
boolean IsItselfEnabled()
IsValid
boolean IsValid()

Return true if the Node still exist.

RemoveCamera
nil RemoveCamera()

Remove the Camera component from the Node.

RemoveCollision
nil RemoveCollision(Collision c)
nil RemoveCollision(integer slot)

Remove the Collision component attached to the slot of the Node.

RemoveLight
nil RemoveLight()

Remove the Light component from the Node.

RemoveObject
nil RemoveObject()

Remove the Object component from the Node.

RemoveRigidBody
nil RemoveRigidBody()

Remove the RigidBody component from the Node.

RemoveScript
nil RemoveScript(Script s)
nil RemoveScript(integer slot)
RemoveTransform
nil RemoveTransform()

Remove the Transform component from the Node.

SetCamera
nil SetCamera(Camera c)

Set the Camera component of a node. See Scene.CreateCamera.

SetCollision
nil SetCollision(integer slot, Collision c)

Set the Collision component of a Node at the desired slot. This is how you combine several collision shapes on a single node.

SetFlags
nil SetFlags(integer flags)
SetInstance
nil SetInstance(Instance instance)

Set the Instance component of a Node.

SetLight
nil SetLight(Light l)
SetName
nil SetName(string name)

Set the node name.

SetObject
nil SetObject(Object o)

Set the Object component of a node.

See Scene.CreateObject.

SetRigidBody
nil SetRigidBody(RigidBody b)

Set the RigidBody component of a node.

SetScript
nil SetScript(integer idx, Script s)
SetTransform
nil SetTransform(Transform t)

Set the Transform component of a node.

See Scene.CreateTransform.

SetWorld
nil SetWorld(Mat4 world)
SetupInstanceFromAssets
boolean SetupInstanceFromAssets(PipelineResources resources, PipelineInfo pipeline)
boolean SetupInstanceFromAssets(PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)
SetupInstanceFromFile
boolean SetupInstanceFromFile(PipelineResources resources, PipelineInfo pipeline)
boolean SetupInstanceFromFile(PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags)
StartOnInstantiateAnim
nil StartOnInstantiateAnim()
StopOnInstantiateAnim
nil StopOnInstantiateAnim()
operator==
boolean operator==(Node n)

Return true if both objects point to the same node instance, false otherwise.

NodeList Class

Functions

NamePrototypeDocumentation
at
Node at(integer idx)
clear
nil clear()
push_back
nil push_back(Node v)
reserve
nil reserve(integer size)
size
integer size()

NodePairContacts Class

Object Class

This components draws a Model. It stores the material table used to draw the model.

Functions

NamePrototypeDocumentation
ClearModelRef
nil ClearModelRef()
GetBone
Node GetBone(integer idx)
GetBoneCount
integer GetBoneCount()
GetMaterial
Material GetMaterial(integer slot_idx)
Material GetMaterial(string name)

Return the object Material at index.

GetMaterialCount
integer GetMaterialCount()

Return the number of Material in the object material table.

GetMaterialName
string GetMaterialName(integer slot_idx)
GetMinMax
boolean, MinMax GetMinMax(PipelineResources resources)
GetModelRef
ModelRef GetModelRef()

Return the ModelRef to display.

IsValid
boolean IsValid()
SetBone
boolean SetBone(integer idx, Node node)
SetBoneCount
nil SetBoneCount(integer count)
SetMaterial
nil SetMaterial(integer slot_idx, Material mat)

Set the object Material at index.

SetMaterialCount
nil SetMaterialCount(integer count)

Set the number of Material in the object material table.

SetMaterialName
nil SetMaterialName(integer slot_idx, string name)
SetModelRef
nil SetModelRef(ModelRef r)

Set the ModelRef to display.

operator==
boolean operator==(Object o)

OpenVREye Class

Matrices for a VR eye, see OpenVRState.

Variables

NameType
offsetMat4
projectionMat44

OpenVREyeFrameBuffer Class

Framebuffer for a VR eye. Render to two such buffer, one for each eye, before submitting them using OpenVRSubmitFrame.

Functions

NamePrototypeDocumentation
GetHandle
FrameBufferHandle GetHandle()

OpenVRState Class

OpenVR state including the body and head transformations, the left and right eye states and the render target dimensions expected by the backend.

Variables

NameType
bodyMat4
headMat4
heightinteger
inv_headMat4
leftOpenVREye
rightOpenVREye
widthinteger

OpenXREyeFrameBuffer Class

OpenXREyeFrameBufferList Class

Functions

NamePrototypeDocumentation
at
OpenXREyeFrameBuffer at(integer idx)
clear
nil clear()
push_back
nil push_back(OpenXREyeFrameBuffer v)
reserve
nil reserve(integer size)
size
integer size()

OpenXRFrameInfo Class

Variables

NameType
id_fbsintList

Picture Class

The picture origin (0, 0) is in the top-left corner of its frame with the X and Y axises increasing toward the right and bottom.

To load and save a picture use LoadPicture, LoadPNG or SavePNG.

The Picture.SetData and Picture.GetData methods can be used to transfer data to and from a picture object.

Functions

NamePrototypeDocumentation
Constructor
Picture Constructor()
Picture Constructor(Picture picture)
Picture Constructor(integer width, integer height, PictureFormat format)
Picture Constructor(VoidPointer data, integer width, integer height, PictureFormat format)
CopyData
nil CopyData(VoidPointer data, integer width, integer height, PictureFormat format)
GetData
integer GetData()
GetFormat
PictureFormat GetFormat()
GetHeight
integer GetHeight()

Return the picture height.

GetPixelRGBA
Color GetPixelRGBA(integer x, integer y)
GetWidth
integer GetWidth()

Return the picture width.

SetData
nil SetData(VoidPointer data, integer width, integer height, PictureFormat format)
SetPixelRGBA
nil SetPixelRGBA(integer x, integer y, Color col)

Pipeline Class

Rendering pipeline base class.

PipelineInfo Class

Variables

NameType
namestring

PipelineProgram Class

PipelineProgramRef Class

PipelineResources Class

Functions

NamePrototypeDocumentation
AddModel
ModelRef AddModel(string name, Model mdl)
AddProgram
PipelineProgramRef AddProgram(string name, PipelineProgram prg)
AddTexture
TextureRef AddTexture(string name, Texture tex)
Constructor
PipelineResources Constructor()
DestroyAllModels
nil DestroyAllModels()
DestroyAllPrograms
nil DestroyAllPrograms()
DestroyAllTextures
nil DestroyAllTextures()
DestroyModel
nil DestroyModel(ModelRef ref)
DestroyProgram
nil DestroyProgram(PipelineProgramRef ref)
DestroyTexture
nil DestroyTexture(TextureRef ref)
GetModel
Model GetModel(ModelRef ref)
GetModelName
string GetModelName(ModelRef ref)
GetProgram
GetProgramName
string GetProgramName(PipelineProgramRef ref)
GetTexture
Texture GetTexture(TextureRef ref)
GetTextureInfo
TextureInfo GetTextureInfo(TextureRef ref)
GetTextureName
string GetTextureName(TextureRef ref)
HasModel
ModelRef HasModel(string name)
HasProgram
PipelineProgramRef HasProgram(string name)
HasTexture
TextureRef HasTexture(string name)
HasTextureInfo
boolean HasTextureInfo(TextureRef ref)
UpdateModel
nil UpdateModel(ModelRef ref, Model mdl)
UpdateProgram
nil UpdateProgram(PipelineProgramRef ref, PipelineProgram prg)
UpdateTexture
nil UpdateTexture(TextureRef ref, Texture tex)

ProfilerFrame Class

ProgramHandle Class

Handle to a shader program.

Quaternion Class

Quaternion can be used to represent a 3d rotation. It provides a more compact representation of the rotation than Mat3 and can efficiently and correctly interpolate (see Slerp) between two rotations.

Variables

NameType
wnumber
xnumber
ynumber
znumber

Functions

NamePrototypeDocumentation
Constructor
Quaternion Constructor()
Quaternion Constructor(number x, number y, number z, number w)
Quaternion Constructor(Quaternion q)
operator*
Quaternion operator*(number v)
Quaternion operator*(Quaternion q)
operator*=
nil operator*=(number v)
nil operator*=(Quaternion q)
operator+
Quaternion operator+(number v)
Quaternion operator+(Quaternion q)
operator+=
nil operator+=(number v)
nil operator+=(Quaternion q)
operator-
Quaternion operator-(number v)
Quaternion operator-(Quaternion q)
operator-=
nil operator-=(number v)
nil operator-=(Quaternion q)
operator/
Quaternion operator/(number v)
operator/=
nil operator/=(number v)

RaycastOut Class

Contains the result of a physics raycast.

  • P: Position of the raycast hit
  • N: Normal of the raycast hit
  • Node: Node hit by the raycast
  • t: Parametric value of the intersection, ratio of the distance to the hit by the length of the raycast

Variables

NameType
NVec3
PVec3
nodeNode
tnumber

RaycastOutList Class

Functions

NamePrototypeDocumentation
at
RaycastOut at(integer idx)
clear
nil clear()
push_back
nil push_back(RaycastOut v)
reserve
nil reserve(integer size)
size
integer size()

Rect Class

Variables

NameType
exnumber
eynumber
sxnumber
synumber

Functions

NamePrototypeDocumentation
Constructor
Rect Constructor()
Rect Constructor(number x, number y)
Rect Constructor(number sx, number sy, number ex, number ey)
Rect Constructor(Rect rect)

RenderState Class

RigidBody Class

Rigid body component, see Physics.

Functions

NamePrototypeDocumentation
GetAngularDamping
number GetAngularDamping()

Return the rigid body angular damping. A value of 0.0 means no damping, 1.0 means the maximal dissipation of the energy.

GetContinuousCollisionDetection
boolean GetContinuousCollisionDetection()
GetFriction
number GetFriction()
GetLinearDamping
number GetLinearDamping()
GetRestitution
number GetRestitution()
GetRollingFriction
number GetRollingFriction()
GetType
RigidBodyType GetType()

Return the rigid body type. See RigidBody.SetType.

IsValid
boolean IsValid()
SetAngularDamping
nil SetAngularDamping(number damping)

Set the rigid body angular damping. A value of 0.0 means no damping, 1.0 means the maximal dissipation of the energy.

SetContinuousCollisionDetection
nil SetContinuousCollisionDetection(boolean enable)
SetFriction
nil SetFriction(number friction)
SetLinearDamping
nil SetLinearDamping(number damping)
SetRestitution
nil SetRestitution(number restitution)
SetRollingFriction
nil SetRollingFriction(number rolling_friction)
SetType
nil SetType(RigidBodyType type)

Set the rigid body type.

operator==
boolean operator==(RigidBody b)

SAO Class

Ambient occlusion post-process object holding internal states and resources.

Create with CreateSAOFromFile or CreateSAOFromAssets, use with ComputeSAO, finally call DestroySAO to dispose of resources when done.

Scene Class

A scene object representing a world populated with Node, see Working with Scene.

Variables

NameType
canvasCanvas
environmentEnvironment

Functions

NamePrototypeDocumentation
Clear
nil Clear()

Remove all nodes from the scene.

ComputeCurrentCameraViewState
ViewState ComputeCurrentCameraViewState(Vec2 aspect_ratio)
ComputeWorldMatrices
nil ComputeWorldMatrices()
Constructor
Scene Constructor()
CreateCamera
Camera CreateCamera()
Camera CreateCamera(number znear, number zfar)
Camera CreateCamera(number znear, number zfar, number fov)
CreateCollision
Collision CreateCollision()
CreateInstance
Instance CreateInstance()
CreateLight
Light CreateLight()
CreateLinearLight
Light CreateLinearLight(Color diffuse, number diffuse_intensity, Color specular, number specular_intensity)
Light CreateLinearLight(Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority)
Light CreateLinearLight(Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type)
Light CreateLinearLight(Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias)
Light CreateLinearLight(Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias, Vec4 pssm_split)
Light CreateLinearLight(Color diffuse, Color specular)
Light CreateLinearLight(Color diffuse, Color specular, number priority)
Light CreateLinearLight(Color diffuse, Color specular, number priority, LightShadowType shadow_type)
Light CreateLinearLight(Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias)
Light CreateLinearLight(Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias, Vec4 pssm_split)
CreateNode
Node CreateNode()
Node CreateNode(string name)

Create a Node in the scene.

CreateObject
Object CreateObject()
Object CreateObject(ModelRef model, MaterialList materials)
CreateOrthographicCamera
Camera CreateOrthographicCamera(number znear, number zfar)
Camera CreateOrthographicCamera(number znear, number zfar, number size)
CreatePointLight
Light CreatePointLight(number radius, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity)
Light CreatePointLight(number radius, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority)
Light CreatePointLight(number radius, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type)
Light CreatePointLight(number radius, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias)
Light CreatePointLight(number radius, Color diffuse, Color specular)
Light CreatePointLight(number radius, Color diffuse, Color specular, number priority)
Light CreatePointLight(number radius, Color diffuse, Color specular, number priority, LightShadowType shadow_type)
Light CreatePointLight(number radius, Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias)
CreateRigidBody
RigidBody CreateRigidBody()
CreateScript
Script CreateScript()
Script CreateScript(string path)
CreateSpotLight
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias, number shadow_near)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias, number shadow_near, number shadow_far)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, Color specular)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, Color specular, number priority)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, Color specular, number priority, LightShadowType shadow_type)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias, number shadow_near)
Light CreateSpotLight(number radius, number inner_angle, number outer_angle, Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias, number shadow_near, number shadow_far)
CreateTransform
Transform CreateTransform()
Transform CreateTransform(Vec3 T)
Transform CreateTransform(Vec3 T, Vec3 R)
Transform CreateTransform(Vec3 T, Vec3 R, Vec3 S)
DestroyCamera
nil DestroyCamera(Camera camera)
DestroyCollision
nil DestroyCollision(Collision collision)
DestroyInstance
nil DestroyInstance(Instance Instance)
DestroyLight
nil DestroyLight(Light light)
DestroyNode
nil DestroyNode(Node node)

Remove a Node from the scene.

DestroyObject
nil DestroyObject(Object object)
DestroyRigidBody
nil DestroyRigidBody(RigidBody rigid_body)
DestroyScript
nil DestroyScript(Script script)
DestroyTransform
nil DestroyTransform(Transform transform)
GarbageCollect
integer GarbageCollect()

Destroy any unreferenced components in the scene.

GetAllNodeCount
integer GetAllNodeCount()

Return the total number of nodes in the scene including instantiated ones. To exclude those, use Scene.GetNodeCount.

GetAllNodes
NodeList GetAllNodes()
GetAllNodesWithComponent
NodeList GetAllNodesWithComponent(NodeComponentIdx idx)
GetCurrentCamera
Node GetCurrentCamera()

Get the current camera.

GetKeys
StringList GetKeys()
GetMinMax
boolean, MinMax GetMinMax(PipelineResources resources)
GetNode
Node GetNode(string name)

Get a node by name. For more complex queries see Scene.GetNodeEx.

GetNodeChildren
NodeList GetNodeChildren(Node node)

Return all children for a given node.

GetNodeCount
integer GetNodeCount()

Return the number of nodes in the scene excluding instantiated ones. To include those, use Scene.GetAllNodeCount.

GetNodeEx
Node GetNodeEx(string path)

Get a node by its absolute path in the node hierarchy.

A node path is constructed as follow:

  • Nodes are refered to by their name.
  • To address the child of a node, use the / delimiter between its parent name and the child name.
  • To address a node inside an instance component, use the : delimiter.
  • There is no limit on the number of delimiters you can use.

Examples:

Get the node named child parented to the root node.

child = scene.GetNodeEx('root/child')

Get the node named dummy instantiated by the root node.

dummy = my_scene.GetNodeEx('root:dummy')
GetNodes
NodeList GetNodes()

Return all nodes in scene.

GetNodesWithComponent
NodeList GetNodesWithComponent(NodeComponentIdx idx)
GetPlayingAnimNames
StringList GetPlayingAnimNames()
GetPlayingAnimRefs
ScenePlayAnimRefList GetPlayingAnimRefs()
GetSceneAnim
SceneAnimRef GetSceneAnim(string name)
GetSceneAnims
SceneAnimRefList GetSceneAnims()
GetScript
Script GetScript(integer slot_idx)
GetScriptCount
integer GetScriptCount()
GetValue
string GetValue(string key)
HasKey
boolean HasKey(string key)
IsChildOf
boolean IsChildOf(Node node, Node parent)
IsPlaying
boolean IsPlaying(ScenePlayAnimRef ref)
IsRoot
boolean IsRoot(Node node)
PlayAnim
ScenePlayAnimRef PlayAnim(SceneAnimRef ref, AnimLoopMode loop_mode)
ScenePlayAnimRef PlayAnim(SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing)
ScenePlayAnimRef PlayAnim(SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing, integer t_start)
ScenePlayAnimRef PlayAnim(SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing, integer t_start, integer t_end)
ScenePlayAnimRef PlayAnim(SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing, integer t_start, integer t_end, boolean paused)
ScenePlayAnimRef PlayAnim(SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing, integer t_start, integer t_end, boolean paused, number t_scale)
ReadyWorldMatrices
nil ReadyWorldMatrices()
RemoveKey
nil RemoveKey(string key)
ReserveCameras
nil ReserveCameras(integer count)
ReserveLights
nil ReserveLights(integer count)

Allocates internal storage for the required number of Light components in one go.

ReserveNodes
nil ReserveNodes(integer count)

Allocates internal storage for the required number of nodes in one go.

ReserveObjects
nil ReserveObjects(integer count)

Allocates internal storage for the required number of Object components in one go.

ReserveScripts
nil ReserveScripts(integer count)
ReserveTransforms
nil ReserveTransforms(integer count)

Allocates internal storage for the required number of Transform components in one go.

SetCurrentCamera
nil SetCurrentCamera(Node camera)

Set the current camera.

SetProbe
nil SetProbe(TextureRef irradiance, TextureRef radiance, TextureRef brdf)
SetScript
nil SetScript(integer slot_idx, Script script)
SetValue
nil SetValue(string key, string value)
StopAllAnims
nil StopAllAnims()
StopAnim
nil StopAnim(ScenePlayAnimRef ref)
Update
nil Update(integer dt)

Start the Update phase of the scene.

UpdatePlayingAnims
nil UpdatePlayingAnims(integer dt)

SceneAnimRef Class

Reference to a scene animation.

SceneAnimRefList Class

Functions

NamePrototypeDocumentation
at
SceneAnimRef at(integer idx)
clear
nil clear()
push_back
nil push_back(SceneAnimRef v)
reserve
nil reserve(integer size)
size
integer size()

SceneBullet3Physics Class

Newton physics for scene physics and collision components.

See Physics.

Functions

NamePrototypeDocumentation
Add6DofConstraint
btGeneric6DofConstraint Add6DofConstraint(Node nodeA, Node nodeB, Mat4 anchorALocal, Mat4 anchorBInLocalSpaceA)
Clear
nil Clear()
ClearNodes
nil ClearNodes()
CollectCollisionEvents
NodePairContacts CollectCollisionEvents(Scene scene)
Constructor
SceneBullet3Physics Constructor()
SceneBullet3Physics Constructor(integer thread_count)
GarbageCollect
integer GarbageCollect(Scene scene)
GarbageCollectResources
integer GarbageCollectResources()
NodeAddForce
nil NodeAddForce(Node node, Vec3 F)
nil NodeAddForce(Node node, Vec3 F, Vec3 world_pos)
NodeAddImpulse
nil NodeAddImpulse(Node node, Vec3 dt_velocity)
nil NodeAddImpulse(Node node, Vec3 dt_velocity, Vec3 world_pos)
NodeAddTorque
nil NodeAddTorque(Node node, Vec3 T)
NodeAddTorqueImpulse
nil NodeAddTorqueImpulse(Node node, Vec3 dt_angular_velocity)
NodeCollideWorld
NodePairContacts NodeCollideWorld(Node node, Mat4 world)
NodePairContacts NodeCollideWorld(Node node, Mat4 world, integer max_contact)
NodeCreatePhysicsFromAssets
nil NodeCreatePhysicsFromAssets(Node node)
NodeCreatePhysicsFromFile
nil NodeCreatePhysicsFromFile(Node node)
NodeDestroyPhysics
nil NodeDestroyPhysics(Node node)
NodeGetAngularFactor
Vec3 NodeGetAngularFactor(Node node)
NodeGetAngularVelocity
Vec3 NodeGetAngularVelocity(Node node)
NodeGetDeactivation
boolean NodeGetDeactivation(Node node)
NodeGetLinearFactor
Vec3 NodeGetLinearFactor(Node node)
NodeGetLinearVelocity
Vec3 NodeGetLinearVelocity(Node node)
NodeGetPointVelocity
Vec3 NodeGetPointVelocity(Node node, Vec3 world_pos)
NodeHasBody
boolean NodeHasBody(Node node)
NodeIsSleeping
boolean NodeIsSleeping(Node node)
NodeResetWorld
nil NodeResetWorld(Node node, Mat4 world)
NodeSetAngularFactor
nil NodeSetAngularFactor(Node node, Vec3 k)
NodeSetAngularVelocity
nil NodeSetAngularVelocity(Node node, Vec3 W)
NodeSetDeactivation
nil NodeSetDeactivation(Node node, boolean enable)
NodeSetLinearFactor
nil NodeSetLinearFactor(Node node, Vec3 k)
NodeSetLinearVelocity
nil NodeSetLinearVelocity(Node node, Vec3 V)
NodeStartTrackingCollisionEvents
nil NodeStartTrackingCollisionEvents(Node node)
nil NodeStartTrackingCollisionEvents(Node node, CollisionEventTrackingMode mode)
NodeStopTrackingCollisionEvents
nil NodeStopTrackingCollisionEvents(Node node)
NodeTeleport
nil NodeTeleport(Node node, Mat4 world)
NodeWake
nil NodeWake(Node node)
RaycastAllHits
RaycastOutList RaycastAllHits(Scene scene, Vec3 p0, Vec3 p1)
RaycastFirstHit
RaycastOut RaycastFirstHit(Scene scene, Vec3 p0, Vec3 p1)
Remove6DofConstraint
nil Remove6DofConstraint(btGeneric6DofConstraint constraint6Dof)
RenderCollision
nil RenderCollision(integer view_id, VertexLayout vtx_layout, ProgramHandle prg, RenderState render_state, integer depth)
SceneCreatePhysicsFromAssets
nil SceneCreatePhysicsFromAssets(Scene scene)
SceneCreatePhysicsFromFile
nil SceneCreatePhysicsFromFile(Scene scene)
SetPreTickCallback
nil SetPreTickCallback(SceneBullet3PhysicsPreTickCallback cbk)
StepSimulation
nil StepSimulation(integer display_dt)
nil StepSimulation(integer display_dt, integer step_dt)
nil StepSimulation(integer display_dt, integer step_dt, integer max_step)
SyncTransformsFromScene
nil SyncTransformsFromScene(Scene scene)
SyncTransformsToScene
nil SyncTransformsToScene(Scene scene)

SceneBullet3PhysicsPreTickCallback Class

SceneClocks Class

Holds clocks for the different scene systems.

This is required as some system such as the physics system may run at a different rate than the scene.

SceneForwardPipelinePassViewId Class

SceneForwardPipelineRenderData Class

Holds all data required to draw a scene with the forward pipeline.

See Using the Forward Pipeline.

SceneLuaVM Class

Lua VM for scene script components.

See Scripting.

Functions

NamePrototypeDocumentation
Call
boolean, LuaObjectList Call(Script script, string function, LuaObjectList args)
Constructor
SceneLuaVM Constructor()
CreateNodeScriptsFromAssets
ScriptList CreateNodeScriptsFromAssets(Scene scene, Node node)
CreateNodeScriptsFromFile
ScriptList CreateNodeScriptsFromFile(Scene scene, Node node)
CreateScriptFromAssets
boolean CreateScriptFromAssets(Scene scene, Script script)
CreateScriptFromFile
boolean CreateScriptFromFile(Scene scene, Script script)
CreateScriptFromSource
boolean CreateScriptFromSource(Scene scene, Script script, string src)
DestroyScripts
nil DestroyScripts(ScriptList scripts)
GarbageCollect
ScriptList GarbageCollect(Scene scene)
GetScriptCount
integer GetScriptCount()
GetScriptEnv
LuaObject GetScriptEnv(Script script)
GetScriptInterface
StringList GetScriptInterface(Script script)
GetScriptValue
LuaObject GetScriptValue(Script script, string name)
MakeLuaObject
LuaObject MakeLuaObject()
SceneCreateScriptsFromAssets
ScriptList SceneCreateScriptsFromAssets(Scene scene)
SceneCreateScriptsFromFile
ScriptList SceneCreateScriptsFromFile(Scene scene)
SetScriptValue
boolean SetScriptValue(Script script, string name, LuaObject value)
boolean SetScriptValue(Script script, string name, LuaObject value, boolean notify)

ScenePhysics Class

Functions

NamePrototypeDocumentation
Add6DofConstraint
nil Add6DofConstraint(Node nodeA, Node nodeB, Mat4 anchorALocal, Mat4 anchorBInLocalSpaceA)
Clear
nil Clear()
ClearNodes
nil ClearNodes()
CollectCollisionEvents
NodePairContacts CollectCollisionEvents(Scene scene)
Constructor
ScenePhysics Constructor()
ScenePhysics Constructor(integer thread_count)
GarbageCollect
integer GarbageCollect(Scene scene)
GarbageCollectResources
integer GarbageCollectResources()
NodeAddForce
nil NodeAddForce(Node node, Vec3 F)
nil NodeAddForce(Node node, Vec3 F, Vec3 world_pos)
NodeAddImpulse
nil NodeAddImpulse(Node node, Vec3 dt_velocity)
nil NodeAddImpulse(Node node, Vec3 dt_velocity, Vec3 world_pos)
NodeAddTorque
nil NodeAddTorque(Node node, Vec3 T)
NodeAddTorqueImpulse
nil NodeAddTorqueImpulse(Node node, Vec3 dt_angular_velocity)
NodeCreatePhysicsFromAssets
nil NodeCreatePhysicsFromAssets(Node node)
NodeCreatePhysicsFromFile
nil NodeCreatePhysicsFromFile(Node node)
NodeDestroyPhysics
nil NodeDestroyPhysics(Node node)
NodeGetAngularFactor
Vec3 NodeGetAngularFactor(Node node)
NodeGetAngularVelocity
Vec3 NodeGetAngularVelocity(Node node)
NodeGetDeactivation
boolean NodeGetDeactivation(Node node)
NodeGetLinearFactor
Vec3 NodeGetLinearFactor(Node node)
NodeGetLinearVelocity
Vec3 NodeGetLinearVelocity(Node node)
NodeGetPointVelocity
Vec3 NodeGetPointVelocity(Node node, Vec3 world_pos)
NodeHasBody
boolean NodeHasBody(Node node)
NodeIsSleeping
boolean NodeIsSleeping(Node node)
NodeResetWorld
nil NodeResetWorld(Node node, Mat4 world)
NodeSetAngularFactor
nil NodeSetAngularFactor(Node node, Vec3 k)
NodeSetAngularVelocity
nil NodeSetAngularVelocity(Node node, Vec3 W)
NodeSetDeactivation
nil NodeSetDeactivation(Node node, boolean enable)
NodeSetLinearFactor
nil NodeSetLinearFactor(Node node, Vec3 k)
NodeSetLinearVelocity
nil NodeSetLinearVelocity(Node node, Vec3 V)
NodeStartTrackingCollisionEvents
nil NodeStartTrackingCollisionEvents(Node node)
nil NodeStartTrackingCollisionEvents(Node node, CollisionEventTrackingMode mode)
NodeStopTrackingCollisionEvents
nil NodeStopTrackingCollisionEvents(Node node)
NodeTeleport
nil NodeTeleport(Node node, Mat4 world)
NodeWake
nil NodeWake(Node node)
RaycastAllHits
RaycastOutList RaycastAllHits(Scene scene, Vec3 p0, Vec3 p1)
RaycastFirstHit
RaycastOut RaycastFirstHit(Scene scene, Vec3 p0, Vec3 p1)
RenderCollision
nil RenderCollision(integer view_id, VertexLayout vtx_layout, ProgramHandle prg, RenderState render_state, integer depth)
SceneCreatePhysicsFromAssets
nil SceneCreatePhysicsFromAssets(Scene scene)
SceneCreatePhysicsFromFile
nil SceneCreatePhysicsFromFile(Scene scene)
SetPreTickCallback
nil SetPreTickCallback(ScenePhysicsPreTickCallback cbk)
StepSimulation
nil StepSimulation(integer display_dt)
nil StepSimulation(integer display_dt, integer step_dt)
nil StepSimulation(integer display_dt, integer step_dt, integer max_step)
SyncTransformsFromScene
nil SyncTransformsFromScene(Scene scene)
SyncTransformsToScene
nil SyncTransformsToScene(Scene scene)

ScenePhysicsPreTickCallback Class

ScenePlayAnimRef Class

Reference to a playing scene animation.

ScenePlayAnimRefList Class

Functions

NamePrototypeDocumentation
at
ScenePlayAnimRef at(integer idx)
clear
nil clear()
push_back
nil push_back(ScenePlayAnimRef v)
reserve
nil reserve(integer size)
size
integer size()

SceneView Class

Holds a view to a subset of a scene. Used by the instance system to track instantiated scene content.

See Node.GetInstanceSceneView and Working with Scene.

Functions

NamePrototypeDocumentation
GetNode
Node GetNode(Scene scene, string name)

Find a node by name in the view. Pass the host scene as the scene parameter.

See Working with Scene.

GetNodes
NodeList GetNodes(Scene scene)

Return all nodes in the view. Pass the host scene as the scene parameter.

See Working with Scene.

Script Class

Functions

NamePrototypeDocumentation
GetPath
string GetPath()
IsValid
boolean IsValid()
SetPath
nil SetPath(string path)
operator==
boolean operator==(Script s)

ScriptList Class

Functions

NamePrototypeDocumentation
at
Script at(integer idx)
clear
nil clear()
push_back
nil push_back(Script v)
reserve
nil reserve(integer size)
size
integer size()

SetDrawStatesCallback Class

Signal_returning_void_taking_const_char_ptr Class

Functions

NamePrototypeDocumentation
Connect
Disconnect
nil Disconnect(TextInputCallbackConnection connection)
DisconnectAll
nil DisconnectAll()
Emit
nil Emit(string arg0)
GetListenerCount
integer GetListenerCount()

Signal_returning_void_taking_time_ns Class

Functions

NamePrototypeDocumentation
Connect
Disconnect
nil Disconnect(TimeCallbackConnection connection)
DisconnectAll
nil DisconnectAll()
Emit
nil Emit(integer arg0)
GetListenerCount
integer GetListenerCount()

SpatializedSourceState Class

State for a spatialized audio source, see Playing Audio.

Variables

NameType
mtxMat4
repeatSourceRepeat
velVec3
volumenumber

Functions

NamePrototypeDocumentation
Constructor
SpatializedSourceState Constructor(Mat4 mtx)
SpatializedSourceState Constructor(Mat4 mtx, number volume)
SpatializedSourceState Constructor(Mat4 mtx, number volume, SourceRepeat repeat)
SpatializedSourceState Constructor(Mat4 mtx, number volume, SourceRepeat repeat, Vec3 vel)

SRanipalEyeState Class

Variables

NameType
eye_opennessnumber
gaze_direction_normalizedVec3
gaze_origin_mmVec3
pupil_diameter_mmnumber
pupil_diameter_validboolean

SRanipalState Class

Variables

NameType
left_eyeSRanipalEyeState
right_eyeSRanipalEyeState

StereoSourceState Class

State for a stereo audio source, see Playing Audio.

Variables

NameType
panningnumber
repeatSourceRepeat
volumenumber

Functions

NamePrototypeDocumentation
Constructor
StereoSourceState Constructor()
StereoSourceState Constructor(number volume)
StereoSourceState Constructor(number volume, SourceRepeat repeat)
StereoSourceState Constructor(number volume, SourceRepeat repeat, number panning)

StringList Class

Functions

NamePrototypeDocumentation
at
string at(integer idx)
clear
nil clear()
push_back
nil push_back(string v)
reserve
nil reserve(integer size)
size
integer size()

TextInputCallback Class

TextInputCallbackConnection Class

Texture Class

TextureInfo Class

Variables

NameType
bitsPerPixelinteger
cubeMapboolean
depthinteger
formatTextureFormat
heightinteger
numLayersinteger
numMipsinteger
storageSizeinteger
widthinteger

TextureRef Class

TimeCallback Class

A function taking a time value as parameter with no return value, see Coordinates and Units System.

TimeCallbackConnection Class

Transform Class

Transformation component for a Node, see Working with Scene.

Functions

NamePrototypeDocumentation
ClearParent
nil ClearParent()
GetParent
Node GetParent()

Return the parent node for this Transform.

GetPos
Vec3 GetPos()

Return the transform position.

If you want the visual position of a Node with a rigid body, use GetT on Transform.GetWorld. See Physics.

GetPosRot
Vec3, Vec3 GetPosRot()
GetRot
Vec3 GetRot()

Get the transform rotation. If you want the visual rotation of a Node with a rigid body, use GetRotation on the matrix returned by Transform.GetWorld. See Physics.

GetScale
Vec3 GetScale()

Get the transform scale.

GetTRS
TransformTRS GetTRS()

Return the TransformTRS.

GetWorld
Mat4 GetWorld()

Return the world matrix.

IsValid
boolean IsValid()
SetLocal
nil SetLocal(Mat4 local)
SetParent
nil SetParent(Node n)

Set the parent node for this transform. This transform will then inherit the transformation of its parent node's Transform component.

SetPos
nil SetPos(Vec3 T)

Set the transform position.

When the Node has a RigidBody component, Transform.SetPos is overrided by physics. See Physics.

SetPosRot
nil SetPosRot(Vec3 pos, Vec3 rot)
SetRot
nil SetRot(Vec3 R)

Set the transform rotation from a vector of Euler angles.

When the Node has a RigidBody component, Transform.SetRot is overrided by physics. See Physics.

SetScale
nil SetScale(Vec3 S)

Set the transform scale.

SetTRS
nil SetTRS(TransformTRS TRS)

Set the TransformTRS.

SetWorld
nil SetWorld(Mat4 world)

Set the world matrix.

When the Node has a RigidBody component, SetWorld is overrided by physics.

operator==
boolean operator==(Transform t)

TransformTRS Class

Translation, rotation and scale packed as a single object.

Variables

NameType
posVec3
rotVec3
sclVec3

Functions

NamePrototypeDocumentation
Constructor
TransformTRS Constructor()

UInt16List Class

Functions

NamePrototypeDocumentation
at
integer at(integer idx)
clear
nil clear()
push_back
nil push_back(integer v)
reserve
nil reserve(integer size)
size
integer size()

UInt32List Class

Functions

NamePrototypeDocumentation
at
integer at(integer idx)
clear
nil clear()
push_back
nil push_back(integer v)
reserve
nil reserve(integer size)
size
integer size()

UniformSetTexture Class

Command object to set a uniform texture at draw time.

UniformSetTextureList Class

Functions

NamePrototypeDocumentation
at
UniformSetTexture at(integer idx)
clear
nil clear()
push_back
nil push_back(UniformSetTexture v)
reserve
nil reserve(integer size)
size
integer size()

UniformSetValue Class

Command object to set a uniform value at draw time.

UniformSetValueList Class

Functions

NamePrototypeDocumentation
at
UniformSetValue at(integer idx)
clear
nil clear()
push_back
nil push_back(UniformSetValue v)
reserve
nil reserve(integer size)
size
integer size()

update_controllersCallback Class

Vec2 Class

2-dimensional floating point vector.

Variables

NameType
Onestatic Vec2
Zerostatic Vec2
xnumber
ynumber

Functions

NamePrototypeDocumentation
Constructor
Vec2 Constructor()
Vec2 Constructor(number x, number y)
Vec2 Constructor(Vec2 v)
Vec2 Constructor(Vec3 v)
Vec2 Constructor(Vec4 v)
Set
nil Set(number x, number y)
operator*
Vec2 operator*(Vec2 v)
Vec2 operator*(number k)
operator*=
nil operator*=(Vec2 v)
nil operator*=(number k)
operator+
Vec2 operator+(Vec2 v)
Vec2 operator+(number k)
operator+=
nil operator+=(Vec2 v)
nil operator+=(number k)
operator-
Vec2 operator-(Vec2 v)
Vec2 operator-(number k)
operator-=
nil operator-=(Vec2 v)
nil operator-=(number k)
operator/
Vec2 operator/(Vec2 v)
Vec2 operator/(number k)
operator/=
nil operator/=(Vec2 v)
nil operator/=(number k)

Vec2List Class

Functions

NamePrototypeDocumentation
at
Vec2 at(integer idx)

Gets the element at the specified index.

clear
nil clear()
push_back
nil push_back(Vec2 v)

Adds an element to the end.

reserve
nil reserve(integer size)
size
integer size()

Returns the number of stored elements.

Vec3 Class

3-dimensional vector.

Variables

NameType
Backstatic Vec3
Downstatic Vec3
Frontstatic Vec3
Leftstatic Vec3
Onestatic Vec3
Rightstatic Vec3
Upstatic Vec3
Zerostatic Vec3
xnumber
ynumber
znumber

Functions

NamePrototypeDocumentation
Constructor
Vec3 Constructor()
Vec3 Constructor(number x, number y, number z)
Vec3 Constructor(Vec2 v)
Vec3 Constructor(iVec2 v)
Vec3 Constructor(Vec3 v)
Vec3 Constructor(Vec4 v)
Set
nil Set(number x, number y, number z)
operator!=
boolean operator!=(Vec3 v)
operator*
Vec3 operator*(Vec3 v)
Vec3 operator*(number k)
operator*=
nil operator*=(Vec3 v)
nil operator*=(number k)
operator+
Vec3 operator+(Vec3 v)
Vec3 operator+(number k)
operator+=
nil operator+=(Vec3 v)
nil operator+=(number k)
operator-
Vec3 operator-(Vec3 v)
Vec3 operator-(number k)
operator-=
nil operator-=(Vec3 v)
nil operator-=(number k)
operator/
Vec3 operator/(Vec3 v)
Vec3 operator/(number k)
operator/=
nil operator/=(Vec3 v)
nil operator/=(number k)
operator==
boolean operator==(Vec3 v)

Vec3List Class

Functions

NamePrototypeDocumentation
at
Vec3 at(integer idx)
clear
nil clear()
push_back
nil push_back(Vec3 v)
reserve
nil reserve(integer size)
size
integer size()

Vec4 Class

4-dimensional vector.

Variables

NameType
wnumber
xnumber
ynumber
znumber

Functions

NamePrototypeDocumentation
Constructor
Vec4 Constructor()
Vec4 Constructor(number x, number y, number z)
Vec4 Constructor(number x, number y, number z, number w)
Vec4 Constructor(Vec2 v)
Vec4 Constructor(iVec2 v)
Vec4 Constructor(Vec3 v)
Vec4 Constructor(Vec4 v)
Set
nil Set(number x, number y, number z)
nil Set(number x, number y, number z, number w)
operator*
Vec4 operator*(Vec4 v)
Vec4 operator*(number k)
operator*=
nil operator*=(Vec4 v)
nil operator*=(number k)
operator+
Vec4 operator+(Vec4 v)
Vec4 operator+(number k)
operator+=
nil operator+=(Vec4 v)
nil operator+=(number k)
operator-
Vec4 operator-(Vec4 v)
Vec4 operator-(number k)
operator-=
nil operator-=(Vec4 v)
nil operator-=(number k)
operator/
Vec4 operator/(Vec4 v)
Vec4 operator/(number k)
operator/=
nil operator/=(Vec4 v)
nil operator/=(number k)

Vec4List Class

Functions

NamePrototypeDocumentation
at
Vec4 at(integer idx)
clear
nil clear()
push_back
nil push_back(Vec4 v)
reserve
nil reserve(integer size)
size
integer size()

Vertex Class

Variables

NameType
binormalVec3
color0Color
color1Color
color2Color
color3Color
normalVec3
posVec3
tangentVec3
uv0Vec2
uv1Vec2
uv2Vec2
uv3Vec2
uv4Vec2
uv5Vec2
uv6Vec2
uv7Vec2

Functions

NamePrototypeDocumentation
Constructor
Vertex Constructor()

VertexLayout Class

Memory layout and types of vertex attributes.

Functions

NamePrototypeDocumentation
Add
VertexLayout Add(Attrib attrib, integer count, AttribType type)
VertexLayout Add(Attrib attrib, integer count, AttribType type, boolean normalized)
VertexLayout Add(Attrib attrib, integer count, AttribType type, boolean normalized, boolean as_int)
Begin
VertexLayout Begin()
Constructor
VertexLayout Constructor()
End
nil End()
GetOffset
integer GetOffset(Attrib attrib)
GetSize
integer GetSize(integer count)
GetStride
integer GetStride()
Has
boolean Has(Attrib attrib)
Skip
VertexLayout Skip(integer size)

Vertices Class

Helper class to generate vertex buffers for drawing primitives.

Functions

NamePrototypeDocumentation
Begin
Vertices Begin(integer vertex_index)
Clear
nil Clear()
Constructor
Vertices Constructor(VertexLayout decl, integer count)
End
nil End()
nil End(boolean validate)
GetCapacity
integer GetCapacity()
GetCount
integer GetCount()
GetData
VoidPointer GetData()
GetDecl
VertexLayout GetDecl()
GetSize
integer GetSize()
Reserve
nil Reserve(integer count)
Resize
nil Resize(integer count)
SetBinormal
Vertices SetBinormal(Vec3 binormal)
SetColor0
Vertices SetColor0(Color color)
SetColor1
Vertices SetColor1(Color color)
SetColor2
Vertices SetColor2(Color color)
SetColor3
Vertices SetColor3(Color color)
SetNormal
Vertices SetNormal(Vec3 normal)
SetPos
Vertices SetPos(Vec3 pos)
SetTangent
Vertices SetTangent(Vec3 tangent)
SetTexCoord0
Vertices SetTexCoord0(Vec2 uv)
SetTexCoord1
Vertices SetTexCoord1(Vec2 uv)
SetTexCoord2
Vertices SetTexCoord2(Vec2 uv)
SetTexCoord3
Vertices SetTexCoord3(Vec2 uv)
SetTexCoord4
Vertices SetTexCoord4(Vec2 uv)
SetTexCoord5
Vertices SetTexCoord5(Vec2 uv)
SetTexCoord6
Vertices SetTexCoord6(Vec2 uv)
SetTexCoord7
Vertices SetTexCoord7(Vec2 uv)

ViewState Class

Everything required to define an observer inside a 3d world. This object holds the projection matrix and its associated frustum as well as the transformation of the observer.

The world content is transformed by the observer view matrix before being projected to screen using its projection matrix.

Variables

NameType
frustumFrustum
projMat44
viewMat4

VoidPointer Class

VRController Class

Helper class holding the current and previous device state to enable delta state queries.

Use GetVRControllerNames to query for available VR controller devices.

Functions

NamePrototypeDocumentation
Connected
boolean Connected()

Gamepad was connected since the last update.

Constructor
VRController Constructor()
VRController Constructor(string name)
Disconnected
boolean Disconnected()

Gamepad was disconnected since the last update.

Down
boolean Down(VRControllerButton btn)
DtSurface
Vec2 DtSurface(integer idx)
IsConnected
boolean IsConnected()

Gamepad is currently connected.

Pressed
boolean Pressed(VRControllerButton btn)
Released
boolean Released(VRControllerButton btn)
SendHapticPulse
nil SendHapticPulse(integer duration)
Surface
Vec2 Surface(integer idx)
Touch
boolean Touch(VRControllerButton btn)
TouchEnd
boolean TouchEnd(VRControllerButton btn)
TouchStart
boolean TouchStart(VRControllerButton btn)
Update
nil Update()
World
Mat4 World()

VRControllerState Class

Functions

NamePrototypeDocumentation
IsConnected
boolean IsConnected()
Pressed
boolean Pressed(VRControllerButton btn)
Surface
Vec2 Surface(integer idx)
Touched
boolean Touched(VRControllerButton btn)
World
Mat4 World()

VRGenericTracker Class

Helper class holding the current and previous device state to enable delta state queries.

Use GetVRGenericTrackerNames to query for available VR generic tracker devices.

Functions

NamePrototypeDocumentation
Constructor
VRGenericTracker Constructor()
VRGenericTracker Constructor(string name)
IsConnected
boolean IsConnected()
Update
nil Update()
World
Mat4 World()

VRGenericTrackerState Class

Functions

NamePrototypeDocumentation
IsConnected
boolean IsConnected()
World
Mat4 World()

Window Class

Window object.