API Classes
Bloom
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.
Related functions: ApplyBloom, CreateBloomFromAssets, CreateBloomFromFile and DestroyBloom.
btGeneric6DofConstraint
Related classes: SceneBullet3Physics.
Camera
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.
Related classes: Node and Scene.
Method | Prototype |
---|---|
GetFov | () -> float |
Return the camera field of view. | |
GetIsOrthographic | () -> bool |
Return true if orthographic projection is used, false if perspective projection. | |
GetSize | () -> float |
GetZFar | () -> float |
Return the camera far clipping plane. | |
GetZNear | () -> float |
Return the camera near clipping plane. | |
GetZRange | () -> CameraZRange |
IsValid | () -> bool |
SetFov | (v: float) -> None |
Set the camera field of view. | |
SetIsOrthographic | (v: bool) -> None |
Configure the camera to use orthographic or perspective projection. | |
SetSize | (v: float) -> None |
SetZFar | (v: float) -> None |
Set the camera far clipping plane. | |
SetZNear | (v: float) -> None |
Set the camera near clipping plane. | |
SetZRange | (z: CameraZRange) -> None |
operator== | (c: Camera) -> bool |
CameraZRange
Related classes: Camera.
Member | Type |
---|---|
zfar | float |
znear | float |
Method | Prototype |
---|---|
Constructor | () -> CameraZRange |
Canvas
Holds the canvas properties of a scene, see the canvas
member of class Scene.
Related classes: Scene.
Member | Type |
---|---|
clear_color | bool |
clear_z | bool |
color | Color |
Collision
Collision component, see Physics.
Related classes: Node and Scene.
Method | Prototype |
---|---|
GetCollisionResource | () -> str |
GetHeight | () -> float |
GetLocalTransform | () -> Mat4 |
GetMass | () -> float |
Return the collision shape mass in Kg. | |
GetRadius | () -> float |
GetType | () -> CollisionType |
Return the CollisionType of a Collision component. | |
IsValid | () -> bool |
SetCollisionResource | (path: str) -> None |
SetHeight | (height: float) -> None |
SetLocalTransform | (m: Mat4) -> None |
SetMass | (mass: float) -> None |
Set the collision shape mass in Kg. | |
SetRadius | (radius: float) -> None |
SetSize | (size: Vec3) -> None |
SetType | (type: CollisionType) -> None |
Set the CollisionType of a Collision component. | |
operator== | (c: Collision) -> bool |
Color
Four-component RGBA color object.
Related classes: Canvas, ColorList, Environment, ForwardPipelineFog, ForwardPipelineLight, Light, Picture, Scene, Vertex and Vertices.
Related functions: AlphaScale, ChromaScale, Clamp, ColorFromABGR32, ColorFromRGBA32, ColorFromVector3, ColorFromVector4, ColorI, ColorToABGR32, ColorToGrayscale, ColorToRGBA32, CreateLinearLight, CreatePointLight, CreateSpotLight, FromHLS, ImGuiColorButton, ImGuiColorEdit, ImGuiGetColorU32, ImGuiImageButton, ImGuiImage, ImGuiPushStyleColor, ImGuiTextColored, MakeForwardPipelineLinearLight, MakeForwardPipelinePointLight, MakeForwardPipelineSpotLight, MakeVertex, SetSaturation, SetView2D, SetViewClear, SetViewOrthographic, SetViewPerspective and ToHLS.
Member | 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 |
Method | Prototype |
---|---|
Constructor | () -> Color |
Construct a new color object. The red, green, blue and alpha components are in normalized range [0;1]. | |
Constructor | (color: Color) -> Color |
Construct a new color object. The red, green, blue and alpha components are in normalized range [0;1]. | |
Constructor | (r: float, g: float, b: float) -> Color |
Construct a new color object. The red, green, blue and alpha components are in normalized range [0;1]. | |
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!= | (color: Color) -> bool |
operator* | (color: Color) -> Color |
operator* | (k: float) -> Color |
operator*= | (color: Color) -> None |
operator*= | (k: float) -> None |
operator+ | (color: Color) -> Color |
operator+ | (k: float) -> Color |
operator+= | (color: Color) -> None |
operator+= | (k: float) -> None |
operator- | (color: Color) -> Color |
operator- | (k: float) -> Color |
operator-= | (color: Color) -> None |
operator-= | (k: float) -> None |
operator/ | (color: Color) -> Color |
operator/ | (k: float) -> Color |
operator/= | (color: Color) -> None |
operator/= | (k: float) -> None |
operator== | (color: Color) -> bool |
ColorList
Method | Prototype |
---|---|
at | (idx: int) -> Color |
clear | () -> None |
push_back | (v: Color) -> None |
reserve | (size: int) -> None |
size | () -> int |
Contact
Object containing the world space position, normal and depth of a contact as reported by the collision system.
Related classes: ContactList.
Member | Type |
---|---|
N | Vec3 |
P | Vec3 |
d | float |
ContactList
Related functions: GetNodePairContacts.
Method | Prototype |
---|---|
at | (idx: int) -> Contact |
clear | () -> None |
push_back | (v: Contact) -> None |
reserve | (size: int) -> None |
size | () -> int |
Data
Related functions: LoadDataFromFile, LoadSceneBinaryFromDataAndAssets, LoadSceneBinaryFromDataAndFile, SaveDataToFile and SaveSceneBinaryToData.
Method | Prototype |
---|---|
Constructor | () -> Data |
GetSize | () -> int |
Rewind | () -> None |
DearImguiContext
Context to render immediate GUI.
Related functions: ImGuiBeginFrame, ImGuiEndFrame and ImGuiInitContext.
DirEntry
Related classes: DirEntryList.
Member | Type |
---|---|
name | str |
type | int |
DirEntryList
Related functions: ListDirRecursive and ListDir.
Method | Prototype |
---|---|
at | (idx: int) -> DirEntry |
clear | () -> None |
push_back | (v: DirEntry) -> None |
reserve | (size: int) -> None |
size | () -> int |
draw_sceneCallback
Related functions: OpenXRSubmitSceneToForwardPipeline.
Environment
Environment properties of a scene, see environment
member of the Scene class.
Related classes: Scene.
Member | Type |
---|---|
ambient | Color |
brdf_map | TextureRef |
fog_color | Color |
fog_far | float |
fog_near | float |
File
Interface to a file on the host local filesystem.
Related functions: Close, GetSize, IsEOF, IsValid, OpenTemp, OpenText, OpenWriteText, OpenWrite, Open, ReadFloat, ReadString, ReadUInt16, ReadUInt32, ReadUInt8, Rewind, Seek, Tell, WriteFloat, WriteString, WriteUInt16, WriteUInt32 and WriteUInt8.
FileFilter
Related classes: FileFilterList.
Member | Type |
---|---|
name | str |
pattern | str |
Method | Prototype |
---|---|
Constructor | () -> FileFilter |
FileFilterList
Related functions: OpenFileDialog and SaveFileDialog.
Method | Prototype |
---|---|
at | (idx: int) -> FileFilter |
clear | () -> None |
push_back | (v: FileFilter) -> None |
reserve | (size: int) -> None |
size | () -> int |
Font
Font object for realtime rendering.
Related functions: ComputeTextHeight, ComputeTextRect, DrawText, LoadFontFromAssets and LoadFontFromFile.
ForwardPipeline
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.
Related functions: Cast_Pipeline_To_ForwardPipeline, CreateForwardPipeline, DestroyForwardPipeline, PrepareSceneForwardPipelineCommonRenderData, PrepareSceneForwardPipelineViewDependentRenderData, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
ForwardPipelineAAA
Related functions: CreateForwardPipelineAAAFromAssets, CreateForwardPipelineAAAFromFile, DestroyForwardPipelineAAA, IsValid, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
Method | Prototype |
---|---|
Flip | (view_state: ViewState) -> None |
ForwardPipelineAAAConfig
Related functions: CreateForwardPipelineAAAFromAssets, CreateForwardPipelineAAAFromFile, LoadForwardPipelineAAAConfigFromAssets, LoadForwardPipelineAAAConfigFromFile, SaveForwardPipelineAAAConfigToFile, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
Member | Type |
---|---|
bloom_bias | float |
bloom_intensity | float |
bloom_threshold | float |
exposure | float |
gamma | float |
max_distance | float |
motion_blur | float |
sample_count | int |
temporal_aa_weight | float |
z_thickness | float |
Method | Prototype |
---|---|
Constructor | () -> ForwardPipelineAAAConfig |
ForwardPipelineFog
Fog properties for the forward pipeline.
Related functions: GetSceneForwardPipelineFog.
Member | Type |
---|---|
color | Color |
far | float |
near | float |
Method | Prototype |
---|---|
Constructor | () -> ForwardPipelineFog |
ForwardPipelineLight
Single light for the forward pipeline. The complete lighting rig is passed as a ForwardPipelineLights, see PrepareForwardPipelineLights.
Related classes: ForwardPipelineLightList.
Related functions: MakeForwardPipelineLinearLight, MakeForwardPipelinePointLight and MakeForwardPipelineSpotLight.
Member | Type |
---|---|
diffuse | Color |
inner_angle | float |
outer_angle | float |
priority | float |
pssm_split | Vec4 |
radius | float |
specular | Color |
type | ForwardPipelineLightType |
world | Mat4 |
Method | Prototype |
---|---|
Constructor | () -> ForwardPipelineLight |
ForwardPipelineLightList
Related functions: GetSceneForwardPipelineLights and PrepareForwardPipelineLights.
Method | Prototype |
---|---|
at | (idx: int) -> ForwardPipelineLight |
clear | () -> None |
push_back | (v: ForwardPipelineLight) -> None |
reserve | (size: int) -> None |
size | () -> int |
ForwardPipelineLights
Related functions: PrepareForwardPipelineLights.
FrameBuffer
Related functions: CreateFrameBuffer, DestroyFrameBuffer, GetColorTexture, GetDepthTexture, GetTextures and IsValid.
Member | Type |
---|---|
handle | FrameBufferHandle |
FrameBufferHandle
Related classes: FrameBuffer and OpenVREyeFrameBuffer.
Related functions: ApplyBloom, ComputeSAO, SetViewFrameBuffer, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
Frustum
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.
Related classes: ViewState.
Related functions: MakeFrustum, TestVisibility and TransformFrustum.
Method | Prototype |
---|---|
GetBottom | () -> Vec4 |
GetFar | () -> Vec4 |
GetLeft | () -> Vec4 |
GetNear | () -> Vec4 |
GetRight | () -> Vec4 |
GetTop | () -> Vec4 |
SetBottom | (plane: Vec4) -> None |
SetFar | (plane: Vec4) -> None |
SetLeft | (plane: Vec4) -> None |
SetNear | (plane: Vec4) -> None |
SetRight | (plane: Vec4) -> None |
SetTop | (plane: Vec4) -> None |
Gamepad
Helper class holding the current and previous device state to enable delta state queries.
Use GetGamepadNames to query for available gamepad devices.
Method | Prototype |
---|---|
Axes | (axis: GamepadAxes) -> float |
Return the value of a gamepad axis. | |
Connected | () -> bool |
Gamepad was connected since the last update. | |
Constructor | () -> Gamepad |
Constructor | (name: str) -> Gamepad |
Disconnected | () -> bool |
Gamepad was disconnected since the last update. | |
Down | (btn: GamepadButton) -> bool |
DtAxes | (axis: GamepadAxes) -> float |
IsConnected | () -> bool |
Gamepad is currently connected. | |
Pressed | (btn: GamepadButton) -> bool |
Released | (btn: GamepadButton) -> bool |
Update | () -> None |
GamepadState
Related functions: ReadGamepad.
Method | Prototype |
---|---|
Axes | (idx: GamepadAxes) -> float |
Button | (btn: GamepadButton) -> bool |
IsConnected | () -> bool |
Geometry
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.
Related classes: GeometryBuilder.
Related functions: SaveGeometryToFile.
GeometryBuilder
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.
Method | Prototype |
---|---|
AddPolygon | (idxs: UInt32List, material: int) -> None |
AddQuad | (a: int, b: int, c: int, d: int, material: int) -> None |
AddTriangle | (a: int, b: int, c: int, material: int) -> None |
AddVertex | (vtx: Vertex) -> None |
Clear | () -> None |
Constructor | () -> GeometryBuilder |
Make | () -> Geometry |
IVideoStreamer
Related functions: IsValid, MakeVideoStreamer and UpdateTexture.
Method | Prototype |
---|---|
Close | (h: pointer) -> int |
FreeFrame | (h: pointer, frame: int) -> int |
GetDuration | (h: pointer) -> int |
GetFrame | (h: pointer, ptr: pointer, width: int, height: int, pitch: int, format: VideoFrameFormat) -> int, pointer, int, int, int, VideoFrameFormat |
GetTimeStamp | (h: pointer) -> int |
IsEnded | (h: pointer) -> int |
Open | (name: str) -> pointer |
Pause | (h: pointer) -> int |
Play | (h: pointer) -> int |
Seek | (h: pointer, t: int) -> int |
Shutdown | () -> None |
Startup | () -> int |
ImDrawList
Immediate GUI drawing list. This object can be used to perform custom drawing operations on top of an imgui window.
Related functions: ImGuiGetWindowDrawList.
Method | Prototype |
---|---|
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 | (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 | (centre: Vec2, radius: float, col: int) -> None |
AddCircleFilled | (centre: Vec2, radius: float, col: int, num_segments: int) -> None |
AddConvexPolyFilled | (points: Vec2List, col: int) -> None |
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 | (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 | (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 | (a: Vec2, b: Vec2, col: int) -> None |
AddLine | (a: Vec2, b: Vec2, col: int, thickness: float) -> None |
AddPolyline | (points: Vec2List, col: int, closed: bool, thickness: float) -> None |
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 | (a: Vec2, b: Vec2, c: Vec2, d: Vec2, col: int) -> None |
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 | (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 | (a: Vec2, b: Vec2, col_upr_left: int, col_upr_right: int, col_bot_right: int, col_bot_left: int) -> None |
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 | (a: Vec2, b: Vec2, c: Vec2, col: int) -> None |
AddTriangle | (a: Vec2, b: Vec2, c: Vec2, col: int, thickness: float) -> None |
AddTriangleFilled | (a: Vec2, b: Vec2, c: Vec2, col: int) -> None |
ChannelsMerge | () -> None |
ChannelsSetCurrent | (channel_index: int) -> None |
ChannelsSplit | (channels_count: int) -> None |
GetClipRectMax | () -> Vec2 |
GetClipRectMin | () -> Vec2 |
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 | (centre: Vec2, radius: float, a_min_of_12: int, a_max_of_12: int) -> None |
PathBezierCubicCurveTo | (p1: Vec2, p2: Vec2, p3: Vec2) -> None |
PathBezierCubicCurveTo | (p1: Vec2, p2: Vec2, p3: Vec2, num_segments: int) -> None |
PathClear | () -> None |
PathFillConvex | (col: int) -> None |
PathLineTo | (pos: Vec2) -> None |
PathLineToMergeDuplicate | (pos: Vec2) -> None |
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 | (col: int, closed: bool) -> None |
PathStroke | (col: int, closed: bool, thickness: float) -> None |
PopClipRect | () -> None |
PopTextureID | () -> None |
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 | () -> None |
PushTextureID | (tex: Texture) -> None |
ImFont
Immediate GUI font.
Related classes: ImDrawList.
Related functions: ImGuiGetFont and ImGuiPushFont.
Instance
Component to instantiate a scene as a child of a node upon setup.
Related classes: Node and Scene.
Method | Prototype |
---|---|
ClearOnInstantiateAnim | () -> None |
GetOnInstantiateAnim | () -> str |
GetOnInstantiateAnimLoopMode | () -> AnimLoopMode |
GetOnInstantiatePlayAnimRef | () -> ScenePlayAnimRef |
GetPath | () -> str |
IsValid | () -> bool |
SetOnInstantiateAnim | (anim: str) -> None |
SetOnInstantiateAnimLoopMode | (loop_mode: AnimLoopMode) -> None |
SetPath | (path: str) -> None |
operator== | (i: Instance) -> bool |
IntRect
Related classes: MonitorMode.
Related functions: ApplyBloom, ComputeSAO, Crop, FitsInside, GetHeight, GetMonitorRect, GetSize, GetWidth, GetX, GetY, Grow, Inside, Intersection, Intersects, MakeRectFromWidthHeight, Offset, SetHeight, SetWidth, SetX, SetY, SubmitSceneToForwardPipeline, SubmitSceneToPipeline, ToFloatRect and ToIntRect.
Member | Type |
---|---|
ex | int |
ey | int |
sx | int |
sy | int |
Method | Prototype |
---|---|
Constructor | () -> IntRect |
Constructor | (x: int, y: int) -> IntRect |
Constructor | (sx: int, sy: int, ex: int, ey: int) -> IntRect |
Constructor | (rect: IntRect) -> IntRect |
IsoSurface
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.
Related functions: GaussianBlurIsoSurface, IsoSurfaceSphere, IsoSurfaceToModel and NewIsoSurface.
iVec2
2-dimensional integer vector.
Related classes: Vec3, Vec4 and iVec2List.
Related functions: Dist2, Dist, Dot, GetMonitorSizeMM, GetSize, GetWindowPos, ImGuiDragIntVec2, ImGuiInputIntVec2, ImGuiSliderIntVec2, Inside, Len2, Len, Max, Min, Normalize, OpenVRGetFrameBufferSize, Reverse, SetWindowPos and UpdateTexture.
Member | Type |
---|---|
One | static iVec2 |
Zero | static iVec2 |
x | int |
y | int |
Method | Prototype |
---|---|
Constructor | () -> iVec2 |
Constructor | (x: int, y: int) -> iVec2 |
Constructor | (v: iVec2) -> iVec2 |
Constructor | (v: Vec3) -> iVec2 |
Constructor | (v: Vec4) -> iVec2 |
Set | (x: int, y: int) -> None |
operator* | (v: iVec2) -> iVec2 |
operator* | (k: int) -> iVec2 |
operator*= | (v: iVec2) -> None |
operator*= | (k: int) -> None |
operator+ | (v: iVec2) -> iVec2 |
operator+ | (k: int) -> iVec2 |
operator+= | (v: iVec2) -> None |
operator+= | (k: int) -> None |
operator- | (v: iVec2) -> iVec2 |
operator- | (k: int) -> iVec2 |
operator-= | (v: iVec2) -> None |
operator-= | (k: int) -> None |
operator/ | (v: iVec2) -> iVec2 |
operator/ | (k: int) -> iVec2 |
operator/= | (v: iVec2) -> None |
operator/= | (k: int) -> None |
iVec2List
Method | Prototype |
---|---|
at | (idx: int) -> iVec2 |
clear | () -> None |
push_back | (v: iVec2) -> None |
reserve | (size: int) -> None |
size | () -> int |
intList
Related classes: OpenXRFrameInfo.
Method | Prototype |
---|---|
at | (idx: int) -> int |
clear | () -> None |
push_back | (v: int) -> None |
reserve | (size: int) -> None |
size | () -> int |
JSON
JSON read/write object.
Related functions: GetJsonBool, GetJsonFloat, GetJsonInt, GetJsonString, LoadJsonFromAssets, LoadJsonFromFile, SaveJsonToFile and SetJsonValue.
Joystick
Method | Prototype |
---|---|
Axes | (axis: int) -> float |
AxesCount | () -> int |
ButtonsCount | () -> int |
Connected | () -> bool |
Constructor | () -> Joystick |
Constructor | (name: str) -> Joystick |
Disconnected | () -> bool |
Down | (btn: int) -> bool |
DtAxes | (axis: int) -> float |
GetDeviceName | () -> str |
IsConnected | () -> bool |
Pressed | (btn: int) -> bool |
Released | (btn: int) -> bool |
Update | () -> None |
JoystickState
Related functions: ReadJoystick.
Method | Prototype |
---|---|
Axes | (idx: int) -> float |
Button | (btn: int) -> bool |
IsConnected | () -> bool |
Keyboard
Helper class holding the current and previous device state to enable delta state queries.
Use GetKeyboardNames to query for available keyboard devices.
Related functions: FpsController.
Method | Prototype |
---|---|
Constructor | () -> Keyboard |
Constructor | (name: str) -> Keyboard |
Down | (key: Key) -> bool |
GetOldState | () -> KeyboardState |
GetState | () -> KeyboardState |
Pressed | (key: Key) -> bool |
Released | (key: Key) -> bool |
Update | () -> None |
KeyboardState
Related classes: Keyboard.
Related functions: ImGuiBeginFrame and ReadKeyboard.
Method | Prototype |
---|---|
Key | (key: Key) -> bool |
Light
Add this component to a node to turn it into a light source, see Using the Forward Pipeline.
Related classes: Node and Scene.
Method | Prototype |
---|---|
GetDiffuseColor | () -> Color |
GetDiffuseIntensity | () -> float |
GetInnerAngle | () -> float |
GetOuterAngle | () -> float |
GetPSSMSplit | () -> Vec4 |
GetPriority | () -> float |
GetRadius | () -> float |
Get the light range in meters. | |
GetShadowType | () -> LightShadowType |
GetSpecularColor | () -> Color |
GetSpecularIntensity | () -> float |
GetType | () -> LightType |
Return the LightType. | |
IsValid | () -> bool |
SetDiffuseColor | (v: Color) -> None |
SetDiffuseIntensity | (v: float) -> None |
SetInnerAngle | (v: float) -> None |
SetOuterAngle | (v: float) -> None |
SetPSSMSplit | (v: Vec4) -> None |
SetPriority | (v: float) -> None |
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. | |
SetShadowType | (v: LightShadowType) -> None |
SetSpecularColor | (v: Color) -> None |
SetSpecularIntensity | (v: float) -> None |
SetType | (v: LightType) -> None |
Set the LightType. | |
operator== | (l: Light) -> bool |
LuaObject
Opaque reference to an Lua object. This type is used to transfer values between VMs, see Scripting.
Related classes: LuaObjectList and SceneLuaVM.
LuaObjectList
Related classes: SceneLuaVM.
Method | Prototype |
---|---|
at | (idx: int) -> LuaObject |
clear | () -> None |
push_back | (v: LuaObject) -> None |
reserve | (size: int) -> None |
size | () -> int |
Mat3
A 3x3 matrix used to store rotation.
Related functions: CrossProductMat3, Det, DrawSprites, GetColumn, GetRMatrix, GetRotationMatrix, GetRow, GetScale, GetTranslation, GetX, GetY, GetZ, Inverse, MakeUniformSetValue, Mat3LookAt, Normalize, Orthonormalize, QuaternionFromMatrix3, RotationMat2D, RotationMat3, RotationMatXYZ, RotationMatXY, RotationMatXZY, RotationMatX, RotationMatYXZ, RotationMatYZX, RotationMatY, RotationMatZXY, RotationMatZYX, RotationMatZ, ScaleMat3, SetAxises, SetColumn, SetMaterialValue, SetRow, SetScale, SetTranslation, SetX, SetY, SetZ, ToEuler, ToMatrix3, TransformationMat4, TranslationMat3, Transpose and VectorMat3.
Mat4
A 3x4 matrix used to store complete transformation including rotation, scale and position.
Related classes: Collision, ForwardPipelineLight, Mat4List, Node, OpenVREye, OpenVRState, SceneBullet3Physics, SpatializedSourceState, Transform, VRControllerState, VRController, VRGenericTrackerState, VRGenericTracker and ViewState.
Related functions: ComputeOrthographicViewState, ComputePerspectiveViewState, ComputeSortKeyFromWorld, CreateCamera, CreateInstanceFromAssets, CreateInstanceFromFile, CreateLinearLight, CreateObject, CreateOrthographicCamera, CreatePhysicCube, CreatePhysicSphere, CreatePointLight, CreateSceneRootNode, CreateSpotLight, Decompose, DrawModel, DrawText, GetColumn, GetHandJointPose, GetRMatrix, GetR, GetRotationMatrix, GetRotation, GetRow, GetS, GetScale, GetT, GetTranslation, GetX, GetY, GetZ, InverseFast, Inverse, LerpAsOrthonormalBase, MakeForwardPipelineLinearLight, MakeForwardPipelinePointLight, MakeForwardPipelineSpotLight, MakeFrustum, MakePlane, MakeUniformSetValue, Mat4LookAtUp, Mat4LookAt, Mat4LookTowardUp, Mat4LookToward, OpenVRGetState, OpenXRGetEyeGaze, OpenXRGetHeadPose, OpenXRSubmitSceneToForwardPipeline, Orthonormalize, RotationMat4, ScaleMat4, SetColumn, SetListener, SetMaterialValue, SetRow, SetS, SetScale, SetSourceTransform, SetT, SetTransform, SetTranslation, SetViewOrthographic, SetViewPerspective, SetViewTransform, SetX, SetY, SetZ, TransformFrustum, TransformationMat4 and TranslationMat4.
Mat44
A 4x4 matrix used to store projection matrices.
Related classes: OpenVREye and ViewState.
Related functions: Compute2DProjectionMatrix, ComputeOrthographicProjectionMatrix, ComputePerspectiveProjectionMatrix, ComputeSAO, ExtractZRangeFromOrthographicProjectionMatrix, ExtractZRangeFromPerspectiveProjectionMatrix, ExtractZRangeFromProjectionMatrix, ExtractZoomFactorFromProjectionMatrix, GetColumn, GetRow, Inverse, MakeFrustum, MakeUniformSetValue, ProjectOrthoToClipSpace, ProjectOrthoToScreenSpace, ProjectToClipSpace, ProjectToScreenSpace, ProjectZToClipSpace, SetColumn, SetMaterialValue, SetRow, SetViewTransform, UnprojectFromClipSpace, UnprojectFromScreenSpace, UnprojectOrthoFromClipSpace and UnprojectOrthoFromScreenSpace.
Mat4List
Related functions: DrawModel.
Method | Prototype |
---|---|
at | (idx: int) -> Mat4 |
clear | () -> None |
push_back | (v: Mat4) -> None |
reserve | (size: int) -> None |
size | () -> int |
Material
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.
Related classes: MaterialList and Object.
Related functions: CreateMaterial, CreateMissingMaterialProgramValuesFromAssets, CreateMissingMaterialProgramValuesFromFile, GetMaterialAlphaCut, GetMaterialAmbientUsesUV1, GetMaterialBlendMode, GetMaterialDepthTest, GetMaterialDiffuseUsesUV1, GetMaterialFaceCulling, GetMaterialNormalMapInWorldSpace, GetMaterialSkinning, GetMaterialSpecularUsesUV1, GetMaterialTexture, GetMaterialTextures, GetMaterialValues, GetMaterialWriteRGBA, GetMaterialWriteZ, SetMaterialAlphaCut, SetMaterialAmbientUsesUV1, SetMaterialBlendMode, SetMaterialDepthTest, SetMaterialDiffuseUsesUV1, SetMaterialFaceCulling, SetMaterialNormalMapInWorldSpace, SetMaterialProgram, SetMaterialSkinning, SetMaterialSpecularUsesUV1, SetMaterialTextureRef, SetMaterialTexture, SetMaterialValue, SetMaterialWriteRGBA, SetMaterialWriteZ and UpdateMaterialPipelineProgramVariant.
MaterialList
Related classes: Scene.
Related functions: CreateObject, CreatePhysicCube and CreatePhysicSphere.
Method | Prototype |
---|---|
at | (idx: int) -> Material |
clear | () -> None |
push_back | (v: Material) -> None |
reserve | (size: int) -> None |
size | () -> int |
MaterialRef
Reference to a Material inside a PipelineResources object.
MinMax
3D bounding volume defined by a minimum and maximum position.
Related classes: Node, Object and Scene.
Related functions: ClassifyLine, ClassifySegment, ComputeMinMaxBoundingSphere, Contains, GetArea, GetCenter, IntersectRay, MinMaxFromPositionSize, Overlap, TestVisibility and Union.
Member | Type |
---|---|
mn | Vec3 |
mx | Vec3 |
Method | Prototype |
---|---|
Constructor | () -> MinMax |
Constructor | (min: Vec3, max: Vec3) -> MinMax |
operator!= | (minmax: MinMax) -> bool |
operator== | (minmax: MinMax) -> bool |
Model
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.
Related classes: ModelBuilder and PipelineResources.
Related functions: CreateCapsuleModel, CreateConeModel, CreateCubeModel, CreateCylinderModel, CreatePlaneModel, CreateSphereModel, DrawModel, LoadModelFromAssets and LoadModelFromFile.
ModelBuilder
Use the model builder to programmatically build models at runtime.
The input data is optimized upon submission.
Related functions: IsoSurfaceToModel.
Method | Prototype |
---|---|
AddPolygon | (idxs: UInt32List) -> None |
AddQuad | (a: int, b: int, c: int, d: int) -> None |
AddTriangle | (a: int, b: int, c: int) -> None |
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 | () -> None |
Clear all submitted data up to this point. | |
Constructor | () -> ModelBuilder |
EndList | (material: int) -> None |
End the current primitive list and start a new one. | |
GetCurrentListIndexCount | () -> int |
Return the number of indexes in the current list. See ModelBuilder.EndList. | |
MakeModel | (decl: VertexLayout) -> Model |
Create a model from all data submitted up to this point. |
ModelRef
Reference to a Model inside a PipelineResources object.
See LoadModelFromFile, LoadModelFromAssets and PipelineResources.AddModel.
Related classes: Object, PipelineResources and Scene.
Related functions: CreateObject, CreatePhysicCube and CreatePhysicSphere.
Monitor
Related classes: MonitorList.
Related functions: GetMonitorModes, GetMonitorName, GetMonitorRect, GetMonitorSizeMM, IsMonitorConnected, IsPrimaryMonitor and NewFullscreenWindow.
MonitorList
Related functions: GetMonitors.
Method | Prototype |
---|---|
at | (idx: int) -> Monitor |
clear | () -> None |
push_back | (v: Monitor) -> None |
reserve | (size: int) -> None |
size | () -> int |
MonitorMode
Related classes: MonitorModeList.
Member | Type |
---|---|
frequency | int |
name | str |
rect | IntRect |
rotation | MonitorRotation |
supported_rotations | int |
MonitorModeList
Related functions: GetMonitorModes.
Method | Prototype |
---|---|
at | (idx: int) -> MonitorMode |
clear | () -> None |
push_back | (v: MonitorMode) -> None |
reserve | (size: int) -> None |
size | () -> int |
Mouse
Helper class holding the current and previous device state to enable delta state queries.
Use GetMouseNames to query for available mouse devices.
Related functions: FpsController.
Method | Prototype |
---|---|
Constructor | () -> Mouse |
Constructor | (name: str) -> Mouse |
Down | (button: int) -> bool |
DtX | () -> int |
DtY | () -> int |
GetOldState | () -> MouseState |
GetState | () -> MouseState |
HWheel | () -> int |
Pressed | (button: int) -> bool |
Released | (button: int) -> bool |
Update | () -> None |
Wheel | () -> int |
X | () -> int |
Y | () -> int |
MouseState
Related classes: Mouse.
Related functions: ImGuiBeginFrame and ReadMouse.
Method | Prototype |
---|---|
Button | (btn: MouseButton) -> bool |
HWheel | () -> int |
Wheel | () -> int |
X | () -> int |
Y | () -> int |
Node
The base element of a scene, see Working with Scene.
Related classes: NodeList, Object, RaycastOut, SceneBullet3Physics, SceneLuaVM, SceneView, Scene and Transform.
Related functions: CreateCamera, CreateInstanceFromAssets, CreateInstanceFromFile, CreateLinearLight, CreateObject, CreateOrthographicCamera, CreatePhysicCube, CreatePhysicSphere, CreatePointLight, CreateSceneRootNode, CreateScript, CreateSpotLight, DuplicateNodeAndChildrenFromAssets, DuplicateNodeAndChildrenFromFile, DuplicateNodeFromAssets, DuplicateNodeFromFile, GetNodePairContacts and GetNodesInContact.
Method | Prototype |
---|---|
ComputeCameraViewState | (aspect_ratio: Vec2) -> ViewState |
ComputeWorld | () -> Mat4 |
DestroyInstance | () -> None |
Disable | () -> None |
Enable | () -> None |
GetCamera | () -> Camera |
Return the Camera component of the node. | |
GetCollision | (slot: int) -> Collision |
GetCollisionCount | () -> int |
GetFlags | () -> int |
GetInstance | () -> Instance |
GetInstanceSceneAnim | (path: str) -> SceneAnimRef |
GetInstanceSceneView | () -> SceneView |
GetLight | () -> Light |
Return the Light component of the node. | |
GetMinMax | (resources: PipelineResources) -> bool, MinMax |
GetName | () -> str |
Return the node name. | |
GetObject | () -> Object |
Return Object component of the node. | |
GetRigidBody | () -> RigidBody |
GetScript | (idx: int) -> Script |
GetScriptCount | () -> int |
GetTransform | () -> Transform |
Return the Transform component of the node. | |
GetUid | () -> int |
Return the unique ID. | |
GetWorld | () -> Mat4 |
HasCamera | () -> bool |
HasInstance | () -> bool |
HasLight | () -> bool |
HasObject | () -> bool |
HasRigidBody | () -> bool |
HasTransform | () -> bool |
IsEnabled | () -> bool |
IsInstantiatedBy | () -> Node |
IsItselfEnabled | () -> bool |
IsValid | () -> bool |
Return true if the Node still exist. | |
RemoveCamera | () -> None |
RemoveCollision | (c: Collision) -> None |
RemoveCollision | (slot: int) -> None |
RemoveLight | () -> None |
RemoveObject | () -> None |
RemoveRigidBody | () -> None |
RemoveScript | (s: Script) -> None |
RemoveScript | (slot: int) -> None |
RemoveTransform | () -> None |
SetCamera | (c: Camera) -> None |
Set the Camera component of a node.
See Scene.CreateCamera. | |
SetCollision | (slot: int, c: Collision) -> None |
SetFlags | (flags: int) -> None |
SetInstance | (instance: Instance) -> None |
SetLight | (l: Light) -> None |
Set the Light component of a node. See Scene.CreateLight, Scene.CreatePointLight, Scene.CreateSpotLight or Scene.CreateLinearLight. | |
SetName | (name: str) -> None |
Set the node name. | |
SetObject | (o: Object) -> None |
Set the Object component of a node. See Scene.CreateObject. | |
SetRigidBody | (b: RigidBody) -> None |
Set the RigidBody component of a node. | |
SetScript | (idx: int, s: Script) -> None |
SetTransform | (t: Transform) -> None |
Set the Transform component of a node. | |
SetWorld | (world: Mat4) -> None |
SetupInstanceFromAssets | (resources: PipelineResources, pipeline: PipelineInfo) -> bool |
SetupInstanceFromAssets | (resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> bool |
SetupInstanceFromFile | (resources: PipelineResources, pipeline: PipelineInfo) -> bool |
SetupInstanceFromFile | (resources: PipelineResources, pipeline: PipelineInfo, flags: LoadSaveSceneFlags) -> bool |
StartOnInstantiateAnim | () -> None |
StopOnInstantiateAnim | () -> None |
operator== | (n: Node) -> bool |
Return true if both objects point to the same node instance, false otherwise. |
NodeList
Related classes: SceneView and Scene.
Related functions: DuplicateNodeAndChildrenFromAssets, DuplicateNodeAndChildrenFromFile, DuplicateNodesAndChildrenFromAssets, DuplicateNodesAndChildrenFromFile, DuplicateNodesFromAssets, DuplicateNodesFromFile and GetNodesInContact.
Method | Prototype |
---|---|
at | (idx: int) -> Node |
clear | () -> None |
push_back | (v: Node) -> None |
reserve | (size: int) -> None |
size | () -> int |
NodePairContacts
Related classes: SceneBullet3Physics.
Related functions: GetNodePairContacts, GetNodesInContact and SceneUpdateSystems.
Object
This components draws a Model. It stores the material table used to draw the model.
Related classes: Node and Scene.
Method | Prototype |
---|---|
ClearModelRef | () -> None |
GetBone | (idx: int) -> Node |
GetBoneCount | () -> int |
GetMaterial | (slot_idx: int) -> Material |
Return the object Material at index. | |
GetMaterial | (name: str) -> Material |
Return the object Material at index. | |
GetMaterialCount | () -> int |
Return the number of Material in the object material table. | |
GetMaterialName | (slot_idx: int) -> str |
GetMinMax | (resources: PipelineResources) -> bool, MinMax |
GetModelRef | () -> ModelRef |
Return the ModelRef to display. | |
IsValid | () -> bool |
SetBone | (idx: int, node: Node) -> bool |
SetBoneCount | (count: int) -> None |
SetMaterial | (slot_idx: int, mat: Material) -> None |
Set the object Material at index. | |
SetMaterialCount | (count: int) -> None |
Set the number of Material in the object material table. | |
SetMaterialName | (slot_idx: int, name: str) -> None |
SetModelRef | (r: ModelRef) -> None |
Set the ModelRef to display. | |
operator== | (o: Object) -> bool |
OpenVREye
Matrices for a VR eye, see OpenVRState.
Related classes: OpenVRState.
Member | Type |
---|---|
offset | Mat4 |
projection | Mat44 |
OpenVREyeFrameBuffer
Framebuffer for a VR eye. Render to two such buffer, one for each eye, before submitting them using OpenVRSubmitFrame.
Related functions: OpenVRCreateEyeFrameBuffer, OpenVRDestroyEyeFrameBuffer, OpenVRGetColorTexture, OpenVRGetDepthTexture and OpenVRSubmitFrame.
Method | Prototype |
---|---|
GetHandle | () -> FrameBufferHandle |
OpenVRState
OpenVR state including the body and head transformations, the left and right eye states and the render target dimensions expected by the backend.
Related functions: OpenVRGetState and OpenVRStateToViewState.
Member | Type |
---|---|
body | Mat4 |
head | Mat4 |
height | int |
inv_head | Mat4 |
left | OpenVREye |
right | OpenVREye |
width | int |
OpenXREyeFrameBuffer
Related classes: OpenXREyeFrameBufferList.
Related functions: OpenXRDestroyEyeFrameBuffer, OpenXRGetColorTexture and OpenXRGetDepthTexture.
OpenXREyeFrameBufferList
Related functions: OpenXRCreateEyeFrameBuffer, OpenXRGetColorTextureFromId and OpenXRGetDepthTextureFromId.
Method | Prototype |
---|---|
at | (idx: int) -> OpenXREyeFrameBuffer |
clear | () -> None |
push_back | (v: OpenXREyeFrameBuffer) -> None |
reserve | (size: int) -> None |
size | () -> int |
OpenXRFrameInfo
Related functions: OpenXRFinishSubmitFrameBuffer, OpenXRGetColorTextureFromId, OpenXRGetDepthTextureFromId and OpenXRSubmitSceneToForwardPipeline.
Member | Type |
---|---|
id_fbs | intList |
Picture
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.
Related functions: CaptureTexture, CreateTextureFromPicture, LoadBMP, LoadGIF, LoadJPG, LoadPNG, LoadPSD, LoadPicture, LoadTGA, SaveBMP, SavePNG, SaveTGA and UpdateTextureFromPicture.
Method | Prototype |
---|---|
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 | (data: VoidPointer, width: int, height: int, format: PictureFormat) -> None |
GetData | () -> pointer |
GetFormat | () -> PictureFormat |
GetHeight | () -> int |
Return the picture height. | |
GetPixelRGBA | (x: int, y: int) -> Color |
GetWidth | () -> int |
Return the picture width. | |
SetData | (data: VoidPointer, width: int, height: int, format: PictureFormat) -> None |
SetPixelRGBA | (x: int, y: int, col: Color) -> None |
Pipeline
Rendering pipeline base class.
Related functions: Cast_Pipeline_To_ForwardPipeline.
PipelineInfo
Related classes: Node.
Related functions: CreateInstanceFromAssets, CreateInstanceFromFile, DuplicateNodeAndChildrenFromAssets, DuplicateNodeAndChildrenFromFile, DuplicateNodeFromAssets, DuplicateNodeFromFile, DuplicateNodesAndChildrenFromAssets, DuplicateNodesAndChildrenFromFile, DuplicateNodesFromAssets, DuplicateNodesFromFile, GetForwardPipelineInfo, LoadPipelineProgramFromAssets, LoadPipelineProgramFromFile, LoadPipelineProgramRefFromAssets, LoadPipelineProgramRefFromFile, LoadSceneBinaryFromAssets, LoadSceneBinaryFromDataAndAssets, LoadSceneBinaryFromDataAndFile, LoadSceneBinaryFromFile, LoadSceneFromAssets, LoadSceneFromFile, LoadSceneJsonFromAssets and LoadSceneJsonFromFile.
Member | Type |
---|---|
name | str |
PipelineProgram
Related classes: PipelineResources.
Related functions: LoadPipelineProgramFromAssets and LoadPipelineProgramFromFile.
PipelineProgramRef
Related classes: PipelineResources.
Related functions: CreateMaterial, LoadPipelineProgramRefFromAssets, LoadPipelineProgramRefFromFile and SetMaterialProgram.
PipelineResources
Related classes: Node, Object and Scene.
Related functions: CaptureTexture, CreateInstanceFromAssets, CreateInstanceFromFile, CreateMissingMaterialProgramValuesFromAssets, CreateMissingMaterialProgramValuesFromFile, DuplicateNodeAndChildrenFromAssets, DuplicateNodeAndChildrenFromFile, DuplicateNodeFromAssets, DuplicateNodeFromFile, DuplicateNodesAndChildrenFromAssets, DuplicateNodesAndChildrenFromFile, DuplicateNodesFromAssets, DuplicateNodesFromFile, LoadPipelineProgramFromAssets, LoadPipelineProgramFromFile, LoadPipelineProgramRefFromAssets, LoadPipelineProgramRefFromFile, LoadSceneBinaryFromAssets, LoadSceneBinaryFromDataAndAssets, LoadSceneBinaryFromDataAndFile, LoadSceneBinaryFromFile, LoadSceneFromAssets, LoadSceneFromFile, LoadSceneJsonFromAssets, LoadSceneJsonFromFile, LoadTextureFromAssets, LoadTextureFromFile, PrepareSceneForwardPipelineCommonRenderData, PrepareSceneForwardPipelineViewDependentRenderData, ProcessLoadQueues, ProcessModelLoadQueue, ProcessTextureLoadQueue, SaveSceneBinaryToData, SaveSceneBinaryToFile, SaveSceneJsonToFile, SubmitSceneToForwardPipeline, SubmitSceneToPipeline and UpdateMaterialPipelineProgramVariant.
Method | Prototype |
---|---|
AddModel | (name: str, mdl: Model) -> ModelRef |
AddProgram | (name: str, prg: PipelineProgram) -> PipelineProgramRef |
AddTexture | (name: str, tex: Texture) -> TextureRef |
Constructor | () -> PipelineResources |
DestroyAllModels | () -> None |
DestroyAllPrograms | () -> None |
DestroyAllTextures | () -> None |
DestroyModel | (ref: ModelRef) -> None |
DestroyProgram | (ref: PipelineProgramRef) -> None |
DestroyTexture | (ref: TextureRef) -> None |
GetModel | (ref: ModelRef) -> Model |
GetModelName | (ref: ModelRef) -> str |
GetProgram | (ref: PipelineProgramRef) -> PipelineProgram |
GetProgramName | (ref: PipelineProgramRef) -> str |
GetTexture | (ref: TextureRef) -> Texture |
GetTextureInfo | (ref: TextureRef) -> TextureInfo |
GetTextureName | (ref: TextureRef) -> str |
HasModel | (name: str) -> ModelRef |
HasProgram | (name: str) -> PipelineProgramRef |
HasTexture | (name: str) -> TextureRef |
HasTextureInfo | (ref: TextureRef) -> bool |
UpdateModel | (ref: ModelRef, mdl: Model) -> None |
UpdateProgram | (ref: PipelineProgramRef, prg: PipelineProgram) -> None |
UpdateTexture | (ref: TextureRef, tex: Texture) -> None |
ProfilerFrame
Related functions: CaptureProfilerFrame, EndProfilerFrame and PrintProfilerFrame.
ProgramHandle
Handle to a shader program.
Related classes: SceneBullet3Physics.
Related functions: DestroyProgram, DrawLines, DrawModel, DrawSprites, DrawText, DrawTriangles, ImGuiInitContext, ImGuiInit, LoadProgramFromAssets and LoadProgramFromFile.
Quaternion
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.
Related functions: Dist, Inverse, Len2, Len, Normalize, QuaternionFromAxisAngle, QuaternionFromEuler, QuaternionFromMatrix3, QuaternionLookAt, Slerp, ToEuler and ToMatrix3.
Member | Type |
---|---|
w | float |
x | float |
y | float |
z | float |
Method | Prototype |
---|---|
Constructor | () -> Quaternion |
Constructor | (x: float, y: float, z: float, w: float) -> Quaternion |
Constructor | (q: Quaternion) -> Quaternion |
operator* | (v: float) -> Quaternion |
operator* | (q: Quaternion) -> Quaternion |
operator*= | (v: float) -> None |
operator*= | (q: Quaternion) -> None |
operator+ | (v: float) -> Quaternion |
operator+ | (q: Quaternion) -> Quaternion |
operator+= | (v: float) -> None |
operator+= | (q: Quaternion) -> None |
operator- | (v: float) -> Quaternion |
operator- | (q: Quaternion) -> Quaternion |
operator-= | (v: float) -> None |
operator-= | (q: Quaternion) -> None |
operator/ | (v: float) -> Quaternion |
operator/= | (v: float) -> None |
RaycastOut
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
Related classes: RaycastOutList and SceneBullet3Physics.
Member | Type |
---|---|
N | Vec3 |
P | Vec3 |
node | Node |
t | float |
RaycastOutList
Related classes: SceneBullet3Physics.
Method | Prototype |
---|---|
at | (idx: int) -> RaycastOut |
clear | () -> None |
push_back | (v: RaycastOut) -> None |
reserve | (size: int) -> None |
size | () -> int |
Rect
Related functions: ComputeTextRect, Crop, FitsInside, GetHeight, GetSize, GetWidth, GetX, GetY, Grow, Inside, Intersection, Intersects, MakeRectFromWidthHeight, Offset, SetHeight, SetWidth, SetX, SetY, ToFloatRect and ToIntRect.
Member | Type |
---|---|
ex | float |
ey | float |
sx | float |
sy | float |
Method | Prototype |
---|---|
Constructor | () -> Rect |
Constructor | (x: float, y: float) -> Rect |
Constructor | (sx: float, sy: float, ex: float, ey: float) -> Rect |
Constructor | (rect: Rect) -> Rect |
RenderState
Related classes: SceneBullet3Physics.
Related functions: ComputeRenderState, DrawLines, DrawModel, DrawSprites, DrawText and DrawTriangles.
RigidBody
Rigid body component, see Physics.
Related classes: Node and Scene.
Method | Prototype |
---|---|
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. | |
GetFriction | () -> float |
GetLinearDamping | () -> float |
GetRestitution | () -> float |
GetRollingFriction | () -> float |
GetType | () -> RigidBodyType |
Return the rigid body type. See RigidBody.SetType. | |
IsValid | () -> bool |
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. | |
SetFriction | (friction: float) -> None |
SetLinearDamping | (damping: float) -> None |
SetRestitution | (restitution: float) -> None |
SetRollingFriction | (rolling_friction: float) -> None |
SetType | (type: RigidBodyType) -> None |
Set the rigid body type. | |
operator== | (b: RigidBody) -> bool |
SAO
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.
Related functions: ComputeSAO, CreateSAOFromAssets, CreateSAOFromFile and DestroySAO.
SRanipalEyeState
Related classes: SRanipalState.
Member | Type |
---|---|
eye_openness | float |
gaze_direction_normalized | Vec3 |
gaze_origin_mm | Vec3 |
pupil_diameter_mm | float |
pupil_diameter_valid | bool |
SRanipalState
Related functions: SRanipalGetState.
Member | Type |
---|---|
left_eye | SRanipalEyeState |
right_eye | SRanipalEyeState |
Scene
A scene object representing a world populated with Node, see Working with Scene.
Related classes: SceneBullet3Physics, SceneLuaVM and SceneView.
Related functions: CreateCamera, CreateInstanceFromAssets, CreateInstanceFromFile, CreateLinearLight, CreateObject, CreateOrthographicCamera, CreatePhysicCube, CreatePhysicSphere, CreatePointLight, CreateSceneRootNode, CreateScript, CreateSpotLight, DebugSceneExplorer, DuplicateNodeAndChildrenFromAssets, DuplicateNodeAndChildrenFromFile, DuplicateNodeFromAssets, DuplicateNodeFromFile, DuplicateNodesAndChildrenFromAssets, DuplicateNodesAndChildrenFromFile, DuplicateNodesFromAssets, DuplicateNodesFromFile, GetNodesInContact, GetSceneForwardPipelineFog, GetSceneForwardPipelineLights, LoadSceneBinaryFromAssets, LoadSceneBinaryFromDataAndAssets, LoadSceneBinaryFromDataAndFile, LoadSceneBinaryFromFile, LoadSceneFromAssets, LoadSceneFromFile, LoadSceneJsonFromAssets, LoadSceneJsonFromFile, PrepareSceneForwardPipelineCommonRenderData, PrepareSceneForwardPipelineViewDependentRenderData, SaveSceneBinaryToData, SaveSceneBinaryToFile, SaveSceneJsonToFile, SceneClearSystems, SceneGarbageCollectSystems, SceneSyncToSystemsFromAssets, SceneSyncToSystemsFromFile, SceneUpdateSystems, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
Member | Type |
---|---|
canvas | Canvas |
environment | Environment |
Method | Prototype |
---|---|
Clear | () -> None |
Remove all nodes from the scene. | |
ComputeCurrentCameraViewState | (aspect_ratio: Vec2) -> ViewState |
ComputeWorldMatrices | () -> None |
Constructor | () -> Scene |
CreateCamera | () -> Camera |
CreateCamera | (znear: float, zfar: float) -> Camera |
CreateCamera | (znear: float, zfar: float, fov: float) -> Camera |
CreateCollision | () -> Collision |
CreateInstance | () -> Instance |
CreateLight | () -> Light |
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 | () -> Node |
Create a Node in the scene. | |
CreateNode | (name: str) -> Node |
Create a Node in the scene. | |
CreateObject | () -> Object |
CreateObject | (model: ModelRef, materials: MaterialList) -> Object |
CreateOrthographicCamera | (znear: float, zfar: float) -> Camera |
CreateOrthographicCamera | (znear: float, zfar: float, size: float) -> Camera |
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 | () -> RigidBody |
CreateScript | () -> Script |
CreateScript | (path: str) -> Script |
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, 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 |
CreateTransform | () -> Transform |
CreateTransform | (T: Vec3) -> Transform |
CreateTransform | (T: Vec3, R: Vec3) -> Transform |
CreateTransform | (T: Vec3, R: Vec3, S: Vec3) -> Transform |
DestroyCamera | (camera: Camera) -> None |
DestroyCollision | (collision: Collision) -> None |
DestroyInstance | (Instance: Instance) -> None |
DestroyLight | (light: Light) -> None |
DestroyNode | (node: Node) -> None |
Remove a Node from the scene. | |
DestroyObject | (object: Object) -> None |
DestroyRigidBody | (rigid_body: RigidBody) -> None |
DestroyScript | (script: Script) -> None |
DestroyTransform | (transform: Transform) -> None |
GarbageCollect | () -> int |
Destroy any unreferenced components in the scene. | |
GetAllNodeCount | () -> int |
Return the total number of nodes in the scene including instantiated ones. To exclude those, use Scene.GetNodeCount. | |
GetAllNodes | () -> NodeList |
GetAllNodesWithComponent | (idx: NodeComponentIdx) -> NodeList |
GetCurrentCamera | () -> Node |
Get the current camera. | |
GetKeys | () -> StringList |
GetMinMax | (resources: PipelineResources) -> bool, MinMax |
GetNode | (name: str) -> Node |
Get a node by name. For more complex queries see Scene.GetNodeEx. | |
GetNodeChildren | (node: Node) -> NodeList |
Return all children for a given node. | |
GetNodeCount | () -> int |
Return the number of nodes in the scene excluding instantiated ones. To include those, use Scene.GetAllNodeCount. | |
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 | () -> NodeList |
Return all nodes in scene. | |
GetNodesWithComponent | (idx: NodeComponentIdx) -> NodeList |
GetPlayingAnimNames | () -> StringList |
GetPlayingAnimRefs | () -> ScenePlayAnimRefList |
GetSceneAnim | (name: str) -> SceneAnimRef |
GetSceneAnims | () -> SceneAnimRefList |
GetScript | (slot_idx: int) -> Script |
GetScriptCount | () -> int |
GetValue | (key: str) -> str |
HasKey | (key: str) -> bool |
IsChildOf | (node: Node, parent: Node) -> bool |
IsPlaying | (ref: ScenePlayAnimRef) -> bool |
IsRoot | (node: Node) -> bool |
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 | () -> None |
RemoveKey | (key: str) -> None |
ReserveCameras | (count: int) -> None |
ReserveLights | (count: int) -> None |
Allocates internal storage for the required number of Light components in one go. | |
ReserveNodes | (count: int) -> None |
Allocates internal storage for the required number of nodes in one go. | |
ReserveObjects | (count: int) -> None |
Allocates internal storage for the required number of Object components in one go. | |
ReserveScripts | (count: int) -> None |
ReserveTransforms | (count: int) -> None |
Allocates internal storage for the required number of Transform components in one go. | |
SetCurrentCamera | (camera: Node) -> None |
Set the current camera. | |
SetProbe | (irradiance: TextureRef, radiance: TextureRef, brdf: TextureRef) -> None |
SetScript | (slot_idx: int, script: Script) -> None |
SetValue | (key: str, value: str) -> None |
StopAllAnims | () -> None |
StopAnim | (ref: ScenePlayAnimRef) -> None |
Update | (dt: int) -> None |
Start the Update phase of the scene. | |
UpdatePlayingAnims | (dt: int) -> None |
SceneAnimRef
Reference to a scene animation.
Related classes: Node, SceneAnimRefList and Scene.
SceneAnimRefList
Related classes: Scene.
Method | Prototype |
---|---|
at | (idx: int) -> SceneAnimRef |
clear | () -> None |
push_back | (v: SceneAnimRef) -> None |
reserve | (size: int) -> None |
size | () -> int |
SceneBullet3Physics
Newton physics for scene physics and collision components.
See Physics.
Related functions: SceneClearSystems, SceneGarbageCollectSystems, SceneSyncToSystemsFromAssets, SceneSyncToSystemsFromFile and SceneUpdateSystems.
Method | Prototype |
---|---|
Add6DofConstraint | (nodeA: Node, nodeB: Node, anchorALocal: Mat4, anchorBInLocalSpaceA: Mat4) -> btGeneric6DofConstraint |
Clear | () -> None |
ClearNodes | () -> None |
CollectCollisionEvents | (scene: Scene) -> NodePairContacts |
Constructor | () -> SceneBullet3Physics |
Constructor | (thread_count: int) -> SceneBullet3Physics |
GarbageCollect | (scene: Scene) -> int |
GarbageCollectResources | () -> int |
NodeAddForce | (node: Node, F: Vec3) -> None |
NodeAddForce | (node: Node, F: Vec3, world_pos: Vec3) -> None |
NodeAddImpulse | (node: Node, dt_velocity: Vec3) -> None |
NodeAddImpulse | (node: Node, dt_velocity: Vec3, world_pos: Vec3) -> None |
NodeAddTorque | (node: Node, T: Vec3) -> None |
NodeAddTorqueImpulse | (node: Node, dt_angular_velocity: Vec3) -> None |
NodeCollideWorld | (node: Node, world: Mat4) -> NodePairContacts |
NodeCollideWorld | (node: Node, world: Mat4, max_contact: int) -> NodePairContacts |
NodeCreatePhysicsFromAssets | (node: Node) -> None |
NodeCreatePhysicsFromFile | (node: Node) -> None |
NodeDestroyPhysics | (node: Node) -> None |
NodeGetAngularFactor | (node: Node) -> Vec3 |
NodeGetAngularVelocity | (node: Node) -> Vec3 |
NodeGetDeactivation | (node: Node) -> bool |
NodeGetLinearFactor | (node: Node) -> Vec3 |
NodeGetLinearVelocity | (node: Node) -> Vec3 |
NodeGetPointVelocity | (node: Node, world_pos: Vec3) -> Vec3 |
NodeHasBody | (node: Node) -> bool |
NodeResetWorld | (node: Node, world: Mat4) -> None |
NodeSetAngularFactor | (node: Node, k: Vec3) -> None |
NodeSetAngularVelocity | (node: Node, W: Vec3) -> None |
NodeSetDeactivation | (node: Node, enable: bool) -> None |
NodeSetLinearFactor | (node: Node, k: Vec3) -> None |
NodeSetLinearVelocity | (node: Node, V: Vec3) -> None |
NodeStartTrackingCollisionEvents | (node: Node) -> None |
NodeStartTrackingCollisionEvents | (node: Node, mode: CollisionEventTrackingMode) -> None |
NodeStopTrackingCollisionEvents | (node: Node) -> None |
NodeTeleport | (node: Node, world: Mat4) -> None |
NodeWake | (node: Node) -> None |
RaycastAllHits | (scene: Scene, p0: Vec3, p1: Vec3) -> RaycastOutList |
RaycastFirstHit | (scene: Scene, p0: Vec3, p1: Vec3) -> RaycastOut |
Remove6DofConstraint | (constraint6Dof: btGeneric6DofConstraint) -> None |
RenderCollision | (view_id: int, vtx_layout: VertexLayout, prg: ProgramHandle, render_state: RenderState, depth: int) -> None |
SceneCreatePhysicsFromAssets | (scene: Scene) -> None |
SceneCreatePhysicsFromFile | (scene: Scene) -> None |
SetPreTickCallback | (cbk: SceneBullet3PhysicsPreTickCallback) -> None |
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 | (scene: Scene) -> None |
SyncTransformsToScene | (scene: Scene) -> None |
SceneBullet3PhysicsPreTickCallback
Related classes: SceneBullet3Physics.
SceneClocks
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.
Related functions: SceneUpdateSystems.
SceneForwardPipelinePassViewId
Related functions: GetSceneForwardPipelinePassViewId, PrepareSceneForwardPipelineCommonRenderData, PrepareSceneForwardPipelineViewDependentRenderData, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
SceneForwardPipelineRenderData
Holds all data required to draw a scene with the forward pipeline.
See Using the Forward Pipeline.
Related functions: PrepareSceneForwardPipelineCommonRenderData, PrepareSceneForwardPipelineViewDependentRenderData and SubmitSceneToForwardPipeline.
SceneLuaVM
Lua VM for scene script components.
See Scripting.
Related functions: SceneClearSystems, SceneGarbageCollectSystems, SceneSyncToSystemsFromAssets, SceneSyncToSystemsFromFile and SceneUpdateSystems.
Method | Prototype |
---|---|
Call | (script: Script, function: str, args: LuaObjectList) -> bool, LuaObjectList |
Constructor | () -> SceneLuaVM |
CreateNodeScriptsFromAssets | (scene: Scene, node: Node) -> ScriptList |
CreateNodeScriptsFromFile | (scene: Scene, node: Node) -> ScriptList |
CreateScriptFromAssets | (scene: Scene, script: Script) -> bool |
CreateScriptFromFile | (scene: Scene, script: Script) -> bool |
CreateScriptFromSource | (scene: Scene, script: Script, src: str) -> bool |
DestroyScripts | (scripts: ScriptList) -> None |
GarbageCollect | (scene: Scene) -> ScriptList |
GetScriptCount | () -> int |
GetScriptEnv | (script: Script) -> LuaObject |
GetScriptInterface | (script: Script) -> StringList |
GetScriptValue | (script: Script, name: str) -> LuaObject |
MakeLuaObject | () -> LuaObject |
SceneCreateScriptsFromAssets | (scene: Scene) -> ScriptList |
SceneCreateScriptsFromFile | (scene: Scene) -> ScriptList |
SetScriptValue | (script: Script, name: str, value: LuaObject) -> bool |
SetScriptValue | (script: Script, name: str, value: LuaObject, notify: bool) -> bool |
ScenePlayAnimRef
Reference to a playing scene animation.
Related classes: Instance, ScenePlayAnimRefList and Scene.
ScenePlayAnimRefList
Related classes: Scene.
Method | Prototype |
---|---|
at | (idx: int) -> ScenePlayAnimRef |
clear | () -> None |
push_back | (v: ScenePlayAnimRef) -> None |
reserve | (size: int) -> None |
size | () -> int |
SceneView
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.
Related classes: Node.
Method | Prototype |
---|---|
GetNode | (scene: Scene, name: str) -> Node |
Find a node by name in the view. Pass the host scene as the See Working with Scene. | |
GetNodes | (scene: Scene) -> NodeList |
Return all nodes in the view. Pass the host scene as the See Working with Scene. |
Script
Related classes: Node, SceneLuaVM, Scene and ScriptList.
Method | Prototype |
---|---|
GetPath | () -> str |
IsValid | () -> bool |
SetPath | (path: str) -> None |
operator== | (s: Script) -> bool |
ScriptList
Related classes: SceneLuaVM.
Method | Prototype |
---|---|
at | (idx: int) -> Script |
clear | () -> None |
push_back | (v: Script) -> None |
reserve | (size: int) -> None |
size | () -> int |
SetDrawStatesCallback
Signal_returning_void_taking_const_char_ptr
Method | Prototype |
---|---|
Connect | (listener: TextInputCallback) -> TextInputCallbackConnection |
Disconnect | (connection: TextInputCallbackConnection) -> None |
DisconnectAll | () -> None |
Emit | (arg0: str) -> None |
GetListenerCount | () -> int |
Signal_returning_void_taking_time_ns
Method | Prototype |
---|---|
Connect | (listener: TimeCallback) -> TimeCallbackConnection |
Disconnect | (connection: TimeCallbackConnection) -> None |
DisconnectAll | () -> None |
Emit | (arg0: int) -> None |
GetListenerCount | () -> int |
SpatializedSourceState
State for a spatialized audio source, see Playing Audio.
Related functions: PlaySpatialized, StreamOGGAssetSpatialized, StreamOGGFileSpatialized, StreamWAVAssetSpatialized and StreamWAVFileSpatialized.
Member | Type |
---|---|
mtx | Mat4 |
repeat | SourceRepeat |
vel | Vec3 |
volume | float |
Method | Prototype |
---|---|
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 |
StereoSourceState
State for a stereo audio source, see Playing Audio.
Related functions: PlayStereo, StreamOGGAssetStereo, StreamOGGFileStereo, StreamWAVAssetStereo and StreamWAVFileStereo.
Member | Type |
---|---|
panning | float |
repeat | SourceRepeat |
volume | float |
Method | Prototype |
---|---|
Constructor | () -> StereoSourceState |
Constructor | (volume: float) -> StereoSourceState |
Constructor | (volume: float, repeat: SourceRepeat) -> StereoSourceState |
Constructor | (volume: float, repeat: SourceRepeat, panning: float) -> StereoSourceState |
StringList
Related classes: SceneLuaVM and Scene.
Related functions: GetGamepadNames, GetJoystickDeviceNames, GetJoystickNames, GetKeyboardNames, GetMaterialTextures, GetMaterialValues, GetMouseNames, GetVRControllerNames, GetVRGenericTrackerNames, ImGuiCombo, ImGuiListBox and PathJoin.
Method | Prototype |
---|---|
at | (idx: int) -> str |
clear | () -> None |
push_back | (v: str) -> None |
reserve | (size: int) -> None |
size | () -> int |
TextInputCallback
Related classes: Signal_returning_void_taking_const_char_ptr.
TextInputCallbackConnection
Related classes: Signal_returning_void_taking_const_char_ptr.
Texture
Related classes: ImDrawList and PipelineResources.
Related functions: ApplyBloom, ComputeSAO, CreateFrameBuffer, CreateTextureFromPicture, CreateTexture, DestroyTexture, GetColorTexture, GetDepthTexture, GetTextures, ImGuiImageButton, ImGuiImage, IsValid, LoadTextureFromAssets, LoadTextureFromFile, MakeUniformSetTexture, OpenVRGetColorTexture, OpenVRGetDepthTexture, OpenXRGetColorTextureFromId, OpenXRGetColorTexture, OpenXRGetDepthTextureFromId, OpenXRGetDepthTexture, UpdateTextureFromPicture and UpdateTexture.
TextureInfo
Related classes: PipelineResources.
Related functions: LoadTextureFromAssets and LoadTextureFromFile.
Member | Type |
---|---|
bitsPerPixel | int |
cubeMap | bool |
depth | int |
format | TextureFormat |
height | int |
numLayers | int |
numMips | int |
storageSize | int |
width | int |
TextureRef
Related classes: Environment, PipelineResources and Scene.
Related functions: CaptureTexture, GetMaterialTexture, LoadTextureFromAssets, LoadTextureFromFile, SetMaterialTextureRef and SetMaterialTexture.
TimeCallback
A function taking a time value as parameter with no return value, see Coordinates and Units System.
Related classes: Signal_returning_void_taking_time_ns.
TimeCallbackConnection
A TimeCallback connection to a Signal_returning_void_taking_time_ns.
Related classes: Signal_returning_void_taking_time_ns.
Transform
Transformation component for a Node, see Working with Scene.
Related classes: Node and Scene.
Method | Prototype |
---|---|
ClearParent | () -> None |
GetParent | () -> Node |
Return the parent node for this Transform. | |
GetPos | () -> Vec3 |
Return the transform position.
| |
GetPosRot | () -> Vec3, Vec3 |
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 | () -> Vec3 |
Get the transform scale. | |
GetTRS | () -> TransformTRS |
Return the TransformTRS. | |
GetWorld | () -> Mat4 |
Return the world matrix. | |
IsValid | () -> bool |
SetLocal | (local: Mat4) -> None |
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 | (T: Vec3) -> None |
Set the transform position.
| |
SetPosRot | (pos: Vec3, rot: Vec3) -> None |
SetRot | (R: Vec3) -> None |
Set the transform rotation from a vector of Euler angles.
| |
SetScale | (S: Vec3) -> None |
Set the transform scale. | |
SetTRS | (TRS: TransformTRS) -> None |
Set the TransformTRS. | |
SetWorld | (world: Mat4) -> None |
Set the world matrix.
| |
operator== | (t: Transform) -> bool |
TransformTRS
Translation, rotation and scale packed as a single object.
Related classes: Transform.
Member | Type |
---|---|
pos | Vec3 |
rot | Vec3 |
scl | Vec3 |
Method | Prototype |
---|---|
Constructor | () -> TransformTRS |
UInt16List
Related functions: DrawLines and DrawTriangles.
Method | Prototype |
---|---|
at | (idx: int) -> int |
clear | () -> None |
push_back | (v: int) -> None |
reserve | (size: int) -> None |
size | () -> int |
UInt32List
Related classes: GeometryBuilder and ModelBuilder.
Method | Prototype |
---|---|
at | (idx: int) -> int |
clear | () -> None |
push_back | (v: int) -> None |
reserve | (size: int) -> None |
size | () -> int |
UniformSetTexture
Command object to set a uniform texture at draw time.
Related classes: UniformSetTextureList.
Related functions: MakeUniformSetTexture.
UniformSetTextureList
Related functions: DrawLines, DrawModel, DrawSprites, DrawText and DrawTriangles.
Method | Prototype |
---|---|
at | (idx: int) -> UniformSetTexture |
clear | () -> None |
push_back | (v: UniformSetTexture) -> None |
reserve | (size: int) -> None |
size | () -> int |
UniformSetValue
Command object to set a uniform value at draw time.
Related classes: UniformSetValueList.
Related functions: MakeUniformSetValue.
UniformSetValueList
Related functions: DrawLines, DrawModel, DrawSprites, DrawText and DrawTriangles.
Method | Prototype |
---|---|
at | (idx: int) -> UniformSetValue |
clear | () -> None |
push_back | (v: UniformSetValue) -> None |
reserve | (size: int) -> None |
size | () -> int |
update_controllersCallback
Related functions: OpenXRSubmitSceneToForwardPipeline.
VRController
Helper class holding the current and previous device state to enable delta state queries.
Use GetVRControllerNames to query for available VR controller devices.
Method | Prototype |
---|---|
Connected | () -> bool |
Gamepad was connected since the last update. | |
Constructor | () -> VRController |
Constructor | (name: str) -> VRController |
Disconnected | () -> bool |
Gamepad was disconnected since the last update. | |
Down | (btn: VRControllerButton) -> bool |
DtSurface | (idx: int) -> Vec2 |
IsConnected | () -> bool |
Gamepad is currently connected. | |
Pressed | (btn: VRControllerButton) -> bool |
Released | (btn: VRControllerButton) -> bool |
SendHapticPulse | (duration: int) -> None |
Surface | (idx: int) -> Vec2 |
Touch | (btn: VRControllerButton) -> bool |
TouchEnd | (btn: VRControllerButton) -> bool |
TouchStart | (btn: VRControllerButton) -> bool |
Update | () -> None |
World | () -> Mat4 |
VRControllerState
Related functions: ReadVRController.
Method | Prototype |
---|---|
IsConnected | () -> bool |
Pressed | (btn: VRControllerButton) -> bool |
Surface | (idx: int) -> Vec2 |
Touched | (btn: VRControllerButton) -> bool |
World | () -> Mat4 |
VRGenericTracker
Helper class holding the current and previous device state to enable delta state queries.
Use GetVRGenericTrackerNames to query for available VR generic tracker devices.
Method | Prototype |
---|---|
Constructor | () -> VRGenericTracker |
Constructor | (name: str) -> VRGenericTracker |
IsConnected | () -> bool |
Update | () -> None |
World | () -> Mat4 |
VRGenericTrackerState
Related functions: ReadVRGenericTracker.
Method | Prototype |
---|---|
IsConnected | () -> bool |
World | () -> Mat4 |
Vec2
2-dimensional floating point vector.
Related classes: ImDrawList, Node, Scene, VRControllerState, VRController, Vec2List, Vec3, Vec4, Vertex and Vertices.
Related functions: ClipSpaceToScreenSpace, ComputeAspectRatioX, ComputeAspectRatioY, ComputeOrthographicProjectionMatrix, ComputeOrthographicViewState, ComputePerspectiveProjectionMatrix, ComputePerspectiveViewState, Dist2, Dist, Dot, DrawSprites, ExtractZoomFactorFromProjectionMatrix, GetSize, GetWindowContentScale, ImGuiBeginChild, ImGuiButton, ImGuiCalcTextSize, ImGuiColorButton, ImGuiDragVec2, ImGuiDummy, ImGuiGetContentRegionAvail, ImGuiGetContentRegionMax, ImGuiGetCursorPos, ImGuiGetCursorScreenPos, ImGuiGetCursorStartPos, ImGuiGetFontTexUvWhitePixel, ImGuiGetItemRectMax, ImGuiGetItemRectMin, ImGuiGetItemRectSize, ImGuiGetMouseDragDelta, ImGuiGetMousePosOnOpeningCurrentPopup, ImGuiGetMousePos, ImGuiGetWindowContentRegionMax, ImGuiGetWindowContentRegionMin, ImGuiGetWindowPos, ImGuiGetWindowSize, ImGuiImageButton, ImGuiImage, ImGuiInputVec2, ImGuiInvisibleButton, ImGuiIsMouseHoveringRect, ImGuiIsRectVisible, ImGuiProgressBar, ImGuiPushClipRect, ImGuiPushStyleVar, ImGuiSelectable, ImGuiSetCursorPos, ImGuiSetCursorScreenPos, ImGuiSetNextWindowContentSize, ImGuiSetNextWindowPos, ImGuiSetNextWindowSizeConstraints, ImGuiSetNextWindowSize, ImGuiSetWindowPos, ImGuiSetWindowSize, ImGuiSliderVec2, Inside, Len2, Len, MakeUniformSetValue, MakeVertex, Max, Min, Normalize, ProjectOrthoToScreenSpace, ProjectToScreenSpace, Reverse, RotationMat2D, ScaleMat3, ScreenSpaceToClipSpace, SetMaterialValue, SetTranslation, TranslationMat3, UnprojectFromScreenSpace and UnprojectOrthoFromScreenSpace.
Member | Type |
---|---|
One | static Vec2 |
Zero | static Vec2 |
x | float |
y | float |
Method | Prototype |
---|---|
Constructor | () -> Vec2 |
Constructor | (x: float, y: float) -> Vec2 |
Constructor | (v: Vec2) -> Vec2 |
Constructor | (v: Vec3) -> Vec2 |
Constructor | (v: Vec4) -> Vec2 |
Set | (x: float, y: float) -> None |
operator* | (v: Vec2) -> Vec2 |
operator* | (k: float) -> Vec2 |
operator*= | (v: Vec2) -> None |
operator*= | (k: float) -> None |
operator+ | (v: Vec2) -> Vec2 |
operator+ | (k: float) -> Vec2 |
operator+= | (v: Vec2) -> None |
operator+= | (k: float) -> None |
operator- | (v: Vec2) -> Vec2 |
operator- | (k: float) -> Vec2 |
operator-= | (v: Vec2) -> None |
operator-= | (k: float) -> None |
operator/ | (v: Vec2) -> Vec2 |
operator/ | (k: float) -> Vec2 |
operator/= | (v: Vec2) -> None |
operator/= | (k: float) -> None |
Vec2List
Related classes: ImDrawList.
Method | Prototype |
---|---|
at | (idx: int) -> Vec2 |
Gets the element at the specified index. | |
clear | () -> None |
push_back | (v: Vec2) -> None |
Adds an element to the end. | |
reserve | (size: int) -> None |
size | () -> int |
Returns the number of stored elements. |
Vec3
3-dimensional vector.
Related classes: Collision, Contact, MinMax, RaycastOut, SRanipalEyeState, SceneBullet3Physics, Scene, SpatializedSourceState, TransformTRS, Transform, Vec2, Vec3List, Vec4, Vertex, Vertices and iVec2.
Related functions: Abs, BaseToEuler, Ceil, ClampLen, Clamp, ClassifyLine, ClassifySegment, ClipSpaceToScreenSpace, ColorFromVector3, ComputeMinMaxBoundingSphere, ComputeSortKeyFromWorld, Contains, CreatePhysicCube, CrossProductMat3, Cross, CubicInterpolate, Decompose, Deg3, Dist2, Dist, DistanceToPlane, Dot, DrawText, FaceForward, Floor, FpsController, GetCenter, GetColumn, GetHandJointAngularVelocity, GetHandJointLinearVelocity, GetR, GetRotation, GetRow, GetS, GetScale, GetT, GetTranslation, GetX, GetY, GetZ, ImGuiDragVec3, ImGuiInputVec3, ImGuiSliderVec3, Inside, IntersectRay, Inverse, Len2, Len, Lerp, MakePlane, MakeUniformSetValue, MakeVec3, MakeVertex, Mat3LookAt, Mat4LookAtUp, Mat4LookAt, Mat4LookTowardUp, Mat4LookToward, Max, MinMaxFromPositionSize, Min, Normalize, ProjectOrthoToClipSpace, ProjectOrthoToScreenSpace, ProjectToClipSpace, ProjectToScreenSpace, QuaternionFromAxisAngle, QuaternionFromEuler, QuaternionLookAt, Rad3, RandomVec3, Reflect, Refract, Reverse, RotationMat3, RotationMat4, ScaleMat3, ScaleMat4, ScreenSpaceToClipSpace, SetAxises, SetColumn, SetListener, SetMaterialValue, SetRow, SetS, SetScale, SetSourceTransform, SetT, SetTranslation, SetX, SetY, SetZ, Sign, TestVisibility, ToEuler, TransformationMat4, TranslationMat3, TranslationMat4, Union, UnprojectFromClipSpace, UnprojectFromScreenSpace, UnprojectOrthoFromClipSpace, UnprojectOrthoFromScreenSpace, Vec3I and VectorMat3.
Member | 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 |
Method | Prototype |
---|---|
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 | (x: float, y: float, z: float) -> None |
operator!= | (v: Vec3) -> bool |
operator* | (v: Vec3) -> Vec3 |
operator* | (k: float) -> Vec3 |
operator*= | (v: Vec3) -> None |
operator*= | (k: float) -> None |
operator+ | (v: Vec3) -> Vec3 |
operator+ | (k: float) -> Vec3 |
operator+= | (v: Vec3) -> None |
operator+= | (k: float) -> None |
operator- | (v: Vec3) -> Vec3 |
operator- | (k: float) -> Vec3 |
operator-= | (v: Vec3) -> None |
operator-= | (k: float) -> None |
operator/ | (v: Vec3) -> Vec3 |
operator/ | (k: float) -> Vec3 |
operator/= | (v: Vec3) -> None |
operator/= | (k: float) -> None |
operator== | (v: Vec3) -> bool |
Vec3List
Related functions: DrawSprites.
Method | Prototype |
---|---|
at | (idx: int) -> Vec3 |
clear | () -> None |
push_back | (v: Vec3) -> None |
reserve | (size: int) -> None |
size | () -> int |
Vec4
4-dimensional vector.
Related classes: ForwardPipelineLight, Frustum, ImDrawList, Light, Scene, Vec2, Vec3, Vec4List and iVec2.
Related functions: Abs, ColorFromVector4, CreateLinearLight, CreateMaterial, DistanceToPlane, GetColumn, GetRow, ImGuiDragVec4, ImGuiInputVec4, ImGuiSliderVec4, Inside, Lerp, MakeForwardPipelineLinearLight, MakePlane, MakeUniformSetValue, MakeVec3, Normalize, RandomVec4, SetColumn, SetMaterialValue, SetRow and Vec4I.
Member | Type |
---|---|
w | float |
x | float |
y | float |
z | float |
Method | Prototype |
---|---|
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 | (x: float, y: float, z: float) -> None |
Set | (x: float, y: float, z: float, w: float) -> None |
operator* | (v: Vec4) -> Vec4 |
operator* | (k: float) -> Vec4 |
operator*= | (v: Vec4) -> None |
operator*= | (k: float) -> None |
operator+ | (v: Vec4) -> Vec4 |
operator+ | (k: float) -> Vec4 |
operator+= | (v: Vec4) -> None |
operator+= | (k: float) -> None |
operator- | (v: Vec4) -> Vec4 |
operator- | (k: float) -> Vec4 |
operator-= | (v: Vec4) -> None |
operator-= | (k: float) -> None |
operator/ | (v: Vec4) -> Vec4 |
operator/ | (k: float) -> Vec4 |
operator/= | (v: Vec4) -> None |
operator/= | (k: float) -> None |
Vec4List
Method | Prototype |
---|---|
at | (idx: int) -> Vec4 |
clear | () -> None |
push_back | (v: Vec4) -> None |
reserve | (size: int) -> None |
size | () -> int |
Vertex
Related classes: GeometryBuilder and ModelBuilder.
Related functions: MakeVertex.
Member | 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 |
Method | Prototype |
---|---|
Constructor | () -> Vertex |
VertexLayout
Memory layout and types of vertex attributes.
Related classes: ModelBuilder, SceneBullet3Physics and Vertices.
Related functions: CreateCapsuleModel, CreateConeModel, CreateCubeModel, CreateCylinderModel, CreatePlaneModel, CreateSphereModel, DrawSprites, VertexLayoutPosFloatColorFloat, VertexLayoutPosFloatColorUInt8, VertexLayoutPosFloatNormFloat, VertexLayoutPosFloatNormUInt8TexCoord0UInt8, VertexLayoutPosFloatNormUInt8 and VertexLayoutPosFloatTexCoord0UInt8.
Method | Prototype |
---|---|
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 | () -> VertexLayout |
Constructor | () -> VertexLayout |
End | () -> None |
GetOffset | (attrib: Attrib) -> int |
GetSize | (count: int) -> int |
GetStride | () -> int |
Has | (attrib: Attrib) -> bool |
Skip | (size: int) -> VertexLayout |
Vertices
Helper class to generate vertex buffers for drawing primitives.
Related functions: DrawLines and DrawTriangles.
Method | Prototype |
---|---|
Begin | (vertex_index: int) -> Vertices |
Clear | () -> None |
Constructor | (decl: VertexLayout, count: int) -> Vertices |
End | () -> None |
End | (validate: bool) -> None |
GetCapacity | () -> int |
GetCount | () -> int |
GetData | () -> VoidPointer |
GetDecl | () -> VertexLayout |
GetSize | () -> int |
Reserve | (count: int) -> None |
Resize | (count: int) -> None |
SetBinormal | (binormal: Vec3) -> Vertices |
SetColor0 | (color: Color) -> Vertices |
SetColor1 | (color: Color) -> Vertices |
SetColor2 | (color: Color) -> Vertices |
SetColor3 | (color: Color) -> Vertices |
SetNormal | (normal: Vec3) -> Vertices |
SetPos | (pos: Vec3) -> Vertices |
SetTangent | (tangent: Vec3) -> Vertices |
SetTexCoord0 | (uv: Vec2) -> Vertices |
SetTexCoord1 | (uv: Vec2) -> Vertices |
SetTexCoord2 | (uv: Vec2) -> Vertices |
SetTexCoord3 | (uv: Vec2) -> Vertices |
SetTexCoord4 | (uv: Vec2) -> Vertices |
SetTexCoord5 | (uv: Vec2) -> Vertices |
SetTexCoord6 | (uv: Vec2) -> Vertices |
SetTexCoord7 | (uv: Vec2) -> Vertices |
ViewState
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.
Related classes: ForwardPipelineAAA, Node and Scene.
Related functions: ComputeOrthographicViewState, ComputePerspectiveViewState, OpenVRStateToViewState, PrepareSceneForwardPipelineViewDependentRenderData, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
Member | Type |
---|---|
frustum | Frustum |
proj | Mat44 |
view | Mat4 |
VoidPointer
Related classes: Picture and Vertices.
Related functions: GetWindowHandle, NewWindowFrom and int_to_VoidPointer.
Window
Window object.
Related functions: DestroyWindow, GetWindowClientSize, GetWindowContentScale, GetWindowHandle, GetWindowInFocus, GetWindowPos, GetWindowTitle, IsWindowOpen, NewFullscreenWindow, NewWindowFrom, NewWindow, RenderInit, RenderResetToWindow, SetWindowClientSize, SetWindowPos, SetWindowTitle, UpdateWindow and WindowHasFocus.