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
| Name | Prototype | Documentation |
|---|---|---|
GetFov | number GetFov() | Return the camera field of view. |
GetIsOrthographic | boolean GetIsOrthographic() | Return |
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
| Name | Type |
|---|---|
zfar | number |
znear | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | CameraZRange Constructor() |
Canvas Class
Holds the canvas properties of a scene, see the canvas member of class Scene.
Variables
| Name | Type |
|---|---|
clear_color | boolean |
clear_z | boolean |
color | Color |
Collision Class
Collision component, see Physics.
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
Black | static Color |
Blue | static Color |
Green | static Color |
Grey | static Color |
One | static Color |
Orange | static Color |
Purple | static Color |
Red | static Color |
Transparent | static Color |
White | static Color |
Yellow | static Color |
Zero | static Color |
a | number |
b | number |
g | number |
r | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Color Constructor()
| 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*( number k) | |
operator*= | nil operator*=(Color color)nil operator*=(number k) | |
operator+ |
Color operator+( number k) | |
operator+= | nil operator+=(Color color)nil operator+=(number k) | |
operator- |
Color operator-( number k) | |
operator-= | nil operator-=(Color color)nil operator-=(number k) | |
operator/ |
Color operator/( number k) | |
operator/= | nil operator/=(Color color)nil operator/=(number k) | |
operator== | boolean operator==(Color color) |
ColorList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
N | Vec3 |
P | Vec3 |
d | number |
ContactList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
AddAgent | ||
Constructor | Crowd Constructor() | |
GetEditableAgent | CrowdAgent GetEditableAgent( integer idx) | |
Init | ||
RemoveAgent | nil RemoveAgent(integer idx) | |
RequestMoveTarget | ||
Update | nil Update(number dt) |
CrowdAgent Class
State of a crowd agent.
Functions
| Name | Prototype | Documentation |
|---|---|---|
GetPos | Vec3 GetPos() | |
GetVel | Vec3 GetVel() | |
SetPos | nil SetPos(Vec3 pos) |
CrowdAgentParams Class
Data Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Data Constructor() | |
GetSize | integer GetSize() | |
Rewind | nil Rewind() |
DearImguiContext Class
Context to render immediate GUI.
DirEntry Class
Variables
| Name | Type |
|---|---|
name | string |
type | integer |
DirEntryList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
ambient | Color |
brdf_map | TextureRef |
fog_color | Color |
fog_far | number |
fog_near | number |
File Class
Interface to a file on the host local filesystem.
FileFilter Class
Variables
| Name | Type |
|---|---|
name | string |
pattern | string |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | FileFilter Constructor() |
FileFilterList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
Flip | nil Flip(ViewState view_state) |
ForwardPipelineAAAConfig Class
Variables
| Name | Type |
|---|---|
bloom_bias | number |
bloom_intensity | number |
bloom_threshold | number |
compositing_params0 | Vec4 |
compositing_params1 | Vec4 |
compositing_params2 | Vec4 |
compositing_params3 | Vec4 |
dof_focus_length | number |
dof_focus_point | number |
exposure | number |
gamma | number |
max_distance | number |
motion_blur | number |
sample_count | integer |
temporal_aa_weight | number |
z_thickness | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | ForwardPipelineAAAConfig Constructor() |
ForwardPipelineFog Class
Fog properties for the forward pipeline.
Variables
| Name | Type |
|---|---|
color | Color |
far | number |
near | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | ForwardPipelineFog Constructor() |
ForwardPipelineLight Class
Single light for the forward pipeline. The complete lighting rig is passed as a ForwardPipelineLights, see PrepareForwardPipelineLights.
Variables
| Name | Type |
|---|---|
diffuse | Color |
inner_angle | number |
outer_angle | number |
priority | number |
pssm_split | Vec4 |
radius | number |
specular | Color |
type | ForwardPipelineLightType |
world | Mat4 |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | ForwardPipelineLight Constructor() |
ForwardPipelineLightList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
handle | FrameBufferHandle |
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
AddPolygon | ||
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
AddBezierCubic | ||
AddCircle | ||
AddCircleFilled | ||
AddConvexPolyFilled | ||
AddImage | ||
AddImageQuad | ||
AddImageRounded | ||
AddLine | ||
AddPolyline | ||
AddQuad | ||
AddQuadFilled | ||
AddRect | ||
AddRectFilled | ||
AddRectFilledMultiColor | ||
AddText | ||
AddTriangle | ||
AddTriangleFilled | ||
ChannelsMerge | nil ChannelsMerge() | |
ChannelsSetCurrent | nil ChannelsSetCurrent(integer channel_index) | |
ChannelsSplit | nil ChannelsSplit(integer channels_count) | |
GetClipRectMax | Vec2 GetClipRectMax() | |
GetClipRectMin | Vec2 GetClipRectMin() | |
PathArcTo | ||
PathArcToFast | ||
PathBezierCubicCurveTo | ||
PathClear | nil PathClear() | |
PathFillConvex | nil PathFillConvex(integer col) | |
PathLineTo | nil PathLineTo(Vec2 pos) | |
PathLineToMergeDuplicate | nil PathLineToMergeDuplicate(Vec2 pos) | |
PathRect | ||
PathStroke | nil PathStroke(integer col, boolean closed)nil PathStroke(integer col, boolean closed, number thickness) | |
PopClipRect | nil PopClipRect() | |
PopTextureID | nil PopTextureID() | |
PushClipRect | ||
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
ex | integer |
ey | integer |
sx | integer |
sy | integer |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | IntRect Constructor()
|
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
| Name | Type |
|---|---|
One | static iVec2 |
Zero | static iVec2 |
x | integer |
y | integer |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | iVec2 Constructor()
| |
Set | nil Set(integer x, integer y) | |
operator* |
iVec2 operator*( integer k) | |
operator*= | nil operator*=(iVec2 v)nil operator*=(integer k) | |
operator+ |
iVec2 operator+( integer k) | |
operator+= | nil operator+=(iVec2 v)nil operator+=(integer k) | |
operator- |
iVec2 operator-( integer k) | |
operator-= | nil operator-=(iVec2 v)nil operator-=(integer k) | |
operator/ |
iVec2 operator/( integer k) | |
operator/= | nil operator/=(iVec2 v)nil operator/=(integer k) |
iVec2List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
mn | Vec3 |
mx | Vec3 |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | MinMax Constructor()
| |
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
| Name | Prototype | Documentation |
|---|---|---|
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
Reference to a Model inside a PipelineResources object.
See LoadModelFromFile, LoadModelFromAssets and PipelineResources.AddModel.
Monitor Class
MonitorList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
frequency | integer |
name | string |
rect | IntRect |
rotation | MonitorRotation |
supported_rotations | integer |
MonitorModeList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
Button | boolean Button(MouseButton btn) | |
HWheel | integer HWheel() | |
Wheel | integer Wheel() | |
X | integer X() | |
Y | integer Y() |
Node Class
The base element of a scene, see Working with Scene.
Functions
| Name | Prototype | Documentation |
|---|---|---|
ComputeCameraViewState | ||
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) | |
GetCollisionCount | integer GetCollisionCount() | |
GetFlags | integer GetFlags() | |
GetInstance | Instance GetInstance() | |
GetInstanceSceneAnim | SceneAnimRef GetInstanceSceneAnim( string path) | |
GetInstanceSceneView | SceneView GetInstanceSceneView() | |
GetLight | Light GetLight() | Return the Light component of the node. |
GetMinMax | ||
GetName | string GetName() | Return the node name. |
GetObject | Object GetObject() | Return Object component of the node. |
GetRigidBody | RigidBody GetRigidBody() | |
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() | |
HasInstance | boolean HasInstance() | |
HasLight | boolean HasLight() | |
HasObject | boolean HasObject() | |
HasRigidBody | boolean HasRigidBody() | |
HasTransform | boolean HasTransform() | |
IsEnabled | boolean IsEnabled() | |
IsInstantiatedBy | Node IsInstantiatedBy() | |
IsItselfEnabled | boolean IsItselfEnabled() | |
IsValid | boolean IsValid() | Return |
RemoveCamera | nil RemoveCamera() | |
RemoveCollision | nil RemoveCollision(Collision c)nil RemoveCollision(integer slot) | |
RemoveLight | nil RemoveLight() | |
RemoveObject | nil RemoveObject() | |
RemoveRigidBody | nil RemoveRigidBody() | |
RemoveScript | nil RemoveScript(Script s)nil RemoveScript(integer slot) | |
RemoveTransform | nil RemoveTransform() | |
SetCamera | nil SetCamera(Camera c) | Set the Camera component of a node. See Scene.CreateCamera. |
SetCollision | ||
SetFlags | nil SetFlags(integer flags) | |
SetInstance | nil SetInstance(Instance instance) | |
SetLight | nil SetLight(Light l) | Set the Light component of a node. See Scene.CreateLight, Scene.CreatePointLight, Scene.CreateSpotLight or Scene.CreateLinearLight. |
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 | ||
SetTransform | nil SetTransform(Transform t) | Set the Transform component of a node. |
SetWorld | nil SetWorld(Mat4 world) | |
SetupInstanceFromAssets |
boolean SetupInstanceFromAssets(PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags) | |
SetupInstanceFromFile |
boolean SetupInstanceFromFile(PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags) | |
StartOnInstantiateAnim | nil StartOnInstantiateAnim() | |
StopOnInstantiateAnim | nil StopOnInstantiateAnim() | |
operator== | boolean operator==(Node n) | Return |
NodeList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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 | ||
GetModelRef | ModelRef GetModelRef() | Return the ModelRef to display. |
IsValid | boolean IsValid() | |
SetBone | ||
SetBoneCount | nil SetBoneCount(integer count) | |
SetMaterial | 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
| Name | Type |
|---|---|
offset | Mat4 |
projection | Mat44 |
OpenVREyeFrameBuffer Class
Framebuffer for a VR eye. Render to two such buffer, one for each eye, before submitting them using OpenVRSubmitFrame.
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
body | Mat4 |
head | Mat4 |
height | integer |
inv_head | Mat4 |
left | OpenVREye |
right | OpenVREye |
width | integer |
OpenXREyeFrameBuffer Class
OpenXREyeFrameBufferList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
id_fbs | intList |
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
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Picture Constructor()
| |
CopyData | ||
GetData | integer GetData() | |
GetFormat | PictureFormat GetFormat() | |
GetHeight | integer GetHeight() | Return the picture height. |
GetPixelRGBA | ||
GetWidth | integer GetWidth() | Return the picture width. |
SetData | ||
SetPixelRGBA |
Pipeline Class
Rendering pipeline base class.
PipelineInfo Class
Variables
| Name | Type |
|---|---|
name | string |
PipelineProgram Class
PipelineProgramRef Class
PipelineResources Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
AddModel | ||
AddProgram | ||
AddTexture | ||
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 | ||
GetModelName | string GetModelName(ModelRef ref) | |
GetProgram | PipelineProgram GetProgram(PipelineProgramRef ref) | |
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 | ||
UpdateProgram | ||
UpdateTexture |
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
| Name | Type |
|---|---|
w | number |
x | number |
y | number |
z | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Quaternion Constructor()
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 hitN: Normal of the raycast hitNode: Node hit by the raycastt: Parametric value of the intersection, ratio of the distance to the hit by the length of the raycast
Variables
| Name | Type |
|---|---|
N | Vec3 |
P | Vec3 |
node | Node |
t | number |
RaycastOutList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
ex | number |
ey | number |
sx | number |
sy | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Rect Constructor()
|
RenderState Class
RigidBody Class
Rigid body component, see Physics.
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
canvas | Canvas |
environment | Environment |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Clear | nil Clear() | Remove all nodes from the scene. |
ComputeCurrentCameraViewState | ||
ComputeWorldMatrices | nil ComputeWorldMatrices() | |
Constructor | Scene Constructor() | |
CreateCamera | Camera CreateCamera()
| |
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,
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()
| |
CreateOrthographicCamera | ||
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, 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()
| |
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 | ||
GetNode | Node GetNode( string name) | Get a node by name. For more complex queries see Scene.GetNodeEx. |
GetNodeChildren | 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:
Examples: Get the node named Get the node named |
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 | ||
IsPlaying | boolean IsPlaying(ScenePlayAnimRef ref) | |
IsRoot | boolean IsRoot(Node node) | |
PlayAnim | ScenePlayAnimRef PlayAnim(SceneAnimRef ref)
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 | ||
SetScript | ||
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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 | ||
NodeAddImpulse | ||
NodeAddTorque | ||
NodeAddTorqueImpulse | ||
NodeCollideWorld | ||
NodeCreatePhysicsFromAssets | nil NodeCreatePhysicsFromAssets(Node node) | |
NodeCreatePhysicsFromFile | nil NodeCreatePhysicsFromFile(Node node) | |
NodeDestroyPhysics | nil NodeDestroyPhysics(Node node) | |
NodeGetAngularFactor | ||
NodeGetAngularVelocity | ||
NodeGetDeactivation | boolean NodeGetDeactivation(Node node) | |
NodeGetLinearFactor | ||
NodeGetLinearVelocity | ||
NodeGetPointVelocity | ||
NodeHasBody | boolean NodeHasBody(Node node) | |
NodeIsSleeping | boolean NodeIsSleeping(Node node) | |
NodeResetWorld | ||
NodeSetAngularFactor | ||
NodeSetAngularVelocity | ||
NodeSetDeactivation | ||
NodeSetLinearFactor | ||
NodeSetLinearVelocity | ||
NodeStartTrackingCollisionEvents | nil NodeStartTrackingCollisionEvents(Node node) | |
NodeStopTrackingCollisionEvents | nil NodeStopTrackingCollisionEvents(Node node) | |
NodeTeleport | ||
NodeWake | nil NodeWake(Node node) | |
RaycastAllHits | ||
RaycastFirstHit | ||
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.
SceneLuaVM Class
Lua VM for scene script components.
See Scripting.
Functions
| Name | Prototype | Documentation |
|---|---|---|
Call | ||
Constructor | SceneLuaVM Constructor() | |
CreateNodeScriptsFromAssets | ||
CreateNodeScriptsFromFile | ||
CreateScriptFromAssets | ||
CreateScriptFromFile | ||
CreateScriptFromSource | ||
DestroyScripts | nil DestroyScripts(ScriptList scripts) | |
GarbageCollect | ScriptList GarbageCollect(Scene scene) | |
GetScriptCount | integer GetScriptCount() | |
GetScriptEnv | ||
GetScriptInterface | StringList GetScriptInterface(Script script) | |
GetScriptValue | ||
MakeLuaObject | LuaObject MakeLuaObject() | |
SceneCreateScriptsFromAssets | ScriptList SceneCreateScriptsFromAssets(Scene scene) | |
SceneCreateScriptsFromFile | ScriptList SceneCreateScriptsFromFile(Scene scene) | |
SetScriptValue |
ScenePhysics Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Add6DofConstraint | ||
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 | ||
NodeAddImpulse | ||
NodeAddTorque | ||
NodeAddTorqueImpulse | ||
NodeCreatePhysicsFromAssets | nil NodeCreatePhysicsFromAssets(Node node) | |
NodeCreatePhysicsFromFile | nil NodeCreatePhysicsFromFile(Node node) | |
NodeDestroyPhysics | nil NodeDestroyPhysics(Node node) | |
NodeGetAngularFactor | ||
NodeGetAngularVelocity | ||
NodeGetDeactivation | boolean NodeGetDeactivation(Node node) | |
NodeGetLinearFactor | ||
NodeGetLinearVelocity | ||
NodeGetPointVelocity | ||
NodeHasBody | boolean NodeHasBody(Node node) | |
NodeIsSleeping | boolean NodeIsSleeping(Node node) | |
NodeResetWorld | ||
NodeSetAngularFactor | ||
NodeSetAngularVelocity | ||
NodeSetDeactivation | ||
NodeSetLinearFactor | ||
NodeSetLinearVelocity | ||
NodeStartTrackingCollisionEvents | nil NodeStartTrackingCollisionEvents(Node node) | |
NodeStopTrackingCollisionEvents | nil NodeStopTrackingCollisionEvents(Node node) | |
NodeTeleport | ||
NodeWake | nil NodeWake(Node node) | |
RaycastAllHits | ||
RaycastFirstHit | ||
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
| Name | Prototype | Documentation |
|---|---|---|
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.
Functions
| Name | Prototype | Documentation |
|---|---|---|
GetNode | Find a node by name in the view. Pass the host scene as the See Working with Scene. | |
GetNodes | Return all nodes in the view. Pass the host scene as the See Working with Scene. |
Script Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
GetPath | string GetPath() | |
IsValid | boolean IsValid() | |
SetPath | nil SetPath(string path) | |
operator== | boolean operator==(Script s) |
ScriptList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
Connect | TextInputCallbackConnection Connect(TextInputCallback listener) | |
Disconnect | nil Disconnect(TextInputCallbackConnection connection) | |
DisconnectAll | nil DisconnectAll() | |
Emit | nil Emit(string arg0) | |
GetListenerCount | integer GetListenerCount() |
Signal_returning_void_taking_time_ns Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Connect | TimeCallbackConnection Connect(TimeCallback listener) | |
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
| Name | Type |
|---|---|
mtx | Mat4 |
repeat | SourceRepeat |
vel | Vec3 |
volume | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | SpatializedSourceState Constructor()
SpatializedSourceState Constructor(Mat4 mtx)
|
SRanipalEyeState Class
Variables
| Name | Type |
|---|---|
eye_openness | number |
gaze_direction_normalized | Vec3 |
gaze_origin_mm | Vec3 |
pupil_diameter_mm | number |
pupil_diameter_valid | boolean |
SRanipalState Class
Variables
| Name | Type |
|---|---|
left_eye | SRanipalEyeState |
right_eye | SRanipalEyeState |
StereoSourceState Class
State for a stereo audio source, see Playing Audio.
Variables
| Name | Type |
|---|---|
panning | number |
repeat | SourceRepeat |
volume | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | StereoSourceState Constructor()
StereoSourceState Constructor(
number volume) |
StringList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
bitsPerPixel | integer |
cubeMap | boolean |
depth | integer |
format | TextureFormat |
height | integer |
numLayers | integer |
numMips | integer |
storageSize | integer |
width | integer |
TextureRef Class
TimeCallback Class
A function taking a time value as parameter with no return value, see Coordinates and Units System.
TimeCallbackConnection Class
A TimeCallback connection to a Signal_returning_void_taking_time_ns.
Transform Class
Transformation component for a Node, see Working with Scene.
Functions
| Name | Prototype | Documentation |
|---|---|---|
ClearParent | nil ClearParent() | |
GetParent | Node GetParent() | Return the parent node for this Transform. |
GetPos | Vec3 GetPos() | Return the transform position.
|
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.
|
SetPosRot | ||
SetRot | nil SetRot(Vec3 R) | Set the transform rotation from a vector of Euler angles.
|
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.
|
operator== | boolean operator==(Transform t) |
TransformTRS Class
Translation, rotation and scale packed as a single object.
Variables
| Name | Type |
|---|---|
pos | Vec3 |
rot | Vec3 |
scl | Vec3 |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | TransformTRS Constructor() |
UInt16List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
One | static Vec2 |
Zero | static Vec2 |
x | number |
y | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Vec2 Constructor()
| |
Set | nil Set(number x, number y) | |
operator* |
Vec2 operator*( number k) | |
operator*= | nil operator*=(Vec2 v)nil operator*=(number k) | |
operator+ |
Vec2 operator+( number k) | |
operator+= | nil operator+=(Vec2 v)nil operator+=(number k) | |
operator- |
Vec2 operator-( number k) | |
operator-= | nil operator-=(Vec2 v)nil operator-=(number k) | |
operator/ |
Vec2 operator/( number k) | |
operator/= | nil operator/=(Vec2 v)nil operator/=(number k) |
Vec2List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
Back | static Vec3 |
Down | static Vec3 |
Front | static Vec3 |
Left | static Vec3 |
One | static Vec3 |
Right | static Vec3 |
Up | static Vec3 |
Zero | static Vec3 |
x | number |
y | number |
z | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Vec3 Constructor()
| |
Set | nil Set(number x, number y, number z) | |
operator!= | boolean operator!=(Vec3 v) | |
operator* |
Vec3 operator*( number k) | |
operator*= | nil operator*=(Vec3 v)nil operator*=(number k) | |
operator+ |
Vec3 operator+( number k) | |
operator+= | nil operator+=(Vec3 v)nil operator+=(number k) | |
operator- |
Vec3 operator-( number k) | |
operator-= | nil operator-=(Vec3 v)nil operator-=(number k) | |
operator/ |
Vec3 operator/( number k) | |
operator/= | nil operator/=(Vec3 v)nil operator/=(number k) | |
operator== | boolean operator==(Vec3 v) |
Vec3List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
w | number |
x | number |
y | number |
z | number |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Vec4 Constructor()
| |
Set | nil Set(number x, number y, number z)nil Set(number x, number y, number z, number w) | |
operator* |
Vec4 operator*( number k) | |
operator*= | nil operator*=(Vec4 v)nil operator*=(number k) | |
operator+ |
Vec4 operator+( number k) | |
operator+= | nil operator+=(Vec4 v)nil operator+=(number k) | |
operator- |
Vec4 operator-( number k) | |
operator-= | nil operator-=(Vec4 v)nil operator-=(number k) | |
operator/ |
Vec4 operator/( number k) | |
operator/= | nil operator/=(Vec4 v)nil operator/=(number k) |
Vec4List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
binormal | Vec3 |
color0 | Color |
color1 | Color |
color2 | Color |
color3 | Color |
normal | Vec3 |
pos | Vec3 |
tangent | Vec3 |
uv0 | Vec2 |
uv1 | Vec2 |
uv2 | Vec2 |
uv3 | Vec2 |
uv4 | Vec2 |
uv5 | Vec2 |
uv6 | Vec2 |
uv7 | Vec2 |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Vertex Constructor() |
VertexLayout Class
Memory layout and types of vertex attributes.
Functions
| Name | Prototype | Documentation |
|---|---|---|
Add | ||
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
| Name | Prototype | Documentation |
|---|---|---|
Begin | Vertices Begin( integer vertex_index) | |
Clear | nil Clear() | |
Constructor | ||
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 | ||
SetColor0 | ||
SetColor1 | ||
SetColor2 | ||
SetColor3 | ||
SetNormal | ||
SetPos | ||
SetTangent | ||
SetTexCoord0 | ||
SetTexCoord1 | ||
SetTexCoord2 | ||
SetTexCoord3 | ||
SetTexCoord4 | ||
SetTexCoord5 | ||
SetTexCoord6 | ||
SetTexCoord7 |
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
| Name | Type |
|---|---|
frustum | Frustum |
proj | Mat44 |
view | Mat4 |
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
Constructor | VRGenericTracker Constructor()
VRGenericTracker Constructor( string name) | |
IsConnected | boolean IsConnected() | |
Update | nil Update() | |
World | Mat4 World() |
VRGenericTrackerState Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
IsConnected | boolean IsConnected() | |
World | Mat4 World() |
Window Class
Window object.