API Classes Python

Bloom Class

Bloom post-process object holding internal states and resources.

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

btGeneric6DofConstraint Class

Camera Class

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

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

Functions

NamePrototypeDocumentation
GetFov
GetFov() -> float

Return the camera field of view.

GetIsOrthographic
GetIsOrthographic() -> bool

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

GetSize
GetSize() -> float
GetZFar
GetZFar() -> float

Return the camera far clipping plane.

GetZNear
GetZNear() -> float

Return the camera near clipping plane.

GetZRange
GetZRange() -> CameraZRange
IsValid
IsValid() -> bool
SetFov
SetFov(v: float) -> None

Set the camera field of view.

SetIsOrthographic
SetIsOrthographic(v: bool) -> None

Configure the camera to use orthographic or perspective projection.

SetSize
SetSize(v: float) -> None
SetZFar
SetZFar(v: float) -> None

Set the camera far clipping plane.

SetZNear
SetZNear(v: float) -> None

Set the camera near clipping plane.

SetZRange
SetZRange(z: CameraZRange) -> None
operator==
operator==(c: Camera) -> bool

CameraZRange Class

Variables

NameType
zfarfloat
znearfloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> CameraZRange

Canvas Class

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

Variables

NameType
clear_colorbool
clear_zbool
colorColor

Collision Class

Collision component, see Physics.

Functions

NamePrototypeDocumentation
GetCollisionResource
GetCollisionResource() -> str
GetHeight
GetHeight() -> float
GetLocalTransform
GetLocalTransform() -> Mat4
GetMass
GetMass() -> float

Return the collision shape mass in Kg.

GetRadius
GetRadius() -> float
GetType
GetType() -> CollisionType

Return the CollisionType of a Collision component.

IsValid
IsValid() -> bool
SetCollisionResource
SetCollisionResource(path: str) -> None
SetHeight
SetHeight(height: float) -> None
SetLocalTransform
SetLocalTransform(m: Mat4) -> None
SetMass
SetMass(mass: float) -> None

Set the collision shape mass in Kg.

SetRadius
SetRadius(radius: float) -> None
SetSize
SetSize(size: Vec3) -> None
SetType
SetType(type: CollisionType) -> None

Set the CollisionType of a Collision component.

operator==
operator==(c: Collision) -> bool

Color Class

Four-component RGBA color object.

Variables

NameType
Blackstatic Color
Bluestatic Color
Greenstatic Color
Greystatic Color
Onestatic Color
Orangestatic Color
Purplestatic Color
Redstatic Color
Transparentstatic Color
Whitestatic Color
Yellowstatic Color
Zerostatic Color
afloat
bfloat
gfloat
rfloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Color
Constructor(color: Color) -> Color
Constructor(r: float, g: float, b: float) -> Color
Constructor(r: float, g: float, b: float, a: float) -> Color

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

operator!=
operator!=(color: Color) -> bool
operator*
operator*(color: Color) -> Color
operator*(k: float) -> Color
operator*=
operator*=(color: Color) -> None
operator*=(k: float) -> None
operator+
operator+(color: Color) -> Color
operator+(k: float) -> Color
operator+=
operator+=(color: Color) -> None
operator+=(k: float) -> None
operator-
operator-(color: Color) -> Color
operator-(k: float) -> Color
operator-=
operator-=(color: Color) -> None
operator-=(k: float) -> None
operator/
operator/(color: Color) -> Color
operator/(k: float) -> Color
operator/=
operator/=(color: Color) -> None
operator/=(k: float) -> None
operator==
operator==(color: Color) -> bool

ColorList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Color
clear
clear() -> None
push_back
push_back(v: Color) -> None
reserve
reserve(size: int) -> None
size
size() -> int

Contact Class

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

Variables

NameType
NVec3
PVec3
dfloat

ContactList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Contact
clear
clear() -> None
push_back
push_back(v: Contact) -> None
reserve
reserve(size: int) -> None
size
size() -> int

Crowd Class

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

Functions

NamePrototypeDocumentation
AddAgent
AddAgent(pos: Vec3, params: CrowdAgentParams) -> int
Constructor
Constructor() -> Crowd
GetEditableAgent
GetEditableAgent(idx: int) -> CrowdAgent
Init
Init(max_agent: int, maxAgentRadius: float, mesh: NavMesh) -> bool
RemoveAgent
RemoveAgent(idx: int) -> None
RequestMoveTarget
RequestMoveTarget(idx: int, pos: Vec3, query: NavMeshQuery) -> bool
Update
Update(dt: float) -> None

CrowdAgent Class

State of a crowd agent.

Functions

NamePrototypeDocumentation
GetPos
GetPos() -> Vec3
GetVel
GetVel() -> Vec3
SetPos
SetPos(pos: Vec3) -> None

CrowdAgentParams Class

Data Class

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Data
GetSize
GetSize() -> int
Rewind
Rewind() -> None

DearImguiContext Class

Context to render immediate GUI.

DirEntry Class

Variables

NameType
namestr
typeint

DirEntryList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> DirEntry
clear
clear() -> None
push_back
push_back(v: DirEntry) -> None
reserve
reserve(size: int) -> None
size
size() -> int

draw_sceneCallback Class

Environment Class

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

Variables

NameType
ambientColor
brdf_mapTextureRef
fog_colorColor
fog_farfloat
fog_nearfloat

File Class

Interface to a file on the host local filesystem.

FileFilter Class

Variables

NameType
namestr
patternstr

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> FileFilter

FileFilterList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> FileFilter
clear
clear() -> None
push_back
push_back(v: FileFilter) -> None
reserve
reserve(size: int) -> None
size
size() -> int

Font Class

Font object for realtime rendering.

ForwardPipeline Class

Rendering pipeline implementing a forward rendering strategy.

The main characteristics of this pipeline are:

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

ForwardPipelineAAA Class

Functions

NamePrototypeDocumentation
Flip
Flip(view_state: ViewState) -> None

ForwardPipelineAAAConfig Class

Variables

NameType
bloom_biasfloat
bloom_intensityfloat
bloom_thresholdfloat
compositing_params0Vec4
compositing_params1Vec4
compositing_params2Vec4
compositing_params3Vec4
dof_focus_lengthfloat
dof_focus_pointfloat
exposurefloat
gammafloat
max_distancefloat
motion_blurfloat
sample_countint
temporal_aa_weightfloat
z_thicknessfloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> ForwardPipelineAAAConfig

