API Classes Squirrel
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 | float GetFov() | Return the camera field of view. |
GetIsOrthographic | bool GetIsOrthographic() | Return |
GetSize | float GetSize() | |
GetZFar | float GetZFar() | Return the camera far clipping plane. |
GetZNear | float GetZNear() | Return the camera near clipping plane. |
GetZRange | CameraZRange GetZRange() | |
IsValid | bool IsValid() | |
SetFov | null SetFov(float v) | Set the camera field of view. |
SetIsOrthographic | null SetIsOrthographic(bool v) | Configure the camera to use orthographic or perspective projection. |
SetSize | null SetSize(float v) | |
SetZFar | null SetZFar(float v) | Set the camera far clipping plane. |
SetZNear | null SetZNear(float v) | Set the camera near clipping plane. |
SetZRange | null SetZRange(CameraZRange z) | |
operator== | bool operator==(Camera c) |
CameraZRange Class
Variables
| Name | Type |
|---|---|
zfar | float |
znear | float |
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 | bool |
clear_z | bool |
color | Color |
Collision Class
Collision component, see Physics.
Functions
| Name | Prototype | Documentation |
|---|---|---|
GetCollisionResource | string GetCollisionResource() | |
GetHeight | float GetHeight() | |
GetLocalTransform | Mat4 GetLocalTransform() | |
GetMass | float GetMass() | Return the collision shape mass in Kg. |
GetRadius | float GetRadius() | |
GetType | CollisionType GetType() | Return the CollisionType of a Collision component. |
IsValid | bool IsValid() | |
SetCollisionResource | null SetCollisionResource(string path) | |
SetHeight | null SetHeight(float height) | |
SetLocalTransform | null SetLocalTransform(Mat4 m) | |
SetMass | null SetMass(float mass) | Set the collision shape mass in Kg. |
SetRadius | null SetRadius(float radius) | |
SetSize | null SetSize(Vec3 size) | |
SetType | null SetType(CollisionType type) | Set the CollisionType of a Collision component. |
operator== | bool 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 | float |
b | float |
g | float |
r | float |
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!= | bool operator!=(Color color) | |
operator* |
Color operator*( float k) | |
operator*= | null operator*=(Color color)null operator*=(float k) | |
operator+ |
Color operator+( float k) | |
operator+= | null operator+=(Color color)null operator+=(float k) | |
operator- |
Color operator-( float k) | |
operator-= | null operator-=(Color color)null operator-=(float k) | |
operator/ |
Color operator/( float k) | |
operator/= | null operator/=(Color color)null operator/=(float k) | |
operator== | bool operator==(Color color) |
ColorList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | Color at( integer idx) | |
clear | null clear() | |
push_back | null push_back(Color v) | |
reserve | null 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 | float |
ContactList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | Contact at( integer idx) | |
clear | null clear() | |
push_back | null push_back(Contact v) | |
reserve | null 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 | null RemoveAgent(integer idx) | |
RequestMoveTarget | ||
Update | null Update(float dt) |
CrowdAgent Class
State of a crowd agent.
Functions
| Name | Prototype | Documentation |
|---|---|---|
GetPos | Vec3 GetPos() | |
GetVel | Vec3 GetVel() | |
SetPos | null SetPos(Vec3 pos) |
CrowdAgentParams Class
Data Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Data Constructor() | |
GetSize | integer GetSize() | |
Rewind | null 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 | null clear() | |
push_back | null push_back(DirEntry v) | |
reserve | null 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 | float |
fog_near | float |
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 | null clear() | |
push_back | null push_back(FileFilter v) | |
reserve | null 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 | null Flip(ViewState view_state) |
ForwardPipelineAAAConfig Class
Variables
| Name | Type |
|---|---|
bloom_bias | float |
bloom_intensity | float |
bloom_threshold | float |
compositing_params0 | Vec4 |
compositing_params1 | Vec4 |
compositing_params2 | Vec4 |
compositing_params3 | Vec4 |
dof_focus_length | float |
dof_focus_point | float |
exposure | float |
gamma | float |
max_distance | float |
motion_blur | float |
sample_count | integer |
temporal_aa_weight | float |
z_thickness | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | ForwardPipelineAAAConfig Constructor() |
ForwardPipelineFog Class
Fog properties for the forward pipeline.
Variables
| Name | Type |
|---|---|
color | Color |
far | float |
near | float |
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 | float |
outer_angle | float |
priority | float |
pssm_split | Vec4 |
radius | float |
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 | null clear() | |
push_back | null push_back(ForwardPipelineLight v) | |
reserve | null 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 | null SetBottom(Vec4 plane) | |
SetFar | null SetFar(Vec4 plane) | |
SetLeft | null SetLeft(Vec4 plane) | |
SetNear | null SetNear(Vec4 plane) | |
SetRight | null SetRight(Vec4 plane) | |
SetTop | null 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 | float Axes(GamepadAxes axis) | Return the value of a gamepad axis. |
Connected | bool Connected() | Gamepad was connected since the last update. |
Constructor | Gamepad Constructor()
Gamepad Constructor( string name) | |
Disconnected | bool Disconnected() | Gamepad was disconnected since the last update. |
Down | bool Down(GamepadButton btn) | |
DtAxes | float DtAxes(GamepadAxes axis) | |
IsConnected | bool IsConnected() | Gamepad is currently connected. |
Pressed | bool Pressed(GamepadButton btn) | |
Released | bool Released(GamepadButton btn) | |
Update | null Update() |
GamepadState Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Axes | float Axes(GamepadAxes idx) | |
Button | bool Button(GamepadButton btn) | |
IsConnected | bool 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 | null AddQuad(integer a, integer b, integer c, integer d, integer material) | |
AddTriangle | null AddTriangle(integer a, integer b, integer c, integer material) | |
AddVertex | null AddVertex(Vertex vtx) | |
Clear | null 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 | null 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 | null ChannelsMerge() | |
ChannelsSetCurrent | null ChannelsSetCurrent(integer channel_index) | |
ChannelsSplit | null ChannelsSplit(integer channels_count) | |
GetClipRectMax | Vec2 GetClipRectMax() | |
GetClipRectMin | Vec2 GetClipRectMin() | |
PathArcTo | ||
PathArcToFast | ||
PathBezierCubicCurveTo | ||
PathClear | null PathClear() | |
PathFillConvex | null PathFillConvex(integer col) | |
PathLineTo | null PathLineTo(Vec2 pos) | |
PathLineToMergeDuplicate | null PathLineToMergeDuplicate(Vec2 pos) | |
PathRect | ||
PathStroke | null PathStroke(integer col, bool closed)null PathStroke(integer col, bool closed, float thickness) | |
PopClipRect | null PopClipRect() | |
PopTextureID | null PopTextureID() | |
PushClipRect | ||
PushClipRectFullScreen | null PushClipRectFullScreen() | |
PushTextureID | null 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 | null ClearOnInstantiateAnim() | |
GetOnInstantiateAnim | string GetOnInstantiateAnim() | |
GetOnInstantiateAnimLoopMode | AnimLoopMode GetOnInstantiateAnimLoopMode() | |
GetOnInstantiatePlayAnimRef | ScenePlayAnimRef GetOnInstantiatePlayAnimRef() | |
GetPath | string GetPath() | |
IsValid | bool IsValid() | |
SetOnInstantiateAnim | null SetOnInstantiateAnim(string anim) | |
SetOnInstantiateAnimLoopMode | null SetOnInstantiateAnimLoopMode(AnimLoopMode loop_mode) | |
SetPath | null SetPath(string path) | |
operator== | bool operator==(Instance i) |
intList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | integer at(integer idx) | |
clear | null clear() | |
push_back | null push_back(integer v) | |
reserve | null 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 | null Set(integer x, integer y) | |
operator* |
iVec2 operator*( integer k) | |
operator*= | null operator*=(iVec2 v)null operator*=(integer k) | |
operator+ |
iVec2 operator+( integer k) | |
operator+= | null operator+=(iVec2 v)null operator+=(integer k) | |
operator- |
iVec2 operator-( integer k) | |
operator-= | null operator-=(iVec2 v)null operator-=(integer k) | |
operator/ |
iVec2 operator/( integer k) | |
operator/= | null operator/=(iVec2 v)null operator/=(integer k) |
iVec2List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | iVec2 at( integer idx) | |
clear | null clear() | |
push_back | null push_back(iVec2 v) | |
reserve | null 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 | null Shutdown() | |
Startup | integer Startup() |
Joystick Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Axes | float Axes(integer axis) | |
AxesCount | integer AxesCount() | |
ButtonsCount | integer ButtonsCount() | |
Connected | bool Connected() | |
Constructor | Joystick Constructor()
Joystick Constructor( string name) | |
Disconnected | bool Disconnected() | |
Down | bool Down(integer btn) | |
DtAxes | float DtAxes(integer axis) | |
GetDeviceName | string GetDeviceName() | |
IsConnected | bool IsConnected() | |
Pressed | bool Pressed(integer btn) | |
Released | bool Released(integer btn) | |
Update | null Update() |
JoystickState Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Axes | float Axes(integer idx) | |
Button | bool Button(integer btn) | |
IsConnected | bool 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 | bool Down(Key key) | |
GetOldState | KeyboardState GetOldState() | |
GetState | KeyboardState GetState() | |
Pressed | bool Pressed(Key key) | |
Released | bool Released(Key key) | |
Update | null Update() |
KeyboardState Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Key | bool 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 | float GetDiffuseIntensity() | |
GetInnerAngle | float GetInnerAngle() | |
GetOuterAngle | float GetOuterAngle() | |
GetPSSMSplit | Vec4 GetPSSMSplit() | |
GetPriority | float GetPriority() | |
GetRadius | float GetRadius() | Get the light range in meters. |
GetShadowFar | float GetShadowFar() | |
GetShadowNear | float GetShadowNear() | |
GetShadowType | LightShadowType GetShadowType() | |
GetSpecularColor | Color GetSpecularColor() | |
GetSpecularIntensity | float GetSpecularIntensity() | |
GetType | LightType GetType() | Return the LightType. |
IsValid | bool IsValid() | |
SetDiffuseColor | null SetDiffuseColor(Color v) | |
SetDiffuseIntensity | null SetDiffuseIntensity(float v) | |
SetInnerAngle | null SetInnerAngle(float v) | |
SetOuterAngle | null SetOuterAngle(float v) | |
SetPSSMSplit | null SetPSSMSplit(Vec4 v) | |
SetPriority | null SetPriority(float v) | |
SetRadius | null SetRadius(float 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 | null SetShadowFar(float v) | |
SetShadowNear | null SetShadowNear(float v) | |
SetShadowType | null SetShadowType(LightShadowType v) | |
SetSpecularColor | null SetSpecularColor(Color v) | |
SetSpecularIntensity | null SetSpecularIntensity(float v) | |
SetType | null SetType(LightType v) | Set the LightType. |
operator== | bool 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 | null clear() | |
push_back | null push_back(LuaObject v) | |
reserve | null 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 | null clear() | |
push_back | null push_back(Mat4 v) | |
reserve | null 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 | null clear() | |
push_back | null push_back(Material v) | |
reserve | null 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!= | bool operator!=(MinMax minmax) | |
operator== | bool 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 | null AddPolygon(UInt32List idxs) | |
AddQuad | null AddQuad(integer a, integer b, integer c, integer d) | |
AddTriangle | null 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 | null Clear() | Clear all submitted data up to this point. |
Constructor | ModelBuilder Constructor() | |
EndList | null 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 | null clear() | |
push_back | null push_back(Monitor v) | |
reserve | null 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 | null clear() | |
push_back | null push_back(MonitorMode v) | |
reserve | null 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 | bool Down(integer button) | |
DtX | integer DtX() | |
DtY | integer DtY() | |
GetOldState | MouseState GetOldState() | |
GetState | MouseState GetState() | |
HWheel | integer HWheel() | |
Pressed | bool Pressed(integer button) | |
Released | bool Released(integer button) | |
Update | null Update() | |
Wheel | integer Wheel() | |
X | integer X() | |
Y | integer Y() |
MouseState Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Button | bool 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 | null DestroyInstance() | |
Disable | null Disable() | |
Enable | null 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 | bool HasCamera() | |
HasInstance | bool HasInstance() | |
HasLight | bool HasLight() | |
HasObject | bool HasObject() | |
HasRigidBody | bool HasRigidBody() | |
HasTransform | bool HasTransform() | |
IsEnabled | bool IsEnabled() | |
IsInstantiatedBy | Node IsInstantiatedBy() | |
IsItselfEnabled | bool IsItselfEnabled() | |
IsValid | bool IsValid() | Return |
RemoveCamera | null RemoveCamera() | |
RemoveCollision | null RemoveCollision(Collision c)null RemoveCollision(integer slot) | |
RemoveLight | null RemoveLight() | |
RemoveObject | null RemoveObject() | |
RemoveRigidBody | null RemoveRigidBody() | |
RemoveScript | null RemoveScript(Script s)null RemoveScript(integer slot) | |
RemoveTransform | null RemoveTransform() | |
SetCamera | null SetCamera(Camera c) | Set the Camera component of a node. See Scene.CreateCamera. |
SetCollision | ||
SetFlags | null SetFlags(integer flags) | |
SetInstance | null SetInstance(Instance instance) | |
SetLight | null SetLight(Light l) | Set the Light component of a node. See Scene.CreateLight, Scene.CreatePointLight, Scene.CreateSpotLight or Scene.CreateLinearLight. |
SetName | null SetName(string name) | Set the node name. |
SetObject | null SetObject(Object o) | Set the Object component of a node. See Scene.CreateObject. |
SetRigidBody | null SetRigidBody(RigidBody b) | Set the RigidBody component of a node. |
SetScript | ||
SetTransform | null SetTransform(Transform t) | Set the Transform component of a node. |
SetWorld | null SetWorld(Mat4 world) | |
SetupInstanceFromAssets |
bool SetupInstanceFromAssets(PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags) | |
SetupInstanceFromFile |
bool SetupInstanceFromFile(PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags) | |
StartOnInstantiateAnim | null StartOnInstantiateAnim() | |
StopOnInstantiateAnim | null StopOnInstantiateAnim() | |
operator== | bool operator==(Node n) | Return |
NodeList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | Node at( integer idx) | |
clear | null clear() | |
push_back | null push_back(Node v) | |
reserve | null 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 | null 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 | bool IsValid() | |
SetBone | ||
SetBoneCount | null SetBoneCount(integer count) | |
SetMaterial | Set the object Material at index. | |
SetMaterialCount | null SetMaterialCount(integer count) | Set the number of Material in the object material table. |
SetMaterialName | null SetMaterialName(integer slot_idx, string name) | |
SetModelRef | null SetModelRef(ModelRef r) | Set the ModelRef to display. |
operator== | bool 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 | null clear() | |
push_back | null push_back(OpenXREyeFrameBuffer v) | |
reserve | null 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 | null DestroyAllModels() | |
DestroyAllPrograms | null DestroyAllPrograms() | |
DestroyAllTextures | null DestroyAllTextures() | |
DestroyModel | null DestroyModel(ModelRef ref) | |
DestroyProgram | null DestroyProgram(PipelineProgramRef ref) | |
DestroyTexture | null 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 | bool 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 | float |
x | float |
y | float |
z | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Quaternion Constructor()
Quaternion Constructor(Quaternion q) | |
operator* | Quaternion operator*(
float v)Quaternion operator*(Quaternion q) | |
operator*= | null operator*=(float v)null operator*=(Quaternion q) | |
operator+ | Quaternion operator+(
float v)Quaternion operator+(Quaternion q) | |
operator+= | null operator+=(float v)null operator+=(Quaternion q) | |
operator- | Quaternion operator-(
float v)Quaternion operator-(Quaternion q) | |
operator-= | null operator-=(float v)null operator-=(Quaternion q) | |
operator/ | Quaternion operator/( float v) | |
operator/= | null operator/=(float 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 | float |
RaycastOutList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | RaycastOut at( integer idx) | |
clear | null clear() | |
push_back | null push_back(RaycastOut v) | |
reserve | null reserve(integer size) | |
size | integer size() |
Rect Class
Variables
| Name | Type |
|---|---|
ex | float |
ey | float |
sx | float |
sy | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Rect Constructor()
|
RenderState Class
RigidBody Class
Rigid body component, see Physics.
Functions
| Name | Prototype | Documentation |
|---|---|---|
GetAngularDamping | float 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 | bool GetContinuousCollisionDetection() | |
GetFriction | float GetFriction() | |
GetLinearDamping | float GetLinearDamping() | |
GetRestitution | float GetRestitution() | |
GetRollingFriction | float GetRollingFriction() | |
GetType | RigidBodyType GetType() | Return the rigid body type. See RigidBody.SetType. |
IsValid | bool IsValid() | |
SetAngularDamping | null SetAngularDamping(float 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 | null SetContinuousCollisionDetection(bool enable) | |
SetFriction | null SetFriction(float friction) | |
SetLinearDamping | null SetLinearDamping(float damping) | |
SetRestitution | null SetRestitution(float restitution) | |
SetRollingFriction | null SetRollingFriction(float rolling_friction) | |
SetType | null SetType(RigidBodyType type) | Set the rigid body type. |
operator== | bool 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 | null Clear() | Remove all nodes from the scene. |
ComputeCurrentCameraViewState | ||
ComputeWorldMatrices | null ComputeWorldMatrices() | |
Constructor | Scene Constructor() | |
CreateCamera | Camera CreateCamera()
| |
CreateCollision | Collision CreateCollision() | |
CreateInstance | Instance CreateInstance() | |
CreateLight | Light CreateLight() | |
CreateLinearLight | Light CreateLinearLight(Color diffuse,
float diffuse_intensity, Color specular, float specular_intensity)Light CreateLinearLight(Color diffuse,
float diffuse_intensity, Color specular, float specular_intensity, float priority)Light CreateLinearLight(Color diffuse,
float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type)Light CreateLinearLight(Color diffuse,
float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type, float shadow_bias)Light CreateLinearLight(Color diffuse,
float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type, float shadow_bias, Vec4 pssm_split)Light CreateLinearLight(Color diffuse, Color specular,
float priority, LightShadowType shadow_type, float shadow_bias)Light CreateLinearLight(Color diffuse, Color specular, float priority, LightShadowType shadow_type, float 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(
float radius, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity)Light CreatePointLight(
float radius, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority)Light CreatePointLight(
float radius, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type)Light CreatePointLight(
float radius, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type, float shadow_bias)Light CreatePointLight(
float radius, Color diffuse, Color specular, float priority, LightShadowType shadow_type)Light CreatePointLight( float radius, Color diffuse, Color specular, float priority, LightShadowType shadow_type, float shadow_bias) | |
CreateRigidBody | RigidBody CreateRigidBody() | |
CreateScript | Script CreateScript()
Script CreateScript( string path) | |
CreateSpotLight | Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type, float shadow_bias)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type, float shadow_bias, float shadow_near)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, float diffuse_intensity, Color specular, float specular_intensity, float priority, LightShadowType shadow_type, float shadow_bias, float shadow_near, float shadow_far)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, Color specular)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority, LightShadowType shadow_type)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority, LightShadowType shadow_type, float shadow_bias)Light CreateSpotLight(
float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority, LightShadowType shadow_type, float shadow_bias, float shadow_near)Light CreateSpotLight( float radius, float inner_angle, float outer_angle, Color diffuse, Color specular, float priority, LightShadowType shadow_type, float shadow_bias, float shadow_near, float shadow_far) | |
CreateTransform | Transform CreateTransform()
| |
DestroyCamera | null DestroyCamera(Camera camera) | |
DestroyCollision | null DestroyCollision(Collision collision) | |
DestroyInstance | null DestroyInstance(Instance Instance) | |
DestroyLight | null DestroyLight(Light light) | |
DestroyNode | null DestroyNode(Node node) | Remove a Node from the scene. |
DestroyObject | null DestroyObject(Object object) | |
DestroyRigidBody | null DestroyRigidBody(RigidBody rigid_body) | |
DestroyScript | null DestroyScript(Script script) | |
DestroyTransform | null 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 | bool HasKey(string key) | |
IsChildOf | ||
IsPlaying | bool IsPlaying(ScenePlayAnimRef ref) | |
IsRoot | bool 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, bool paused)ScenePlayAnimRef PlayAnim(SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing, integer t_start, integer t_end, bool paused, float t_scale) | |
ReadyWorldMatrices | null ReadyWorldMatrices() | |
RemoveKey | null RemoveKey(string key) | |
ReserveCameras | null ReserveCameras(integer count) | |
ReserveLights | null ReserveLights(integer count) | Allocates internal storage for the required number of Light components in one go. |
ReserveNodes | null ReserveNodes(integer count) | Allocates internal storage for the required number of nodes in one go. |
ReserveObjects | null ReserveObjects(integer count) | Allocates internal storage for the required number of Object components in one go. |
ReserveScripts | null ReserveScripts(integer count) | |
ReserveTransforms | null ReserveTransforms(integer count) | Allocates internal storage for the required number of Transform components in one go. |
SetCurrentCamera | null SetCurrentCamera(Node camera) | Set the current camera. |
SetProbe | ||
SetScript | ||
SetValue | null SetValue(string key, string value) | |
StopAllAnims | null StopAllAnims() | |
StopAnim | null StopAnim(ScenePlayAnimRef ref) | |
Update | null Update(integer dt) | Start the Update phase of the scene. |
UpdatePlayingAnims | null UpdatePlayingAnims(integer dt) |
SceneAnimRef Class
Reference to a scene animation.
SceneAnimRefList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | SceneAnimRef at( integer idx) | |
clear | null clear() | |
push_back | null push_back(SceneAnimRef v) | |
reserve | null 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 | null Clear() | |
ClearNodes | null 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 | null NodeCreatePhysicsFromAssets(Node node) | |
NodeCreatePhysicsFromFile | null NodeCreatePhysicsFromFile(Node node) | |
NodeDestroyPhysics | null NodeDestroyPhysics(Node node) | |
NodeGetAngularFactor | ||
NodeGetAngularVelocity | ||
NodeGetDeactivation | bool NodeGetDeactivation(Node node) | |
NodeGetLinearFactor | ||
NodeGetLinearVelocity | ||
NodeGetPointVelocity | ||
NodeHasBody | bool NodeHasBody(Node node) | |
NodeIsSleeping | bool NodeIsSleeping(Node node) | |
NodeResetWorld | ||
NodeSetAngularFactor | ||
NodeSetAngularVelocity | ||
NodeSetDeactivation | ||
NodeSetLinearFactor | ||
NodeSetLinearVelocity | ||
NodeStartTrackingCollisionEvents | null NodeStartTrackingCollisionEvents(Node node) | |
NodeStopTrackingCollisionEvents | null NodeStopTrackingCollisionEvents(Node node) | |
NodeTeleport | ||
NodeWake | null NodeWake(Node node) | |
RaycastAllHits | ||
RaycastFirstHit | ||
Remove6DofConstraint | null Remove6DofConstraint(btGeneric6DofConstraint constraint6Dof) | |
RenderCollision | null RenderCollision(integer view_id, VertexLayout vtx_layout, ProgramHandle prg, RenderState render_state, integer depth) | |
SceneCreatePhysicsFromAssets | null SceneCreatePhysicsFromAssets(Scene scene) | |
SceneCreatePhysicsFromFile | null SceneCreatePhysicsFromFile(Scene scene) | |
SetPreTickCallback | null SetPreTickCallback(SceneBullet3PhysicsPreTickCallback cbk) | |
StepSimulation | null StepSimulation(integer display_dt)null StepSimulation(integer display_dt, integer step_dt)null StepSimulation(integer display_dt, integer step_dt, integer max_step) | |
SyncTransformsFromScene | null SyncTransformsFromScene(Scene scene) | |
SyncTransformsToScene | null 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 | null 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 | null Clear() | |
ClearNodes | null 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 | null NodeCreatePhysicsFromAssets(Node node) | |
NodeCreatePhysicsFromFile | null NodeCreatePhysicsFromFile(Node node) | |
NodeDestroyPhysics | null NodeDestroyPhysics(Node node) | |
NodeGetAngularFactor | ||
NodeGetAngularVelocity | ||
NodeGetDeactivation | bool NodeGetDeactivation(Node node) | |
NodeGetLinearFactor | ||
NodeGetLinearVelocity | ||
NodeGetPointVelocity | ||
NodeHasBody | bool NodeHasBody(Node node) | |
NodeIsSleeping | bool NodeIsSleeping(Node node) | |
NodeResetWorld | ||
NodeSetAngularFactor | ||
NodeSetAngularVelocity | ||
NodeSetDeactivation | ||
NodeSetLinearFactor | ||
NodeSetLinearVelocity | ||
NodeStartTrackingCollisionEvents | null NodeStartTrackingCollisionEvents(Node node) | |
NodeStopTrackingCollisionEvents | null NodeStopTrackingCollisionEvents(Node node) | |
NodeTeleport | ||
NodeWake | null NodeWake(Node node) | |
RaycastAllHits | ||
RaycastFirstHit | ||
RenderCollision | null RenderCollision(integer view_id, VertexLayout vtx_layout, ProgramHandle prg, RenderState render_state, integer depth) | |
SceneCreatePhysicsFromAssets | null SceneCreatePhysicsFromAssets(Scene scene) | |
SceneCreatePhysicsFromFile | null SceneCreatePhysicsFromFile(Scene scene) | |
SetPreTickCallback | null SetPreTickCallback(ScenePhysicsPreTickCallback cbk) | |
StepSimulation | null StepSimulation(integer display_dt)null StepSimulation(integer display_dt, integer step_dt)null StepSimulation(integer display_dt, integer step_dt, integer max_step) | |
SyncTransformsFromScene | null SyncTransformsFromScene(Scene scene) | |
SyncTransformsToScene | null 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 | null clear() | |
push_back | null push_back(ScenePlayAnimRef v) | |
reserve | null 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 | bool IsValid() | |
SetPath | null SetPath(string path) | |
operator== | bool operator==(Script s) |
ScriptList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | Script at( integer idx) | |
clear | null clear() | |
push_back | null push_back(Script v) | |
reserve | null 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 | null Disconnect(TextInputCallbackConnection connection) | |
DisconnectAll | null DisconnectAll() | |
Emit | null Emit(string arg0) | |
GetListenerCount | integer GetListenerCount() |
Signal_returning_void_taking_time_ns Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Connect | TimeCallbackConnection Connect(TimeCallback listener) | |
Disconnect | null Disconnect(TimeCallbackConnection connection) | |
DisconnectAll | null DisconnectAll() | |
Emit | null 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 | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | SpatializedSourceState Constructor()
SpatializedSourceState Constructor(Mat4 mtx)
|
SRanipalEyeState Class
Variables
| Name | Type |
|---|---|
eye_openness | float |
gaze_direction_normalized | Vec3 |
gaze_origin_mm | Vec3 |
pupil_diameter_mm | float |
pupil_diameter_valid | bool |
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 | float |
repeat | SourceRepeat |
volume | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | StereoSourceState Constructor()
StereoSourceState Constructor(
float volume) |
StringList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | string at(integer idx) | |
clear | null clear() | |
push_back | null push_back(string v) | |
reserve | null reserve(integer size) | |
size | integer size() |
TextInputCallback Class
TextInputCallbackConnection Class
Texture Class
TextureInfo Class
Variables
| Name | Type |
|---|---|
bitsPerPixel | integer |
cubeMap | bool |
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 | null 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 | bool IsValid() | |
SetLocal | null SetLocal(Mat4 local) | |
SetParent | null 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 | null SetPos(Vec3 T) | Set the transform position.
|
SetPosRot | ||
SetRot | null SetRot(Vec3 R) | Set the transform rotation from a vector of Euler angles.
|
SetScale | null SetScale(Vec3 S) | Set the transform scale. |
SetTRS | null SetTRS(TransformTRS TRS) | Set the TransformTRS. |
SetWorld | null SetWorld(Mat4 world) | Set the world matrix.
|
operator== | bool 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 | null clear() | |
push_back | null push_back(integer v) | |
reserve | null reserve(integer size) | |
size | integer size() |
UInt32List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | integer at(integer idx) | |
clear | null clear() | |
push_back | null push_back(integer v) | |
reserve | null 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 | null clear() | |
push_back | null push_back(UniformSetTexture v) | |
reserve | null 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 | null clear() | |
push_back | null push_back(UniformSetValue v) | |
reserve | null 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 | float |
y | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Vec2 Constructor()
| |
Set | null Set(float x, float y) | |
operator* |
Vec2 operator*( float k) | |
operator*= | null operator*=(Vec2 v)null operator*=(float k) | |
operator+ |
Vec2 operator+( float k) | |
operator+= | null operator+=(Vec2 v)null operator+=(float k) | |
operator- |
Vec2 operator-( float k) | |
operator-= | null operator-=(Vec2 v)null operator-=(float k) | |
operator/ |
Vec2 operator/( float k) | |
operator/= | null operator/=(Vec2 v)null operator/=(float k) |
Vec2List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | Vec2 at( integer idx) | Gets the element at the specified index. |
clear | null clear() | |
push_back | null push_back(Vec2 v) | Adds an element to the end. |
reserve | null 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 | float |
y | float |
z | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Vec3 Constructor()
| |
Set | null Set(float x, float y, float z) | |
operator!= | bool operator!=(Vec3 v) | |
operator* |
Vec3 operator*( float k) | |
operator*= | null operator*=(Vec3 v)null operator*=(float k) | |
operator+ |
Vec3 operator+( float k) | |
operator+= | null operator+=(Vec3 v)null operator+=(float k) | |
operator- |
Vec3 operator-( float k) | |
operator-= | null operator-=(Vec3 v)null operator-=(float k) | |
operator/ |
Vec3 operator/( float k) | |
operator/= | null operator/=(Vec3 v)null operator/=(float k) | |
operator== | bool operator==(Vec3 v) |
Vec3List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | Vec3 at( integer idx) | |
clear | null clear() | |
push_back | null push_back(Vec3 v) | |
reserve | null reserve(integer size) | |
size | integer size() |
Vec4 Class
4-dimensional vector.
Variables
| Name | Type |
|---|---|
w | float |
x | float |
y | float |
z | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Vec4 Constructor()
| |
Set | null Set(float x, float y, float z)null Set(float x, float y, float z, float w) | |
operator* |
Vec4 operator*( float k) | |
operator*= | null operator*=(Vec4 v)null operator*=(float k) | |
operator+ |
Vec4 operator+( float k) | |
operator+= | null operator+=(Vec4 v)null operator+=(float k) | |
operator- |
Vec4 operator-( float k) | |
operator-= | null operator-=(Vec4 v)null operator-=(float k) | |
operator/ |
Vec4 operator/( float k) | |
operator/= | null operator/=(Vec4 v)null operator/=(float k) |
Vec4List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
at | Vec4 at( integer idx) | |
clear | null clear() | |
push_back | null push_back(Vec4 v) | |
reserve | null 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 | null End() | |
GetOffset | integer GetOffset(Attrib attrib) | |
GetSize | integer GetSize(integer count) | |
GetStride | integer GetStride() | |
Has | bool 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 | null Clear() | |
Constructor | ||
End | null End()null End(bool validate) | |
GetCapacity | integer GetCapacity() | |
GetCount | integer GetCount() | |
GetData | VoidPointer GetData() | |
GetDecl | VertexLayout GetDecl() | |
GetSize | integer GetSize() | |
Reserve | null Reserve(integer count) | |
Resize | null 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 | bool Connected() | Gamepad was connected since the last update. |
Constructor | VRController Constructor()
VRController Constructor( string name) | |
Disconnected | bool Disconnected() | Gamepad was disconnected since the last update. |
Down | bool Down(VRControllerButton btn) | |
DtSurface | Vec2 DtSurface( integer idx) | |
IsConnected | bool IsConnected() | Gamepad is currently connected. |
Pressed | bool Pressed(VRControllerButton btn) | |
Released | bool Released(VRControllerButton btn) | |
SendHapticPulse | null SendHapticPulse(integer duration) | |
Surface | Vec2 Surface( integer idx) | |
Touch | bool Touch(VRControllerButton btn) | |
TouchEnd | bool TouchEnd(VRControllerButton btn) | |
TouchStart | bool TouchStart(VRControllerButton btn) | |
Update | null Update() | |
World | Mat4 World() |
VRControllerState Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
IsConnected | bool IsConnected() | |
Pressed | bool Pressed(VRControllerButton btn) | |
Surface | Vec2 Surface( integer idx) | |
Touched | bool 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 | bool IsConnected() | |
Update | null Update() | |
World | Mat4 World() |
VRGenericTrackerState Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
IsConnected | bool IsConnected() | |
World | Mat4 World() |
Window Class
Window object.