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
| Name | Prototype | Documentation |
|---|---|---|
GetFov | GetFov() -> float | Return the camera field of view. |
GetIsOrthographic | GetIsOrthographic() -> bool | Return |
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
| Name | Type |
|---|---|
zfar | float |
znear | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> CameraZRange |
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 | 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
| 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 | Constructor() -> 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*(k: float) -> Color | |
operator*= | operator*=(color: Color) ->
Noneoperator*=(k: float) -> None | |
operator+ |
operator+(k: float) -> Color | |
operator+= | operator+=(color: Color) ->
Noneoperator+=(k: float) -> None | |
operator- |
operator-(k: float) -> Color | |
operator-= | operator-=(color: Color) ->
Noneoperator-=(k: float) -> None | |
operator/ |
operator/(k: float) -> Color | |
operator/= | operator/=(color: Color) ->
Noneoperator/=(k: float) -> None | |
operator== | operator==(color: Color) -> bool |
ColorList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
N | Vec3 |
P | Vec3 |
d | float |
ContactList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
AddAgent | ||
Constructor | Constructor() -> Crowd | |
GetEditableAgent | GetEditableAgent(idx: int) -> CrowdAgent | |
Init | ||
RemoveAgent | RemoveAgent(idx: int) -> None | |
RequestMoveTarget | ||
Update | Update(dt: float) -> None |
CrowdAgent Class
State of a crowd agent.
Functions
| Name | Prototype | Documentation |
|---|---|---|
GetPos | GetPos() -> Vec3 | |
GetVel | GetVel() -> Vec3 | |
SetPos | SetPos(pos: Vec3) -> None |
CrowdAgentParams Class
Data Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> Data | |
GetSize | GetSize() -> int | |
Rewind | Rewind() -> None |
DearImguiContext Class
Context to render immediate GUI.
DirEntry Class
Variables
| Name | Type |
|---|---|
name | str |
type | int |
DirEntryList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| 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 | str |
pattern | str |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> FileFilter |
FileFilterList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
Flip | Flip(view_state: ViewState) -> None |
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 | int |
temporal_aa_weight | float |
z_thickness | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> ForwardPipelineAAAConfig |
ForwardPipelineFog Class
Fog properties for the forward pipeline.
Variables
| Name | Type |
|---|---|
color | Color |
far | float |
near | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> ForwardPipelineFog |
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 | Constructor() -> ForwardPipelineLight |
ForwardPipelineLightList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| 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 | 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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
AddPolygon | ||
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
AddBezierCubic | ||
AddCircle | ||
AddCircleFilled | ||
AddConvexPolyFilled | ||
AddImage | ||
AddImageQuad | ||
AddImageRounded | ||
AddLine | ||
AddPolyline | ||
AddQuad | ||
AddQuadFilled | ||
AddRect | ||
AddRectFilled | ||
AddRectFilledMultiColor | ||
AddText | ||
AddTriangle | ||
AddTriangleFilled | ||
ChannelsMerge | ChannelsMerge() -> None | |
ChannelsSetCurrent | ChannelsSetCurrent(channel_index: int) -> None | |
ChannelsSplit | ChannelsSplit(channels_count: int) -> None | |
GetClipRectMax | GetClipRectMax() -> Vec2 | |
GetClipRectMin | GetClipRectMin() -> Vec2 | |
PathArcTo | ||
PathArcToFast | ||
PathBezierCubicCurveTo | ||
PathClear | PathClear() -> None | |
PathFillConvex | PathFillConvex(col: int) -> None | |
PathLineTo | PathLineTo(pos: Vec2) -> None | |
PathLineToMergeDuplicate | PathLineToMergeDuplicate(pos: Vec2) -> None | |
PathRect | ||
PathStroke | PathStroke(col:
int, closed: bool) -> NonePathStroke(col: int, closed: bool, thickness: float) -> None | |
PopClipRect | PopClipRect() -> None | |
PopTextureID | PopTextureID() -> None | |
PushClipRect | ||
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
ex | int |
ey | int |
sx | int |
sy | int |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> 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
| Name | Type |
|---|---|
One | static iVec2 |
Zero | static iVec2 |
x | int |
y | int |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> iVec2
| |
Set | Set(x: int, y: int) -> None | |
operator* |
operator*(k: int) -> iVec2 | |
operator*= | operator*=(v: iVec2) ->
Noneoperator*=(k: int) -> None | |
operator+ |
operator+(k: int) -> iVec2 | |
operator+= | operator+=(v: iVec2) ->
Noneoperator+=(k: int) -> None | |
operator- |
operator-(k: int) -> iVec2 | |
operator-= | operator-=(v: iVec2) ->
Noneoperator-=(k: int) -> None | |
operator/ |
operator/(k: int) -> iVec2 | |
operator/= | operator/=(v: iVec2) ->
Noneoperator/=(k: int) -> None |
iVec2List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
mn | Vec3 |
mx | Vec3 |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> 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
| Name | Prototype | Documentation |
|---|---|---|
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
Reference to a Model inside a PipelineResources object.
See LoadModelFromFile, LoadModelFromAssets and PipelineResources.AddModel.
Monitor Class
MonitorList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
frequency | int |
name | str |
rect | IntRect |
rotation | MonitorRotation |
supported_rotations | int |
MonitorModeList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
Button | Button(btn: MouseButton) -> bool | |
HWheel | HWheel() -> int | |
Wheel | Wheel() -> int | |
X | X() -> int | |
Y | Y() -> int |
Node Class
The base element of a scene, see Working with Scene.
Functions
| Name | Prototype | Documentation |
|---|---|---|
ComputeCameraViewState | ||
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 | |
GetCollisionCount | GetCollisionCount() -> int | |
GetFlags | GetFlags() -> int | |
GetInstance | GetInstance() -> Instance | |
GetInstanceSceneAnim | GetInstanceSceneAnim(path: str) -> SceneAnimRef | |
GetInstanceSceneView | GetInstanceSceneView() -> SceneView | |
GetLight | GetLight() -> Light | Return the Light component of the node. |
GetMinMax | ||
GetName | GetName() -> str | Return the node name. |
GetObject | GetObject() -> Object | Return Object component of the node. |
GetRigidBody | GetRigidBody() -> RigidBody | |
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 | |
HasInstance | HasInstance() -> bool | |
HasLight | HasLight() -> bool | |
HasObject | HasObject() -> bool | |
HasRigidBody | HasRigidBody() -> bool | |
HasTransform | HasTransform() -> bool | |
IsEnabled | IsEnabled() -> bool | |
IsInstantiatedBy | IsInstantiatedBy() -> Node | |
IsItselfEnabled | IsItselfEnabled() -> bool | |
IsValid | IsValid() -> bool | Return |
RemoveCamera | RemoveCamera() -> None | |
RemoveCollision | RemoveCollision(c: Collision) ->
NoneRemoveCollision(slot: int) -> None | |
RemoveLight | RemoveLight() -> None | |
RemoveObject | RemoveObject() -> None | |
RemoveRigidBody | RemoveRigidBody() -> None | |
RemoveScript | RemoveScript(s: Script) ->
NoneRemoveScript(slot: int) -> None | |
RemoveTransform | RemoveTransform() -> None | |
SetCamera | SetCamera(c: Camera) -> None | Set the Camera component of a node. See Scene.CreateCamera. |
SetCollision | ||
SetFlags | SetFlags(flags: int) -> None | |
SetInstance | SetInstance(instance: Instance) -> None | |
SetLight | SetLight(l: Light) -> None | Set the Light component of a node. See Scene.CreateLight, Scene.CreatePointLight, Scene.CreateSpotLight or Scene.CreateLinearLight. |
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 | ||
SetTransform | SetTransform(t: Transform) -> None | Set the Transform component of a node. |
SetWorld | SetWorld(world: Mat4) -> None | |
SetupInstanceFromAssets |
SetupInstanceFromAssets(resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> bool | |
SetupInstanceFromFile |
SetupInstanceFromFile(resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> bool | |
StartOnInstantiateAnim | StartOnInstantiateAnim() -> None | |
StopOnInstantiateAnim | StopOnInstantiateAnim() -> None | |
operator== | operator==(n: Node) -> bool | Return |
NodeList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
ClearModelRef | ClearModelRef() -> None | |
GetBone | GetBone(idx: int) -> Node | |
GetBoneCount | GetBoneCount() -> int | |
GetMaterial | GetMaterial(slot_idx:
int) -> MaterialGetMaterial(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 | ||
GetModelRef | GetModelRef() -> ModelRef | Return the ModelRef to display. |
IsValid | IsValid() -> bool | |
SetBone | ||
SetBoneCount | SetBoneCount(count: int) -> None | |
SetMaterial | 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
| 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 | 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
| Name | Type |
|---|---|
body | Mat4 |
head | Mat4 |
height | int |
inv_head | Mat4 |
left | OpenVREye |
right | OpenVREye |
width | int |
OpenXREyeFrameBuffer Class
OpenXREyeFrameBufferList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| 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 | Constructor() -> Picture
| |
CopyData | ||
GetData | GetData() -> int | |
GetFormat | GetFormat() -> PictureFormat | |
GetHeight | GetHeight() -> int | Return the picture height. |
GetPixelRGBA | ||
GetWidth | GetWidth() -> int | Return the picture width. |
SetData | ||
SetPixelRGBA |
Pipeline Class
Rendering pipeline base class.
PipelineInfo Class
Variables
| Name | Type |
|---|---|
name | str |
PipelineProgram Class
PipelineProgramRef Class
PipelineResources Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
AddModel | ||
AddProgram | ||
AddTexture | ||
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 | ||
GetModelName | GetModelName(ref: ModelRef) -> str | |
GetProgram | GetProgram(ref: PipelineProgramRef) -> PipelineProgram | |
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 | ||
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 | Constructor() -> Quaternion
Constructor(q: Quaternion) -> Quaternion | |
operator* | operator*(v:
float) -> Quaternionoperator*(q: Quaternion) -> Quaternion | |
operator*= | operator*=(v:
float) -> Noneoperator*=(q: Quaternion) -> None | |
operator+ | operator+(v:
float) -> Quaternionoperator+(q: Quaternion) -> Quaternion | |
operator+= | operator+=(v:
float) -> Noneoperator+=(q: Quaternion) -> None | |
operator- | operator-(v:
float) -> Quaternionoperator-(q: Quaternion) -> Quaternion | |
operator-= | operator-=(v:
float) -> Noneoperator-=(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 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 | 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
| Name | Type |
|---|---|
ex | float |
ey | float |
sx | float |
sy | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> Rect
|
RenderState Class
RigidBody Class
Rigid body component, see Physics.
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
canvas | Canvas |
environment | Environment |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Clear | Clear() -> None | Remove all nodes from the scene. |
ComputeCurrentCameraViewState | ||
ComputeWorldMatrices | ComputeWorldMatrices() -> None | |
Constructor | Constructor() -> Scene | |
CreateCamera | CreateCamera() -> Camera
| |
CreateCollision | CreateCollision() -> Collision | |
CreateInstance | CreateInstance() -> Instance | |
CreateLight | CreateLight() -> Light | |
CreateLinearLight | CreateLinearLight(diffuse: Color, diffuse_intensity:
float, specular: Color, specular_intensity: float) -> LightCreateLinearLight(diffuse: Color, diffuse_intensity:
float, specular: Color, specular_intensity: float, priority: float) -> LightCreateLinearLight(diffuse: Color, diffuse_intensity:
float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType) -> LightCreateLinearLight(diffuse: Color, diffuse_intensity:
float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType, shadow_bias: float) -> LightCreateLinearLight(diffuse: Color, diffuse_intensity:
float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType, shadow_bias: float, pssm_split: Vec4) -> LightCreateLinearLight(diffuse: Color, specular: Color, priority:
float, shadow_type: LightShadowType) -> LightCreateLinearLight(diffuse: Color, specular: Color, priority:
float, shadow_type: LightShadowType, shadow_bias: float) -> LightCreateLinearLight(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
| |
CreateOrthographicCamera | ||
CreatePointLight | CreatePointLight(radius:
float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float) -> LightCreatePointLight(radius:
float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float) -> LightCreatePointLight(radius:
float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType) -> LightCreatePointLight(radius:
float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType, shadow_bias: float) -> LightCreatePointLight(radius:
float, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType) -> LightCreatePointLight(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) -> LightCreateSpotLight(radius:
float, inner_angle: float, outer_angle: float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float) -> LightCreateSpotLight(radius:
float, inner_angle: float, outer_angle: float, diffuse: Color, diffuse_intensity: float, specular: Color, specular_intensity: float, priority: float, shadow_type: LightShadowType) -> LightCreateSpotLight(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) -> LightCreateSpotLight(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) -> LightCreateSpotLight(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) -> LightCreateSpotLight(radius:
float, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color) -> LightCreateSpotLight(radius:
float, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color, priority: float) -> LightCreateSpotLight(radius:
float, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType) -> LightCreateSpotLight(radius:
float, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType, shadow_bias: float) -> LightCreateSpotLight(radius:
float, inner_angle: float, outer_angle: float, diffuse: Color, specular: Color, priority: float, shadow_type: LightShadowType, shadow_bias: float, shadow_near: float) -> LightCreateSpotLight(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
| |
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 | ||
GetNode | GetNode(name: str) -> Node | Get a node by name. For more complex queries see Scene.GetNodeEx. |
GetNodeChildren | 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:
Examples: Get the node named Get the node named |
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 | ||
IsPlaying | IsPlaying(ref: ScenePlayAnimRef) -> bool | |
IsRoot | IsRoot(node: Node) -> bool | |
PlayAnim | PlayAnim(ref: SceneAnimRef) -> ScenePlayAnimRef
PlayAnim(ref: SceneAnimRef, loop_mode: AnimLoopMode, easing: Easing, t_start:
int) -> ScenePlayAnimRefPlayAnim(ref: SceneAnimRef, loop_mode: AnimLoopMode, easing: Easing, t_start:
int, t_end: int) -> ScenePlayAnimRefPlayAnim(ref: SceneAnimRef, loop_mode: AnimLoopMode, easing: Easing, t_start:
int, t_end: int, paused: bool) -> ScenePlayAnimRefPlayAnim(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 | ||
SetScript | ||
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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 | ||
NodeAddImpulse | ||
NodeAddTorque | ||
NodeAddTorqueImpulse | ||
NodeCollideWorld | ||
NodeCreatePhysicsFromAssets | NodeCreatePhysicsFromAssets(node: Node) -> None | |
NodeCreatePhysicsFromFile | NodeCreatePhysicsFromFile(node: Node) -> None | |
NodeDestroyPhysics | NodeDestroyPhysics(node: Node) -> None | |
NodeGetAngularFactor | ||
NodeGetAngularVelocity | ||
NodeGetDeactivation | NodeGetDeactivation(node: Node) -> bool | |
NodeGetLinearFactor | ||
NodeGetLinearVelocity | ||
NodeGetPointVelocity | ||
NodeHasBody | NodeHasBody(node: Node) -> bool | |
NodeIsSleeping | NodeIsSleeping(node: Node) -> bool | |
NodeResetWorld | ||
NodeSetAngularFactor | ||
NodeSetAngularVelocity | ||
NodeSetDeactivation | ||
NodeSetLinearFactor | ||
NodeSetLinearVelocity | ||
NodeStartTrackingCollisionEvents | NodeStartTrackingCollisionEvents(node: Node) ->
None | |
NodeStopTrackingCollisionEvents | NodeStopTrackingCollisionEvents(node: Node) -> None | |
NodeTeleport | ||
NodeWake | NodeWake(node: Node) -> None | |
RaycastAllHits | ||
RaycastFirstHit | ||
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) -> NoneStepSimulation(display_dt:
int, step_dt: int) -> NoneStepSimulation(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.
SceneLuaVM Class
Lua VM for scene script components.
See Scripting.
Functions
| Name | Prototype | Documentation |
|---|---|---|
Call | ||
Constructor | Constructor() -> SceneLuaVM | |
CreateNodeScriptsFromAssets | ||
CreateNodeScriptsFromFile | ||
CreateScriptFromAssets | ||
CreateScriptFromFile | ||
CreateScriptFromSource | ||
DestroyScripts | DestroyScripts(scripts: ScriptList) -> None | |
GarbageCollect | GarbageCollect(scene: Scene) -> ScriptList | |
GetScriptCount | GetScriptCount() -> int | |
GetScriptEnv | ||
GetScriptInterface | GetScriptInterface(script: Script) -> StringList | |
GetScriptValue | ||
MakeLuaObject | MakeLuaObject() -> LuaObject | |
SceneCreateScriptsFromAssets | SceneCreateScriptsFromAssets(scene: Scene) -> ScriptList | |
SceneCreateScriptsFromFile | SceneCreateScriptsFromFile(scene: Scene) -> ScriptList | |
SetScriptValue |
ScenePhysics Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
Add6DofConstraint | ||
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 | ||
NodeAddImpulse | ||
NodeAddTorque | ||
NodeAddTorqueImpulse | ||
NodeCreatePhysicsFromAssets | NodeCreatePhysicsFromAssets(node: Node) -> None | |
NodeCreatePhysicsFromFile | NodeCreatePhysicsFromFile(node: Node) -> None | |
NodeDestroyPhysics | NodeDestroyPhysics(node: Node) -> None | |
NodeGetAngularFactor | ||
NodeGetAngularVelocity | ||
NodeGetDeactivation | NodeGetDeactivation(node: Node) -> bool | |
NodeGetLinearFactor | ||
NodeGetLinearVelocity | ||
NodeGetPointVelocity | ||
NodeHasBody | NodeHasBody(node: Node) -> bool | |
NodeIsSleeping | NodeIsSleeping(node: Node) -> bool | |
NodeResetWorld | ||
NodeSetAngularFactor | ||
NodeSetAngularVelocity | ||
NodeSetDeactivation | ||
NodeSetLinearFactor | ||
NodeSetLinearVelocity | ||
NodeStartTrackingCollisionEvents | NodeStartTrackingCollisionEvents(node: Node) ->
None | |
NodeStopTrackingCollisionEvents | NodeStopTrackingCollisionEvents(node: Node) -> None | |
NodeTeleport | ||
NodeWake | NodeWake(node: Node) -> None | |
RaycastAllHits | ||
RaycastFirstHit | ||
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) -> NoneStepSimulation(display_dt:
int, step_dt: int) -> NoneStepSimulation(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
| Name | Prototype | Documentation |
|---|---|---|
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.
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 | GetPath() -> str | |
IsValid | IsValid() -> bool | |
SetPath | SetPath(path: str) -> None | |
operator== | operator==(s: Script) -> bool |
ScriptList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
Connect | Connect(listener: TextInputCallback) -> TextInputCallbackConnection | |
Disconnect | Disconnect(connection: TextInputCallbackConnection) -> None | |
DisconnectAll | DisconnectAll() -> None | |
Emit | Emit(arg0: str) -> None | |
GetListenerCount | GetListenerCount() -> int |
Signal_returning_void_taking_time_ns Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
mtx | Mat4 |
repeat | SourceRepeat |
vel | Vec3 |
volume | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> SpatializedSourceState
Constructor(mtx: Mat4) -> SpatializedSourceState
|
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 | Constructor() -> StereoSourceState
Constructor(volume:
float) -> StereoSourceState |
StringList Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
bitsPerPixel | int |
cubeMap | bool |
depth | int |
format | TextureFormat |
height | int |
numLayers | int |
numMips | int |
storageSize | int |
width | int |
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 | ClearParent() -> None | |
GetParent | GetParent() -> Node | Return the parent node for this Transform. |
GetPos | GetPos() -> Vec3 | Return the transform position.
|
GetPosRot | ||
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.
|
SetPosRot | ||
SetRot | SetRot(R: Vec3) -> None | Set the transform rotation from a vector of Euler angles.
|
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.
|
operator== | operator==(t: Transform) -> bool |
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 | Constructor() -> TransformTRS |
UInt16List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
One | static Vec2 |
Zero | static Vec2 |
x | float |
y | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> Vec2
| |
Set | Set(x: float, y: float) -> None | |
operator* |
operator*(k: float) -> Vec2 | |
operator*= | operator*=(v: Vec2) ->
Noneoperator*=(k: float) -> None | |
operator+ |
operator+(k: float) -> Vec2 | |
operator+= | operator+=(v: Vec2) ->
Noneoperator+=(k: float) -> None | |
operator- |
operator-(k: float) -> Vec2 | |
operator-= | operator-=(v: Vec2) ->
Noneoperator-=(k: float) -> None | |
operator/ |
operator/(k: float) -> Vec2 | |
operator/= | operator/=(v: Vec2) ->
Noneoperator/=(k: float) -> None |
Vec2List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| 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 | Constructor() -> Vec3
| |
Set | Set(x: float, y: float, z: float) -> None | |
operator!= | operator!=(v: Vec3) -> bool | |
operator* |
operator*(k: float) -> Vec3 | |
operator*= | operator*=(v: Vec3) ->
Noneoperator*=(k: float) -> None | |
operator+ |
operator+(k: float) -> Vec3 | |
operator+= | operator+=(v: Vec3) ->
Noneoperator+=(k: float) -> None | |
operator- |
operator-(k: float) -> Vec3 | |
operator-= | operator-=(v: Vec3) ->
Noneoperator-=(k: float) -> None | |
operator/ |
operator/(k: float) -> Vec3 | |
operator/= | operator/=(v: Vec3) ->
Noneoperator/=(k: float) -> None | |
operator== | operator==(v: Vec3) -> bool |
Vec3List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Type |
|---|---|
w | float |
x | float |
y | float |
z | float |
Functions
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> Vec4
| |
Set | Set(x:
float, y: float, z: float) -> NoneSet(x: float, y: float, z: float, w: float) -> None | |
operator* |
operator*(k: float) -> Vec4 | |
operator*= | operator*=(v: Vec4) ->
Noneoperator*=(k: float) -> None | |
operator+ |
operator+(k: float) -> Vec4 | |
operator+= | operator+=(v: Vec4) ->
Noneoperator+=(k: float) -> None | |
operator- |
operator-(k: float) -> Vec4 | |
operator-= | operator-=(v: Vec4) ->
Noneoperator-=(k: float) -> None | |
operator/ |
operator/(k: float) -> Vec4 | |
operator/= | operator/=(v: Vec4) ->
Noneoperator/=(k: float) -> None |
Vec4List Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
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
| 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 | Constructor() -> Vertex |
VertexLayout Class
Memory layout and types of vertex attributes.
Functions
| Name | Prototype | Documentation |
|---|---|---|
Add | ||
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
| Name | Prototype | Documentation |
|---|---|---|
Begin | Begin(vertex_index: int) -> Vertices | |
Clear | Clear() -> None | |
Constructor | ||
End | End() ->
NoneEnd(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 | ||
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 | 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
| Name | Prototype | Documentation |
|---|---|---|
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
| Name | Prototype | Documentation |
|---|---|---|
Constructor | Constructor() -> VRGenericTracker
Constructor(name: str) -> VRGenericTracker | |
IsConnected | IsConnected() -> bool | |
Update | Update() -> None | |
World | World() -> Mat4 |
VRGenericTrackerState Class
Functions
| Name | Prototype | Documentation |
|---|---|---|
IsConnected | IsConnected() -> bool | |
World | World() -> Mat4 |
Window Class
Window object.