ForwardPipelineFog Class

Fog properties for the forward pipeline.

Variables

NameType
colorColor
farfloat
nearfloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> ForwardPipelineFog

ForwardPipelineLight Class

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

Variables

NameType
diffuseColor
inner_anglefloat
outer_anglefloat
priorityfloat
pssm_splitVec4
radiusfloat
specularColor
typeForwardPipelineLightType
worldMat4

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> ForwardPipelineLight

ForwardPipelineLightList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> ForwardPipelineLight
clear
clear() -> None
push_back
push_back(v: ForwardPipelineLight) -> None
reserve
reserve(size: int) -> None
size
size() -> int

ForwardPipelineLights Class

FrameBuffer Class

Variables

NameType
handleFrameBufferHandle

FrameBufferHandle Class

Frustum Class

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

Functions

NamePrototypeDocumentation
GetBottom
GetBottom() -> Vec4
GetFar
GetFar() -> Vec4
GetLeft
GetLeft() -> Vec4
GetNear
GetNear() -> Vec4
GetRight
GetRight() -> Vec4
GetTop
GetTop() -> Vec4
SetBottom
SetBottom(plane: Vec4) -> None
SetFar
SetFar(plane: Vec4) -> None
SetLeft
SetLeft(plane: Vec4) -> None
SetNear
SetNear(plane: Vec4) -> None
SetRight
SetRight(plane: Vec4) -> None
SetTop
SetTop(plane: Vec4) -> None

Gamepad Class

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

Use GetGamepadNames to query for available gamepad devices.

Functions

NamePrototypeDocumentation
Axes
Axes(axis: GamepadAxes) -> float

Return the value of a gamepad axis.

Connected
Connected() -> bool

Gamepad was connected since the last update.

Constructor
Constructor() -> Gamepad
Constructor(name: str) -> Gamepad
Disconnected
Disconnected() -> bool

Gamepad was disconnected since the last update.

Down
Down(btn: GamepadButton) -> bool
DtAxes
DtAxes(axis: GamepadAxes) -> float
IsConnected
IsConnected() -> bool

Gamepad is currently connected.

Pressed
Pressed(btn: GamepadButton) -> bool
Released
Released(btn: GamepadButton) -> bool
Update
Update() -> None

GamepadState Class

Functions

NamePrototypeDocumentation
Axes
Axes(idx: GamepadAxes) -> float
Button
Button(btn: GamepadButton) -> bool
IsConnected
IsConnected() -> bool

Geometry Class

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

To programmatically create a geometry use GeometryBuilder.

GeometryBuilder Class

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

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

Functions

NamePrototypeDocumentation
AddPolygon
AddPolygon(idxs: UInt32List, material: int) -> None
AddQuad
AddQuad(a: int, b: int, c: int, d: int, material: int) -> None
AddTriangle
AddTriangle(a: int, b: int, c: int, material: int) -> None
AddVertex
AddVertex(vtx: Vertex) -> None
Clear
Clear() -> None
Constructor
Constructor() -> GeometryBuilder
Make
Make() -> Geometry

IAudioStreamer Class

Functions

NamePrototypeDocumentation
Close
Close(ref: int) -> int
GetDuration
GetDuration(ref: int) -> int
GetTimeStamp
GetTimeStamp(ref: int) -> int
IsEnded
IsEnded(ref: int) -> int
Open
Open(name: str) -> int
Seek
Seek(ref: int, t: int) -> int
Shutdown
Shutdown() -> None
Startup
Startup() -> int

ImDrawList Class

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

Functions

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

ImFont Class

Immediate GUI font.

Instance Class

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

Functions

NamePrototypeDocumentation
ClearOnInstantiateAnim
ClearOnInstantiateAnim() -> None
GetOnInstantiateAnim
GetOnInstantiateAnim() -> str
GetOnInstantiateAnimLoopMode
GetOnInstantiateAnimLoopMode() -> AnimLoopMode
GetOnInstantiatePlayAnimRef
GetOnInstantiatePlayAnimRef() -> ScenePlayAnimRef
GetPath
GetPath() -> str
IsValid
IsValid() -> bool
SetOnInstantiateAnim
SetOnInstantiateAnim(anim: str) -> None
SetOnInstantiateAnimLoopMode
SetOnInstantiateAnimLoopMode(loop_mode: AnimLoopMode) -> None
SetPath
SetPath(path: str) -> None
operator==
operator==(i: Instance) -> bool

intList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> int
clear
clear() -> None
push_back
push_back(v: int) -> None
reserve
reserve(size: int) -> None
size
size() -> int

IntRect Class

Variables

NameType
exint
eyint
sxint
syint

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> IntRect
Constructor(x: int, y: int) -> IntRect
Constructor(sx: int, sy: int, ex: int, ey: int) -> IntRect
Constructor(rect: IntRect) -> IntRect

IsoSurface Class

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

iVec2 Class

2-dimensional integer vector.

Variables

NameType
Onestatic iVec2
Zerostatic iVec2
xint
yint

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> iVec2
Constructor(x: int, y: int) -> iVec2
Constructor(v: iVec2) -> iVec2
Constructor(v: Vec3) -> iVec2
Constructor(v: Vec4) -> iVec2
Set
Set(x: int, y: int) -> None
operator*
operator*(v: iVec2) -> iVec2
operator*(k: int) -> iVec2
operator*=
operator*=(v: iVec2) -> None
operator*=(k: int) -> None
operator+
operator+(v: iVec2) -> iVec2
operator+(k: int) -> iVec2
operator+=
operator+=(v: iVec2) -> None
operator+=(k: int) -> None
operator-
operator-(v: iVec2) -> iVec2
operator-(k: int) -> iVec2
operator-=
operator-=(v: iVec2) -> None
operator-=(k: int) -> None
operator/
operator/(v: iVec2) -> iVec2
operator/(k: int) -> iVec2
operator/=
operator/=(v: iVec2) -> None
operator/=(k: int) -> None

iVec2List Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> iVec2
clear
clear() -> None
push_back
push_back(v: iVec2) -> None
reserve
reserve(size: int) -> None
size
size() -> int

IVideoStreamer Class

Functions

NamePrototypeDocumentation
Close
Close(h: int) -> int
FreeFrame
FreeFrame(h: int, frame: int) -> int
GetDuration
GetDuration(h: int) -> int
GetFrame
GetFrame(h: int, ptr: int, width: int, height: int, pitch: int, format: VideoFrameFormat) -> int, int, int, int, int, VideoFrameFormat
GetTimeStamp
GetTimeStamp(h: int) -> int
IsEnded
IsEnded(h: int) -> int
Open
Open(name: str) -> int
Pause
Pause(h: int) -> int
Play
Play(h: int) -> int
Seek
Seek(h: int, t: int) -> int
Shutdown
Shutdown() -> None
Startup
Startup() -> int

Joystick Class

Functions

NamePrototypeDocumentation
Axes
Axes(axis: int) -> float
AxesCount
AxesCount() -> int
ButtonsCount
ButtonsCount() -> int
Connected
Connected() -> bool
Constructor
Constructor() -> Joystick
Constructor(name: str) -> Joystick
Disconnected
Disconnected() -> bool
Down
Down(btn: int) -> bool
DtAxes
DtAxes(axis: int) -> float
GetDeviceName
GetDeviceName() -> str
IsConnected
IsConnected() -> bool
Pressed
Pressed(btn: int) -> bool
Released
Released(btn: int) -> bool
Update
Update() -> None

JoystickState Class

Functions

NamePrototypeDocumentation
Axes
Axes(idx: int) -> float
Button
Button(btn: int) -> bool
IsConnected
IsConnected() -> bool

JSON Class

JSON read/write object.

Keyboard Class

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

Use GetKeyboardNames to query for available keyboard devices.

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Keyboard
Constructor(name: str) -> Keyboard
Down
Down(key: Key) -> bool
GetOldState
GetOldState() -> KeyboardState
GetState
GetState() -> KeyboardState
Pressed
Pressed(key: Key) -> bool
Released
Released(key: Key) -> bool
Update
Update() -> None

KeyboardState Class

Functions

NamePrototypeDocumentation
Key
Key(key: Key) -> bool

Light Class

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

Functions

NamePrototypeDocumentation
GetDiffuseColor
GetDiffuseColor() -> Color
GetDiffuseIntensity
GetDiffuseIntensity() -> float
GetInnerAngle
GetInnerAngle() -> float
GetOuterAngle
GetOuterAngle() -> float
GetPSSMSplit
GetPSSMSplit() -> Vec4
GetPriority
GetPriority() -> float
GetRadius
GetRadius() -> float

Get the light range in meters.

GetShadowFar
GetShadowFar() -> float
GetShadowNear
GetShadowNear() -> float
GetShadowType
GetShadowType() -> LightShadowType
GetSpecularColor
GetSpecularColor() -> Color
GetSpecularIntensity
GetSpecularIntensity() -> float
GetType
GetType() -> LightType

Return the LightType.

IsValid
IsValid() -> bool
SetDiffuseColor
SetDiffuseColor(v: Color) -> None
SetDiffuseIntensity
SetDiffuseIntensity(v: float) -> None
SetInnerAngle
SetInnerAngle(v: float) -> None
SetOuterAngle
SetOuterAngle(v: float) -> None
SetPSSMSplit
SetPSSMSplit(v: Vec4) -> None
SetPriority
SetPriority(v: float) -> None
SetRadius
SetRadius(v: float) -> None

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

SetShadowFar
SetShadowFar(v: float) -> None
SetShadowNear
SetShadowNear(v: float) -> None
SetShadowType
SetShadowType(v: LightShadowType) -> None
SetSpecularColor
SetSpecularColor(v: Color) -> None
SetSpecularIntensity
SetSpecularIntensity(v: float) -> None
SetType
SetType(v: LightType) -> None

Set the LightType.

operator==
operator==(l: Light) -> bool

LuaObject Class

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

LuaObjectList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> LuaObject
clear
clear() -> None
push_back
push_back(v: LuaObject) -> None
reserve
reserve(size: int) -> None
size
size() -> int

Mat3 Class

A 3x3 matrix used to store rotation.

Mat4 Class

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

Mat44 Class

A 4x4 matrix used to store projection matrices.

Mat4List Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Mat4
clear
clear() -> None
push_back
push_back(v: Mat4) -> None
reserve
reserve(size: int) -> None
size
size() -> int

Material Class

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

See Using the Forward Pipeline and Writing a Pipeline Shader.

MaterialList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Material
clear
clear() -> None
push_back
push_back(v: Material) -> None
reserve
reserve(size: int) -> None
size
size() -> int

MaterialRef Class

Reference to a Material inside a PipelineResources object.

MinMax Class

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

Variables

NameType
mnVec3
mxVec3

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> MinMax
Constructor(min: Vec3, max: Vec3) -> MinMax
operator!=
operator!=(minmax: MinMax) -> bool
operator==
operator==(minmax: MinMax) -> bool

Model Class

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

To programmatically create a model see ModelBuilder.

ModelBuilder Class

Use the model builder to programmatically build models at runtime.

The input data is optimized upon submission.

Functions

NamePrototypeDocumentation
AddPolygon
AddPolygon(idxs: UInt32List) -> None
AddQuad
AddQuad(a: int, b: int, c: int, d: int) -> None
AddTriangle
AddTriangle(a: int, b: int, c: int) -> None
AddVertex
AddVertex(vtx: Vertex) -> int

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

Clear
Clear() -> None

Clear all submitted data up to this point.

Constructor
Constructor() -> ModelBuilder
EndList
EndList(material: int) -> None

End the current primitive list and start a new one.

GetCurrentListIndexCount
GetCurrentListIndexCount() -> int

Return the number of indexes in the current list.

See ModelBuilder.EndList.

MakeModel
MakeModel(decl: VertexLayout) -> Model

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

ModelRef Class

Monitor Class

MonitorList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Monitor
clear
clear() -> None
push_back
push_back(v: Monitor) -> None
reserve
reserve(size: int) -> None
size
size() -> int

MonitorMode Class

Variables

NameType
frequencyint
namestr
rectIntRect
rotationMonitorRotation
supported_rotationsint

MonitorModeList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> MonitorMode
clear
clear() -> None
push_back
push_back(v: MonitorMode) -> None
reserve
reserve(size: int) -> None
size
size() -> int

Mouse Class

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

Use GetMouseNames to query for available mouse devices.

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Mouse
Constructor(name: str) -> Mouse
Down
Down(button: int) -> bool
DtX
DtX() -> int
DtY
DtY() -> int
GetOldState
GetOldState() -> MouseState
GetState
GetState() -> MouseState
HWheel
HWheel() -> int
Pressed
Pressed(button: int) -> bool
Released
Released(button: int) -> bool
Update
Update() -> None
Wheel
Wheel() -> int
X
X() -> int
Y
Y() -> int

MouseState Class

Functions

NamePrototypeDocumentation
Button
Button(btn: MouseButton) -> bool
HWheel
HWheel() -> int
Wheel
Wheel() -> int
X
X() -> int
Y
Y() -> int

NavMesh Class

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

NavMeshQuery Class

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

See Navigation.

Node Class

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

Functions

NamePrototypeDocumentation
ComputeCameraViewState
ComputeCameraViewState(aspect_ratio: Vec2) -> ViewState
ComputeWorld
ComputeWorld() -> Mat4
DestroyInstance
DestroyInstance() -> None
Disable
Disable() -> None
Enable
Enable() -> None
GetCamera
GetCamera() -> Camera

Return the Camera component of the node.

GetCollision
GetCollision(slot: int) -> Collision

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

GetCollisionCount
GetCollisionCount() -> int

Return the amount of Collision components of a Node.

GetFlags
GetFlags() -> int
GetInstance
GetInstance() -> Instance

Return the Instance component of a Node.

GetInstanceSceneAnim
GetInstanceSceneAnim(path: str) -> SceneAnimRef
GetInstanceSceneView
GetInstanceSceneView() -> SceneView
GetLight
GetLight() -> Light

Return the Light component of the node.

GetMinMax
GetMinMax(resources: PipelineResources) -> bool, MinMax
GetName
GetName() -> str

Return the node name.

GetObject
GetObject() -> Object

Return Object component of the node.

GetRigidBody
GetRigidBody() -> RigidBody

Return the RigidBody component of a Node.

GetScript
GetScript(idx: int) -> Script
GetScriptCount
GetScriptCount() -> int
GetTransform
GetTransform() -> Transform

Return the Transform component of the node.

GetUid
GetUid() -> int

Return the unique ID.

GetWorld
GetWorld() -> Mat4
HasCamera
HasCamera() -> bool

Return true if the Node has a Camera component.

HasInstance
HasInstance() -> bool

Return true if the Node has an Instance component.

HasLight
HasLight() -> bool

Return true if the Node has a Light component.

HasObject
HasObject() -> bool

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

HasRigidBody
HasRigidBody() -> bool

Return true if the Node has a RigidBody component.

HasTransform
HasTransform() -> bool

Return true if the Node has a Transform component.

IsEnabled
IsEnabled() -> bool
IsInstantiatedBy
IsInstantiatedBy() -> Node
IsItselfEnabled
IsItselfEnabled() -> bool
IsValid
IsValid() -> bool

Return true if the Node still exist.

RemoveCamera
RemoveCamera() -> None

Remove the Camera component from the Node.

RemoveCollision
RemoveCollision(c: Collision) -> None
RemoveCollision(slot: int) -> None

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

RemoveLight
RemoveLight() -> None

Remove the Light component from the Node.

RemoveObject
RemoveObject() -> None

Remove the Object component from the Node.

RemoveRigidBody
RemoveRigidBody() -> None

Remove the RigidBody component from the Node.

RemoveScript
RemoveScript(s: Script) -> None
RemoveScript(slot: int) -> None
RemoveTransform
RemoveTransform() -> None

Remove the Transform component from the Node.

SetCamera
SetCamera(c: Camera) -> None

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

SetCollision
SetCollision(slot: int, c: Collision) -> None

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

SetFlags
SetFlags(flags: int) -> None
SetInstance
SetInstance(instance: Instance) -> None

Set the Instance component of a Node.

SetLight
SetLight(l: Light) -> None
SetName
SetName(name: str) -> None

Set the node name.

SetObject
SetObject(o: Object) -> None

Set the Object component of a node.

See Scene.CreateObject.

SetRigidBody
SetRigidBody(b: RigidBody) -> None

Set the RigidBody component of a node.

SetScript
SetScript(idx: int, s: Script) -> None
SetTransform
SetTransform(t: Transform) -> None

Set the Transform component of a node.

See Scene.CreateTransform.

SetWorld
SetWorld(world: Mat4) -> None
SetupInstanceFromAssets
SetupInstanceFromAssets(resources: PipelineResources, pipeline: PipelineInfo) -> bool
SetupInstanceFromAssets(resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> bool
SetupInstanceFromFile
SetupInstanceFromFile(resources: PipelineResources, pipeline: PipelineInfo) -> bool
SetupInstanceFromFile(resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> bool
StartOnInstantiateAnim
StartOnInstantiateAnim() -> None
StopOnInstantiateAnim
StopOnInstantiateAnim() -> None
operator==
operator==(n: Node) -> bool

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

NodeList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Node
clear
clear() -> None
push_back
push_back(v: Node) -> None
reserve
reserve(size: int) -> None
size
size() -> int

NodePairContacts Class

Object Class

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

Functions

NamePrototypeDocumentation
ClearModelRef
ClearModelRef() -> None
GetBone
GetBone(idx: int) -> Node
GetBoneCount
GetBoneCount() -> int
GetMaterial
GetMaterial(slot_idx: int) -> Material
GetMaterial(name: str) -> Material

Return the object Material at index.

GetMaterialCount
GetMaterialCount() -> int

Return the number of Material in the object material table.

GetMaterialName
GetMaterialName(slot_idx: int) -> str
GetMinMax
GetMinMax(resources: PipelineResources) -> bool, MinMax
GetModelRef
GetModelRef() -> ModelRef

Return the ModelRef to display.

IsValid
IsValid() -> bool
SetBone
SetBone(idx: int, node: Node) -> bool
SetBoneCount
SetBoneCount(count: int) -> None
SetMaterial
SetMaterial(slot_idx: int, mat: Material) -> None

Set the object Material at index.

SetMaterialCount
SetMaterialCount(count: int) -> None

Set the number of Material in the object material table.

SetMaterialName
SetMaterialName(slot_idx: int, name: str) -> None
SetModelRef
SetModelRef(r: ModelRef) -> None

Set the ModelRef to display.

operator==
operator==(o: Object) -> bool

OpenVREye Class

Matrices for a VR eye, see OpenVRState.

Variables

NameType
offsetMat4
projectionMat44

OpenVREyeFrameBuffer Class

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

Functions

NamePrototypeDocumentation
GetHandle
GetHandle() -> FrameBufferHandle

OpenVRState Class

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

Variables

NameType
bodyMat4
headMat4
heightint
inv_headMat4
leftOpenVREye
rightOpenVREye
widthint

OpenXREyeFrameBuffer Class

OpenXREyeFrameBufferList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> OpenXREyeFrameBuffer
clear
clear() -> None
push_back
push_back(v: OpenXREyeFrameBuffer) -> None
reserve
reserve(size: int) -> None
size
size() -> int

OpenXRFrameInfo Class

Variables

NameType
id_fbsintList

Picture Class

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

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

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

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Picture
Constructor(picture: Picture) -> Picture
Constructor(width: int, height: int, format: PictureFormat) -> Picture
Constructor(data: VoidPointer, width: int, height: int, format: PictureFormat) -> Picture
CopyData
CopyData(data: VoidPointer, width: int, height: int, format: PictureFormat) -> None
GetData
GetData() -> int
GetFormat
GetFormat() -> PictureFormat
GetHeight
GetHeight() -> int

Return the picture height.

GetPixelRGBA
GetPixelRGBA(x: int, y: int) -> Color
GetWidth
GetWidth() -> int

Return the picture width.

SetData
SetData(data: VoidPointer, width: int, height: int, format: PictureFormat) -> None
SetPixelRGBA
SetPixelRGBA(x: int, y: int, col: Color) -> None

Pipeline Class

Rendering pipeline base class.

PipelineInfo Class

Variables

NameType
namestr

PipelineProgram Class

PipelineProgramRef Class

PipelineResources Class

Functions

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

ProfilerFrame Class

ProgramHandle Class

Handle to a shader program.

Quaternion Class

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

Variables

NameType
wfloat
xfloat
yfloat
zfloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Quaternion
Constructor(x: float, y: float, z: float, w: float) -> Quaternion
Constructor(q: Quaternion) -> Quaternion
operator*
operator*(v: float) -> Quaternion
operator*(q: Quaternion) -> Quaternion
operator*=
operator*=(v: float) -> None
operator*=(q: Quaternion) -> None
operator+
operator+(v: float) -> Quaternion
operator+(q: Quaternion) -> Quaternion
operator+=
operator+=(v: float) -> None
operator+=(q: Quaternion) -> None
operator-
operator-(v: float) -> Quaternion
operator-(q: Quaternion) -> Quaternion
operator-=
operator-=(v: float) -> None
operator-=(q: Quaternion) -> None
operator/
operator/(v: float) -> Quaternion
operator/=
operator/=(v: float) -> None

RaycastOut Class

Contains the result of a physics raycast.

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

Variables

NameType
NVec3
PVec3
nodeNode
tfloat

RaycastOutList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> RaycastOut
clear
clear() -> None
push_back
push_back(v: RaycastOut) -> None
reserve
reserve(size: int) -> None
size
size() -> int

Rect Class

Variables

NameType
exfloat
eyfloat
sxfloat
syfloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Rect
Constructor(x: float, y: float) -> Rect
Constructor(sx: float, sy: float, ex: float, ey: float) -> Rect
Constructor(rect: Rect) -> Rect

RenderState Class

RigidBody Class

Rigid body component, see Physics.

Functions

NamePrototypeDocumentation
GetAngularDamping
GetAngularDamping() -> float

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

GetContinuousCollisionDetection
GetContinuousCollisionDetection() -> bool
GetFriction
GetFriction() -> float
GetLinearDamping
GetLinearDamping() -> float
GetRestitution
GetRestitution() -> float
GetRollingFriction
GetRollingFriction() -> float
GetType
GetType() -> RigidBodyType

Return the rigid body type. See RigidBody.SetType.

IsValid
IsValid() -> bool
SetAngularDamping
SetAngularDamping(damping: float) -> None

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

SetContinuousCollisionDetection
SetContinuousCollisionDetection(enable: bool) -> None
SetFriction
SetFriction(friction: float) -> None
SetLinearDamping
SetLinearDamping(damping: float) -> None
SetRestitution
SetRestitution(restitution: float) -> None
SetRollingFriction
SetRollingFriction(rolling_friction: float) -> None
SetType
SetType(type: RigidBodyType) -> None

Set the rigid body type.

operator==
operator==(b: RigidBody) -> bool

SAO Class

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

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

Scene Class

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

Variables

NameType
canvasCanvas
environmentEnvironment

Functions

NamePrototypeDocumentation
Clear
Clear() -> None

Remove all nodes from the scene.

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

Create a Node in the scene.

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

Remove a Node from the scene.

DestroyObject
DestroyObject(object: Object) -> None
DestroyRigidBody
DestroyRigidBody(rigid_body: RigidBody) -> None
DestroyScript
DestroyScript(script: Script) -> None
DestroyTransform
DestroyTransform(transform: Transform) -> None
GarbageCollect
GarbageCollect() -> int

Destroy any unreferenced components in the scene.

GetAllNodeCount
GetAllNodeCount() -> int

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

GetAllNodes
GetAllNodes() -> NodeList
GetAllNodesWithComponent
GetAllNodesWithComponent(idx: NodeComponentIdx) -> NodeList
GetCurrentCamera
GetCurrentCamera() -> Node

Get the current camera.

GetKeys
GetKeys() -> StringList
GetMinMax
GetMinMax(resources: PipelineResources) -> bool, MinMax
GetNode
GetNode(name: str) -> Node

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

GetNodeChildren
GetNodeChildren(node: Node) -> NodeList

Return all children for a given node.

GetNodeCount
GetNodeCount() -> int

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

GetNodeEx
GetNodeEx(path: str) -> Node

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

A node path is constructed as follow:

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

Examples:

Get the node named child parented to the root node.

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

Get the node named dummy instantiated by the root node.

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

Return all nodes in scene.

GetNodesWithComponent
GetNodesWithComponent(idx: NodeComponentIdx) -> NodeList
GetPlayingAnimNames
GetPlayingAnimNames() -> StringList
GetPlayingAnimRefs
GetPlayingAnimRefs() -> ScenePlayAnimRefList
GetSceneAnim
GetSceneAnim(name: str) -> SceneAnimRef
GetSceneAnims
GetSceneAnims() -> SceneAnimRefList
GetScript
GetScript(slot_idx: int) -> Script
GetScriptCount
GetScriptCount() -> int
GetValue
GetValue(key: str) -> str
HasKey
HasKey(key: str) -> bool
IsChildOf
IsChildOf(node: Node, parent: Node) -> bool
IsPlaying
IsPlaying(ref: ScenePlayAnimRef) -> bool
IsRoot
IsRoot(node: Node) -> bool
PlayAnim
PlayAnim(ref: SceneAnimRef) -> ScenePlayAnimRef
PlayAnim(ref: SceneAnimRef, loop_mode: AnimLoopMode) -> ScenePlayAnimRef
PlayAnim(ref: SceneAnimRef, loop_mode: AnimLoopMode, easing: Easing) -> ScenePlayAnimRef
PlayAnim(ref: SceneAnimRef, loop_mode: AnimLoopMode, easing: Easing, t_start: int) -> ScenePlayAnimRef
PlayAnim(ref: SceneAnimRef, loop_mode: AnimLoopMode, easing: Easing, t_start: int, t_end: int) -> ScenePlayAnimRef
PlayAnim(ref: SceneAnimRef, loop_mode: AnimLoopMode, easing: Easing, t_start: int, t_end: int, paused: bool) -> ScenePlayAnimRef
PlayAnim(ref: SceneAnimRef, loop_mode: AnimLoopMode, easing: Easing, t_start: int, t_end: int, paused: bool, t_scale: float) -> ScenePlayAnimRef
ReadyWorldMatrices
ReadyWorldMatrices() -> None
RemoveKey
RemoveKey(key: str) -> None
ReserveCameras
ReserveCameras(count: int) -> None
ReserveLights
ReserveLights(count: int) -> None

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

ReserveNodes
ReserveNodes(count: int) -> None

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

ReserveObjects
ReserveObjects(count: int) -> None

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

ReserveScripts
ReserveScripts(count: int) -> None
ReserveTransforms
ReserveTransforms(count: int) -> None

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

SetCurrentCamera
SetCurrentCamera(camera: Node) -> None

Set the current camera.

SetProbe
SetProbe(irradiance: TextureRef, radiance: TextureRef, brdf: TextureRef) -> None
SetScript
SetScript(slot_idx: int, script: Script) -> None
SetValue
SetValue(key: str, value: str) -> None
StopAllAnims
StopAllAnims() -> None
StopAnim
StopAnim(ref: ScenePlayAnimRef) -> None
Update
Update(dt: int) -> None

Start the Update phase of the scene.

UpdatePlayingAnims
UpdatePlayingAnims(dt: int) -> None

SceneAnimRef Class

Reference to a scene animation.

SceneAnimRefList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> SceneAnimRef
clear
clear() -> None
push_back
push_back(v: SceneAnimRef) -> None
reserve
reserve(size: int) -> None
size
size() -> int

SceneBullet3Physics Class

Newton physics for scene physics and collision components.

See Physics.

Functions

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

SceneBullet3PhysicsPreTickCallback Class

SceneClocks Class

Holds clocks for the different scene systems.

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

SceneForwardPipelinePassViewId Class

SceneForwardPipelineRenderData Class

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

See Using the Forward Pipeline.

SceneLuaVM Class

Lua VM for scene script components.

See Scripting.

Functions

NamePrototypeDocumentation
Call
Call(script: Script, function: str, args: LuaObjectList) -> bool, LuaObjectList
Constructor
Constructor() -> SceneLuaVM
CreateNodeScriptsFromAssets
CreateNodeScriptsFromAssets(scene: Scene, node: Node) -> ScriptList
CreateNodeScriptsFromFile
CreateNodeScriptsFromFile(scene: Scene, node: Node) -> ScriptList
CreateScriptFromAssets
CreateScriptFromAssets(scene: Scene, script: Script) -> bool
CreateScriptFromFile
CreateScriptFromFile(scene: Scene, script: Script) -> bool
CreateScriptFromSource
CreateScriptFromSource(scene: Scene, script: Script, src: str) -> bool
DestroyScripts
DestroyScripts(scripts: ScriptList) -> None
GarbageCollect
GarbageCollect(scene: Scene) -> ScriptList
GetScriptCount
GetScriptCount() -> int
GetScriptEnv
GetScriptEnv(script: Script) -> LuaObject
GetScriptInterface
GetScriptInterface(script: Script) -> StringList
GetScriptValue
GetScriptValue(script: Script, name: str) -> LuaObject
MakeLuaObject
MakeLuaObject() -> LuaObject
SceneCreateScriptsFromAssets
SceneCreateScriptsFromAssets(scene: Scene) -> ScriptList
SceneCreateScriptsFromFile
SceneCreateScriptsFromFile(scene: Scene) -> ScriptList
SetScriptValue
SetScriptValue(script: Script, name: str, value: LuaObject) -> bool
SetScriptValue(script: Script, name: str, value: LuaObject, notify: bool) -> bool

ScenePhysics Class

Functions

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

ScenePhysicsPreTickCallback Class

ScenePlayAnimRef Class

Reference to a playing scene animation.

ScenePlayAnimRefList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> ScenePlayAnimRef
clear
clear() -> None
push_back
push_back(v: ScenePlayAnimRef) -> None
reserve
reserve(size: int) -> None
size
size() -> int

SceneView Class

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

See Node.GetInstanceSceneView and Working with Scene.

Functions

NamePrototypeDocumentation
GetNode
GetNode(scene: Scene, name: str) -> Node

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

See Working with Scene.

GetNodes
GetNodes(scene: Scene) -> NodeList

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

See Working with Scene.

Script Class

Functions

NamePrototypeDocumentation
GetPath
GetPath() -> str
IsValid
IsValid() -> bool
SetPath
SetPath(path: str) -> None
operator==
operator==(s: Script) -> bool

ScriptList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Script
clear
clear() -> None
push_back
push_back(v: Script) -> None
reserve
reserve(size: int) -> None
size
size() -> int

SetDrawStatesCallback Class

Signal_returning_void_taking_const_char_ptr Class

Functions

NamePrototypeDocumentation
Connect
Disconnect
Disconnect(connection: TextInputCallbackConnection) -> None
DisconnectAll
DisconnectAll() -> None
Emit
Emit(arg0: str) -> None
GetListenerCount
GetListenerCount() -> int

Signal_returning_void_taking_time_ns Class

Functions

NamePrototypeDocumentation
Connect
Connect(listener: TimeCallback) -> TimeCallbackConnection
Disconnect
Disconnect(connection: TimeCallbackConnection) -> None
DisconnectAll
DisconnectAll() -> None
Emit
Emit(arg0: int) -> None
GetListenerCount
GetListenerCount() -> int

SpatializedSourceState Class

State for a spatialized audio source, see Playing Audio.

Variables

NameType
mtxMat4
repeatSourceRepeat
velVec3
volumefloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> SpatializedSourceState
Constructor(mtx: Mat4) -> SpatializedSourceState
Constructor(mtx: Mat4, volume: float) -> SpatializedSourceState
Constructor(mtx: Mat4, volume: float, repeat: SourceRepeat) -> SpatializedSourceState
Constructor(mtx: Mat4, volume: float, repeat: SourceRepeat, vel: Vec3) -> SpatializedSourceState

SRanipalEyeState Class

Variables

NameType
eye_opennessfloat
gaze_direction_normalizedVec3
gaze_origin_mmVec3
pupil_diameter_mmfloat
pupil_diameter_validbool

SRanipalState Class

Variables

NameType
left_eyeSRanipalEyeState
right_eyeSRanipalEyeState

StereoSourceState Class

State for a stereo audio source, see Playing Audio.

Variables

NameType
panningfloat
repeatSourceRepeat
volumefloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> StereoSourceState
Constructor(volume: float) -> StereoSourceState
Constructor(volume: float, repeat: SourceRepeat) -> StereoSourceState
Constructor(volume: float, repeat: SourceRepeat, panning: float) -> StereoSourceState

StringList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> str
clear
clear() -> None
push_back
push_back(v: str) -> None
reserve
reserve(size: int) -> None
size
size() -> int

TextInputCallback Class

TextInputCallbackConnection Class

Texture Class

TextureInfo Class

Variables

NameType
bitsPerPixelint
cubeMapbool
depthint
formatTextureFormat
heightint
numLayersint
numMipsint
storageSizeint
widthint

TextureRef Class

TimeCallback Class

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

TimeCallbackConnection Class

Transform Class

Transformation component for a Node, see Working with Scene.

Functions

NamePrototypeDocumentation
ClearParent
ClearParent() -> None
GetParent
GetParent() -> Node

Return the parent node for this Transform.

GetPos
GetPos() -> Vec3

Return the transform position.

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

GetPosRot
GetPosRot() -> Vec3, Vec3
GetRot
GetRot() -> Vec3

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
GetScale() -> Vec3

Get the transform scale.

GetTRS
GetTRS() -> TransformTRS

Return the TransformTRS.

GetWorld
GetWorld() -> Mat4

Return the world matrix.

IsValid
IsValid() -> bool
SetLocal
SetLocal(local: Mat4) -> None
SetParent
SetParent(n: Node) -> None

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

SetPos
SetPos(T: Vec3) -> None

Set the transform position.

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

SetPosRot
SetPosRot(pos: Vec3, rot: Vec3) -> None
SetRot
SetRot(R: Vec3) -> None

Set the transform rotation from a vector of Euler angles.

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

SetScale
SetScale(S: Vec3) -> None

Set the transform scale.

SetTRS
SetTRS(TRS: TransformTRS) -> None

Set the TransformTRS.

SetWorld
SetWorld(world: Mat4) -> None

Set the world matrix.

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

operator==
operator==(t: Transform) -> bool

TransformTRS Class

Translation, rotation and scale packed as a single object.

Variables

NameType
posVec3
rotVec3
sclVec3

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> TransformTRS

UInt16List Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> int
clear
clear() -> None
push_back
push_back(v: int) -> None
reserve
reserve(size: int) -> None
size
size() -> int

UInt32List Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> int
clear
clear() -> None
push_back
push_back(v: int) -> None
reserve
reserve(size: int) -> None
size
size() -> int

UniformSetTexture Class

Command object to set a uniform texture at draw time.

UniformSetTextureList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> UniformSetTexture
clear
clear() -> None
push_back
push_back(v: UniformSetTexture) -> None
reserve
reserve(size: int) -> None
size
size() -> int

UniformSetValue Class

Command object to set a uniform value at draw time.

UniformSetValueList Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> UniformSetValue
clear
clear() -> None
push_back
push_back(v: UniformSetValue) -> None
reserve
reserve(size: int) -> None
size
size() -> int

update_controllersCallback Class

Vec2 Class

2-dimensional floating point vector.

Variables

NameType
Onestatic Vec2
Zerostatic Vec2
xfloat
yfloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Vec2
Constructor(x: float, y: float) -> Vec2
Constructor(v: Vec2) -> Vec2
Constructor(v: Vec3) -> Vec2
Constructor(v: Vec4) -> Vec2
Set
Set(x: float, y: float) -> None
operator*
operator*(v: Vec2) -> Vec2
operator*(k: float) -> Vec2
operator*=
operator*=(v: Vec2) -> None
operator*=(k: float) -> None
operator+
operator+(v: Vec2) -> Vec2
operator+(k: float) -> Vec2
operator+=
operator+=(v: Vec2) -> None
operator+=(k: float) -> None
operator-
operator-(v: Vec2) -> Vec2
operator-(k: float) -> Vec2
operator-=
operator-=(v: Vec2) -> None
operator-=(k: float) -> None
operator/
operator/(v: Vec2) -> Vec2
operator/(k: float) -> Vec2
operator/=
operator/=(v: Vec2) -> None
operator/=(k: float) -> None

Vec2List Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Vec2

Gets the element at the specified index.

clear
clear() -> None
push_back
push_back(v: Vec2) -> None

Adds an element to the end.

reserve
reserve(size: int) -> None
size
size() -> int

Returns the number of stored elements.

Vec3 Class

3-dimensional vector.

Variables

NameType
Backstatic Vec3
Downstatic Vec3
Frontstatic Vec3
Leftstatic Vec3
Onestatic Vec3
Rightstatic Vec3
Upstatic Vec3
Zerostatic Vec3
xfloat
yfloat
zfloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Vec3
Constructor(x: float, y: float, z: float) -> Vec3
Constructor(v: Vec2) -> Vec3
Constructor(v: iVec2) -> Vec3
Constructor(v: Vec3) -> Vec3
Constructor(v: Vec4) -> Vec3
Set
Set(x: float, y: float, z: float) -> None
operator!=
operator!=(v: Vec3) -> bool
operator*
operator*(v: Vec3) -> Vec3
operator*(k: float) -> Vec3
operator*=
operator*=(v: Vec3) -> None
operator*=(k: float) -> None
operator+
operator+(v: Vec3) -> Vec3
operator+(k: float) -> Vec3
operator+=
operator+=(v: Vec3) -> None
operator+=(k: float) -> None
operator-
operator-(v: Vec3) -> Vec3
operator-(k: float) -> Vec3
operator-=
operator-=(v: Vec3) -> None
operator-=(k: float) -> None
operator/
operator/(v: Vec3) -> Vec3
operator/(k: float) -> Vec3
operator/=
operator/=(v: Vec3) -> None
operator/=(k: float) -> None
operator==
operator==(v: Vec3) -> bool

Vec3List Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Vec3
clear
clear() -> None
push_back
push_back(v: Vec3) -> None
reserve
reserve(size: int) -> None
size
size() -> int

Vec4 Class

4-dimensional vector.

Variables

NameType
wfloat
xfloat
yfloat
zfloat

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Vec4
Constructor(x: float, y: float, z: float) -> Vec4
Constructor(x: float, y: float, z: float, w: float) -> Vec4
Constructor(v: Vec2) -> Vec4
Constructor(v: iVec2) -> Vec4
Constructor(v: Vec3) -> Vec4
Constructor(v: Vec4) -> Vec4
Set
Set(x: float, y: float, z: float) -> None
Set(x: float, y: float, z: float, w: float) -> None
operator*
operator*(v: Vec4) -> Vec4
operator*(k: float) -> Vec4
operator*=
operator*=(v: Vec4) -> None
operator*=(k: float) -> None
operator+
operator+(v: Vec4) -> Vec4
operator+(k: float) -> Vec4
operator+=
operator+=(v: Vec4) -> None
operator+=(k: float) -> None
operator-
operator-(v: Vec4) -> Vec4
operator-(k: float) -> Vec4
operator-=
operator-=(v: Vec4) -> None
operator-=(k: float) -> None
operator/
operator/(v: Vec4) -> Vec4
operator/(k: float) -> Vec4
operator/=
operator/=(v: Vec4) -> None
operator/=(k: float) -> None

Vec4List Class

Functions

NamePrototypeDocumentation
at
at(idx: int) -> Vec4
clear
clear() -> None
push_back
push_back(v: Vec4) -> None
reserve
reserve(size: int) -> None
size
size() -> int

Vertex Class

Variables

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

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> Vertex

VertexLayout Class

Memory layout and types of vertex attributes.

Functions

NamePrototypeDocumentation
Add
Add(attrib: Attrib, count: int, type: AttribType) -> VertexLayout
Add(attrib: Attrib, count: int, type: AttribType, normalized: bool) -> VertexLayout
Add(attrib: Attrib, count: int, type: AttribType, normalized: bool, as_int: bool) -> VertexLayout
Begin
Begin() -> VertexLayout
Constructor
Constructor() -> VertexLayout
End
End() -> None
GetOffset
GetOffset(attrib: Attrib) -> int
GetSize
GetSize(count: int) -> int
GetStride
GetStride() -> int
Has
Has(attrib: Attrib) -> bool
Skip
Skip(size: int) -> VertexLayout

Vertices Class

Helper class to generate vertex buffers for drawing primitives.

Functions

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

ViewState Class

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

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

Variables

NameType
frustumFrustum
projMat44
viewMat4

VoidPointer Class

VRController Class

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

Use GetVRControllerNames to query for available VR controller devices.

Functions

NamePrototypeDocumentation
Connected
Connected() -> bool

Gamepad was connected since the last update.

Constructor
Constructor() -> VRController
Constructor(name: str) -> VRController
Disconnected
Disconnected() -> bool

Gamepad was disconnected since the last update.

Down
Down(btn: VRControllerButton) -> bool
DtSurface
DtSurface(idx: int) -> Vec2
IsConnected
IsConnected() -> bool

Gamepad is currently connected.

Pressed
Pressed(btn: VRControllerButton) -> bool
Released
Released(btn: VRControllerButton) -> bool
SendHapticPulse
SendHapticPulse(duration: int) -> None
Surface
Surface(idx: int) -> Vec2
Touch
Touch(btn: VRControllerButton) -> bool
TouchEnd
TouchEnd(btn: VRControllerButton) -> bool
TouchStart
TouchStart(btn: VRControllerButton) -> bool
Update
Update() -> None
World
World() -> Mat4

VRControllerState Class

Functions

NamePrototypeDocumentation
IsConnected
IsConnected() -> bool
Pressed
Pressed(btn: VRControllerButton) -> bool
Surface
Surface(idx: int) -> Vec2
Touched
Touched(btn: VRControllerButton) -> bool
World
World() -> Mat4

VRGenericTracker Class

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

Use GetVRGenericTrackerNames to query for available VR generic tracker devices.

Functions

NamePrototypeDocumentation
Constructor
Constructor() -> VRGenericTracker
Constructor(name: str) -> VRGenericTracker
IsConnected
IsConnected() -> bool
Update
Update() -> None
World
World() -> Mat4

VRGenericTrackerState Class

Functions

NamePrototypeDocumentation
IsConnected
IsConnected() -> bool
World
World() -> Mat4

Window Class

Window object.