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.
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 | number () |
Return the camera field of view. | |
GetIsOrthographic | boolean () |
Return true if orthographic projection is used, false if perspective projection. | |
GetSize | number () |
GetZFar | number () |
Return the camera far clipping plane. | |
GetZNear | number () |
Return the camera near clipping plane. | |
GetZRange | CameraZRange () |
IsValid | boolean () |
SetFov | nil (number v) |
Set the camera field of view. | |
SetIsOrthographic | nil (boolean v) |
Configure the camera to use orthographic or perspective projection. | |
SetSize | nil (number v) |
SetZFar | nil (number v) |
Set the camera far clipping plane. | |
SetZNear | nil (number v) |
Set the camera near clipping plane. | |
SetZRange | nil (CameraZRange z) |
operator== | boolean (Camera c) |
CameraZRange
Related classes: Camera.
Member | Type |
---|---|
zfar | number |
znear | number |
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 | boolean |
clear_z | boolean |
color | Color |
Collision
Collision component, see Physics.
Related classes: Node and Scene.
Method | Prototype |
---|---|
GetCollisionResource | string () |
GetHeight | number () |
GetLocalTransform | Mat4 () |
GetMass | number () |
Return the collision shape mass in Kg. | |
GetRadius | number () |
GetType | CollisionType () |
Return the CollisionType of a Collision component. | |
IsValid | boolean () |
SetCollisionResource | nil (string path) |
SetHeight | nil (number height) |
SetLocalTransform | nil (Mat4 m) |
SetMass | nil (number mass) |
Set the collision shape mass in Kg. | |
SetRadius | nil (number radius) |
SetSize | nil (Vec3 size) |
SetType | nil (CollisionType type) |
Set the CollisionType of a Collision component. | |
operator== | boolean (Collision c) |
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, SubmitModelToForwardPipeline 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 | number |
b | number |
g | number |
r | number |
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 | Color (number r, number g, number b) |
Construct a new color object. The red, green, blue and alpha components are in normalized range [0;1]. | |
Constructor | Color (number r, number g, number b, number a) |
Construct a new color object. The red, green, blue and alpha components are in normalized range [0;1]. | |
operator!= | boolean (Color color) |
operator* | Color (Color color) |
operator* | Color (number k) |
operator*= | nil (Color color) |
operator*= | nil (number k) |
operator+ | Color (Color color) |
operator+ | Color (number k) |
operator+= | nil (Color color) |
operator+= | nil (number k) |
operator- | Color (Color color) |
operator- | Color (number k) |
operator-= | nil (Color color) |
operator-= | nil (number k) |
operator/ | Color (Color color) |
operator/ | Color (number k) |
operator/= | nil (Color color) |
operator/= | nil (number k) |
operator== | boolean (Color color) |
ColorList
Method | Prototype |
---|---|
at | Color (int idx) |
clear | nil () |
push_back | nil (Color v) |
reserve | nil (int size) |
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 | number |
ContactList
Related functions: GetNodePairContacts.
Method | Prototype |
---|---|
at | Contact (int idx) |
clear | nil () |
push_back | nil (Contact v) |
reserve | nil (int size) |
size | int () |
Data
Related functions: LoadDataFromFile, LoadSceneBinaryFromDataAndAssets, LoadSceneBinaryFromDataAndFile, SaveDataToFile and SaveSceneBinaryToData.
Method | Prototype |
---|---|
Constructor | Data () |
GetSize | int () |
Rewind | nil () |
DearImguiContext
Context to render immediate GUI.
Related functions: ImGuiBeginFrame, ImGuiEndFrame and ImGuiInitContext.
DirEntry
Related classes: DirEntryList.
Member | Type |
---|---|
name | string |
type | int |
DirEntryList
Related functions: ListDirRecursive and ListDir.
Method | Prototype |
---|---|
at | DirEntry (int idx) |
clear | nil () |
push_back | nil (DirEntry v) |
reserve | nil (int size) |
size | int () |
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 | number |
fog_near | number |
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 | string |
pattern | string |
FileFilterList
Related functions: OpenFileDialog and SaveFileDialog.
Method | Prototype |
---|---|
at | FileFilter (int idx) |
clear | nil () |
push_back | nil (FileFilter v) |
reserve | nil (int size) |
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, SubmitModelToForwardPipeline, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
ForwardPipelineAAA
Related functions: CreateForwardPipelineAAAFromAssets, CreateForwardPipelineAAAFromFile, DestroyForwardPipelineAAA, IsValid, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
Method | Prototype |
---|---|
Flip | nil (ViewState view_state) |
ForwardPipelineAAAConfig
Related functions: CreateForwardPipelineAAAFromAssets, CreateForwardPipelineAAAFromFile, LoadForwardPipelineAAAConfigFromAssets, LoadForwardPipelineAAAConfigFromFile, SaveForwardPipelineAAAConfigToFile, SubmitSceneToForwardPipeline and SubmitSceneToPipeline.
Member | Type |
---|---|
bloom_bias | number |
bloom_intensity | number |
bloom_threshold | number |
exposure | number |
gamma | number |
max_distance | number |
motion_blur | number |
sample_count | int |
temporal_aa_weight | number |
z_thickness | number |
Method | Prototype |
---|---|
Constructor | ForwardPipelineAAAConfig () |
ForwardPipelineFog
Fog properties for the forward pipeline.
Related functions: GetSceneForwardPipelineFog and SubmitModelToForwardPipeline.
Member | Type |
---|---|
color | Color |
far | number |
near | number |
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 | number |
outer_angle | number |
priority | number |
pssm_split | Vec4 |
radius | number |
specular | Color |
type | ForwardPipelineLightType |
world | Mat4 |
Method | Prototype |
---|---|
Constructor | ForwardPipelineLight () |
ForwardPipelineLightList
Related functions: GetSceneForwardPipelineLights and PrepareForwardPipelineLights.
Method | Prototype |
---|---|
at | ForwardPipelineLight (int idx) |
clear | nil () |
push_back | nil (ForwardPipelineLight v) |
reserve | nil (int size) |
size | int () |
ForwardPipelineLights
Related functions: PrepareForwardPipelineLights and SubmitModelToForwardPipeline.
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 | nil (Vec4 plane) |
SetFar | nil (Vec4 plane) |
SetLeft | nil (Vec4 plane) |
SetNear | nil (Vec4 plane) |
SetRight | nil (Vec4 plane) |
SetTop | nil (Vec4 plane) |
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 | number (GamepadAxes axis) |
Return the value of a gamepad axis. | |
Connected | boolean () |
Gamepad was connected since the last update. | |
Constructor | Gamepad () |
Constructor | Gamepad (string name) |
Disconnected | boolean () |
Gamepad was disconnected since the last update. | |
Down | boolean (GamepadButton btn) |
DtAxes | number (GamepadAxes axis) |
IsConnected | boolean () |
Gamepad is currently connected. | |
Pressed | boolean (GamepadButton btn) |
Released | boolean (GamepadButton btn) |
Update | nil () |
GamepadState
Related functions: ReadGamepad.
Method | Prototype |
---|---|
Axes | number (GamepadAxes idx) |
Button | boolean (GamepadButton btn) |
IsConnected | boolean () |
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 | nil (UInt32List idxs, int material) |
AddQuad | nil (int a, int b, int c, int d, int material) |
AddTriangle | nil (int a, int b, int c, int material) |
AddVertex | nil (Vertex vtx) |
Clear | nil () |
Constructor | GeometryBuilder () |
Make | Geometry () |
IVideoStreamer
Related functions: IsValid, MakeVideoStreamer and UpdateTexture.
Method | Prototype |
---|---|
Close | int (pointer h) |
FreeFrame | int (pointer h, int frame) |
GetDuration | int (pointer h) |
GetFrame | int, pointer, int, int, int, VideoFrameFormat (pointer h, pointer ptr, int width, int height, int pitch, VideoFrameFormat format) |
GetTimeStamp | int (pointer h) |
IsEnded | int (pointer h) |
Open | pointer (string name) |
Pause | int (pointer h) |
Play | int (pointer h) |
Seek | int (pointer h, int t) |
Shutdown | nil () |
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 | nil (Vec2 pos0, Vec2 cp0, Vec2 cp1, Vec2 pos1, int col, number thickness) |
AddBezierCubic | nil (Vec2 pos0, Vec2 cp0, Vec2 cp1, Vec2 pos1, int col, number thickness, int num_segments) |
AddCircle | nil (Vec2 centre, number radius, int col) |
AddCircle | nil (Vec2 centre, number radius, int col, int num_segments) |
AddCircle | nil (Vec2 centre, number radius, int col, int num_segments, number thickness) |
AddCircleFilled | nil (Vec2 centre, number radius, int col) |
AddCircleFilled | nil (Vec2 centre, number radius, int col, int num_segments) |
AddConvexPolyFilled | nil (Vec2List points, int col) |
AddImage | nil (Texture tex, Vec2 a, Vec2 b) |
AddImage | nil (Texture tex, Vec2 a, Vec2 b, Vec2 uv_a, Vec2 uv_b) |
AddImage | nil (Texture tex, Vec2 a, Vec2 b, Vec2 uv_a, Vec2 uv_b, int col) |
AddImageQuad | nil (Texture tex, Vec2 a, Vec2 b, Vec2 c, Vec2 d) |
AddImageQuad | nil (Texture tex, Vec2 a, Vec2 b, Vec2 c, Vec2 d, Vec2 uv_a, Vec2 uv_b, Vec2 uv_c, Vec2 uv_d) |
AddImageQuad | nil (Texture tex, Vec2 a, Vec2 b, Vec2 c, Vec2 d, Vec2 uv_a, Vec2 uv_b, Vec2 uv_c, Vec2 uv_d, int col) |
AddImageRounded | nil (Texture tex, Vec2 a, Vec2 b, Vec2 uv_a, Vec2 uv_b, int col, number rounding) |
AddImageRounded | nil (Texture tex, Vec2 a, Vec2 b, Vec2 uv_a, Vec2 uv_b, int col, number rounding, ImDrawFlags flags) |
AddLine | nil (Vec2 a, Vec2 b, int col) |
AddLine | nil (Vec2 a, Vec2 b, int col, number thickness) |
AddPolyline | nil (Vec2List points, int col, boolean closed, number thickness) |
AddQuad | nil (Vec2 a, Vec2 b, Vec2 c, Vec2 d, int col) |
AddQuad | nil (Vec2 a, Vec2 b, Vec2 c, Vec2 d, int col, number thickness) |
AddQuadFilled | nil (Vec2 a, Vec2 b, Vec2 c, Vec2 d, int col) |
AddRect | nil (Vec2 a, Vec2 b, int col) |
AddRect | nil (Vec2 a, Vec2 b, int col, number rounding) |
AddRect | nil (Vec2 a, Vec2 b, int col, number rounding, int rounding_corner_flags) |
AddRect | nil (Vec2 a, Vec2 b, int col, number rounding, int rounding_corner_flags, number thickness) |
AddRectFilled | nil (Vec2 a, Vec2 b, int col) |
AddRectFilled | nil (Vec2 a, Vec2 b, int col, number rounding) |
AddRectFilled | nil (Vec2 a, Vec2 b, int col, number rounding, int rounding_corner_flags) |
AddRectFilledMultiColor | nil (Vec2 a, Vec2 b, int col_upr_left, int col_upr_right, int col_bot_right, int col_bot_left) |
AddText | nil (Vec2 pos, int col, string text) |
AddText | nil (ImFont font, number font_size, Vec2 pos, int col, string text) |
AddText | nil (ImFont font, number font_size, Vec2 pos, int col, string text, number wrap_width) |
AddText | nil (ImFont font, number font_size, Vec2 pos, int col, string text, number wrap_width, Vec4 cpu_fine_clip_rect) |
AddTriangle | nil (Vec2 a, Vec2 b, Vec2 c, int col) |
AddTriangle | nil (Vec2 a, Vec2 b, Vec2 c, int col, number thickness) |
AddTriangleFilled | nil (Vec2 a, Vec2 b, Vec2 c, int col) |
ChannelsMerge | nil () |
ChannelsSetCurrent | nil (int channel_index) |
ChannelsSplit | nil (int channels_count) |
GetClipRectMax | Vec2 () |
GetClipRectMin | Vec2 () |
PathArcTo | nil (Vec2 centre, number radius, number a_min, number a_max) |
PathArcTo | nil (Vec2 centre, number radius, number a_min, number a_max, int num_segments) |
PathArcToFast | nil (Vec2 centre, number radius, int a_min_of_12, int a_max_of_12) |
PathBezierCubicCurveTo | nil (Vec2 p1, Vec2 p2, Vec2 p3) |
PathBezierCubicCurveTo | nil (Vec2 p1, Vec2 p2, Vec2 p3, int num_segments) |
PathClear | nil () |
PathFillConvex | nil (int col) |
PathLineTo | nil (Vec2 pos) |
PathLineToMergeDuplicate | nil (Vec2 pos) |
PathRect | nil (Vec2 rect_min, Vec2 rect_max) |
PathRect | nil (Vec2 rect_min, Vec2 rect_max, number rounding) |
PathRect | nil (Vec2 rect_min, Vec2 rect_max, number rounding, ImDrawFlags flags) |
PathStroke | nil (int col, boolean closed) |
PathStroke | nil (int col, boolean closed, number thickness) |
PopClipRect | nil () |
PopTextureID | nil () |
PushClipRect | nil (Vec2 clip_rect_min, Vec2 clip_rect_max) |
PushClipRect | nil (Vec2 clip_rect_min, Vec2 clip_rect_max, boolean intersect_with_curent_clip_rect) |
PushClipRectFullScreen | nil () |
PushTextureID | nil (Texture tex) |
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 | nil () |
GetOnInstantiateAnim | string () |
GetOnInstantiateAnimLoopMode | AnimLoopMode () |
GetOnInstantiatePlayAnimRef | ScenePlayAnimRef () |
GetPath | string () |
IsValid | boolean () |
SetOnInstantiateAnim | nil (string anim) |
SetOnInstantiateAnimLoopMode | nil (AnimLoopMode loop_mode) |
SetPath | nil (string path) |
operator== | boolean (Instance i) |
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 | IntRect (int x, int y) |
Constructor | IntRect (int sx, int sy, int ex, int ey) |
Constructor | IntRect (IntRect rect) |
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 | iVec2 (int x, int y) |
Constructor | iVec2 (iVec2 v) |
Constructor | iVec2 (Vec3 v) |
Constructor | iVec2 (Vec4 v) |
Set | nil (int x, int y) |
operator* | iVec2 (iVec2 v) |
operator* | iVec2 (int k) |
operator* | iVec2 (Mat3 m) |
operator*= | nil (iVec2 v) |
operator*= | nil (int k) |
operator+ | iVec2 (iVec2 v) |
operator+ | iVec2 (int k) |
operator+= | nil (iVec2 v) |
operator+= | nil (int k) |
operator- | iVec2 (iVec2 v) |
operator- | iVec2 (int k) |
operator-= | nil (iVec2 v) |
operator-= | nil (int k) |
operator/ | iVec2 (iVec2 v) |
operator/ | iVec2 (int k) |
operator/= | nil (iVec2 v) |
operator/= | nil (int k) |
iVec2List
Method | Prototype |
---|---|
at | iVec2 (int idx) |
clear | nil () |
push_back | nil (iVec2 v) |
reserve | nil (int size) |
size | int () |
JSON
JSON read/write object.
Related functions: GetJsonBool, GetJsonFloat, GetJsonInt, GetJsonString, LoadJsonFromAssets, LoadJsonFromFile, SaveJsonToFile and SetJsonValue.
Joystick
Method | Prototype |
---|---|
Axes | number (int axis) |
AxesCount | int () |
ButtonsCount | int () |
Connected | boolean () |
Constructor | Joystick () |
Constructor | Joystick (string name) |
Disconnected | boolean () |
Down | boolean (int btn) |
DtAxes | number (int axis) |
GetDeviceName | string () |
IsConnected | boolean () |
Pressed | boolean (int btn) |
Released | boolean (int btn) |
Update | nil () |
JoystickState
Related functions: ReadJoystick.
Method | Prototype |
---|---|
Axes | number (int idx) |
Button | boolean (int btn) |
IsConnected | boolean () |
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 | Keyboard (string name) |
Down | boolean (Key key) |
GetOldState | KeyboardState () |
GetState | KeyboardState () |
Pressed | boolean (Key key) |
Released | boolean (Key key) |
Update | nil () |
KeyboardState
Related classes: Keyboard.
Related functions: ImGuiBeginFrame and ReadKeyboard.
Method | Prototype |
---|---|
Key | boolean (Key key) |
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 | number () |
GetInnerAngle | number () |
GetOuterAngle | number () |
GetPSSMSplit | Vec4 () |
GetPriority | number () |
GetRadius | number () |
Get the light range in meters. | |
GetShadowType | LightShadowType () |
GetSpecularColor | Color () |
GetSpecularIntensity | number () |
GetType | LightType () |
Return the LightType. | |
IsValid | boolean () |
SetDiffuseColor | nil (Color v) |
SetDiffuseIntensity | nil (number v) |
SetInnerAngle | nil (number v) |
SetOuterAngle | nil (number v) |
SetPSSMSplit | nil (Vec4 v) |
SetPriority | nil (number v) |
SetRadius | nil (number v) |
Set the light range in meters. No light will be contributed to elements further away than this distance from the node world position. | |
SetShadowType | nil (LightShadowType v) |
SetSpecularColor | nil (Color v) |
SetSpecularIntensity | nil (number v) |
SetType | nil (LightType v) |
Set the LightType. | |
operator== | boolean (Light l) |
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 | LuaObject (int idx) |
clear | nil () |
push_back | nil (LuaObject v) |
reserve | nil (int size) |
size | int () |
Mat3
A 3x3 matrix used to store rotation.
Related classes: Vec2 and iVec2.
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, MinMax, 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, 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, Orthonormalize, RotationMat4, ScaleMat4, SetColumn, SetListener, SetMaterialValue, SetRow, SetS, SetScale, SetSourceTransform, SetT, SetTransform, SetTranslation, SetViewOrthographic, SetViewPerspective, SetViewTransform, SetX, SetY, SetZ, SubmitModelToForwardPipeline, 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 | Mat4 (int idx) |
clear | nil () |
push_back | nil (Mat4 v) |
reserve | nil (int size) |
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 | Material (int idx) |
clear | nil () |
push_back | nil (Material v) |
reserve | nil (int size) |
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 | MinMax (Vec3 min, Vec3 max) |
operator!= | boolean (MinMax minmax) |
operator* | MinMax (Mat4 m) |
operator== | boolean (MinMax minmax) |
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, LoadModelFromFile and SubmitModelToForwardPipeline.
ModelBuilder
Use the model builder to programmatically build models at runtime.
The input data is optimized upon submission.
Related functions: IsoSurfaceToModel.
Method | Prototype |
---|---|
AddPolygon | nil (UInt32List idxs) |
AddQuad | nil (int a, int b, int c, int d) |
AddTriangle | nil (int a, int b, int c) |
AddVertex | int (Vertex vtx) |
Add a vertex to the builder database. Use the returned optimized index to submit primitives using methods such as ModelBuilder.AddTriangle. | |
Clear | nil () |
Clear all submitted data up to this point. | |
Constructor | ModelBuilder () |
EndList | nil (int material) |
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 | Model (VertexLayout decl) |
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 | Monitor (int idx) |
clear | nil () |
push_back | nil (Monitor v) |
reserve | nil (int size) |
size | int () |
MonitorMode
Related classes: MonitorModeList.
Member | Type |
---|---|
frequency | int |
name | string |
rect | IntRect |
rotation | MonitorRotation |
supported_rotations | int |
MonitorModeList
Related functions: GetMonitorModes.
Method | Prototype |
---|---|
at | MonitorMode (int idx) |
clear | nil () |
push_back | nil (MonitorMode v) |
reserve | nil (int size) |
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 | Mouse (string name) |
Down | boolean (int button) |
DtX | int () |
DtY | int () |
GetOldState | MouseState () |
GetState | MouseState () |
HWheel | int () |
Pressed | boolean (int button) |
Released | boolean (int button) |
Update | nil () |
Wheel | int () |
X | int () |
Y | int () |
MouseState
Related classes: Mouse.
Related functions: ImGuiBeginFrame and ReadMouse.
Method | Prototype |
---|---|
Button | boolean (MouseButton btn) |
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 | ViewState (Vec2 aspect_ratio) |
ComputeWorld | Mat4 () |
DestroyInstance | nil () |
Disable | nil () |
Enable | nil () |
GetCamera | Camera () |
Return the Camera component of the node. | |
GetCollision | Collision (int slot) |
GetCollisionCount | int () |
GetFlags | int () |
GetInstance | Instance () |
GetInstanceSceneAnim | SceneAnimRef (string path) |
GetInstanceSceneView | SceneView () |
GetLight | Light () |
Return the Light component of the node. | |
GetMinMax | boolean, MinMax (PipelineResources resources) |
GetName | string () |
Return the node name. | |
GetObject | Object () |
Return Object component of the node. | |
GetRigidBody | RigidBody () |
GetScript | Script (int idx) |
GetScriptCount | int () |
GetTransform | Transform () |
Return the Transform component of the node. | |
GetUid | int () |
Return the unique ID. | |
GetWorld | Mat4 () |
HasCamera | boolean () |
HasInstance | boolean () |
HasLight | boolean () |
HasObject | boolean () |
HasRigidBody | boolean () |
HasTransform | boolean () |
IsEnabled | boolean () |
IsInstantiatedBy | Node () |
IsItselfEnabled | boolean () |
IsValid | boolean () |
Return true if the Node still exist. | |
RemoveCamera | nil () |
RemoveCollision | nil (Collision c) |
RemoveCollision | nil (int slot) |
RemoveLight | nil () |
RemoveObject | nil () |
RemoveRigidBody | nil () |
RemoveScript | nil (Script s) |
RemoveScript | nil (int slot) |
RemoveTransform | nil () |
SetCamera | nil (Camera c) |
Set the Camera component of a node.
See Scene.CreateCamera. | |
SetCollision | nil (int slot, Collision c) |
SetFlags | nil (int flags) |
SetInstance | nil (Instance instance) |
SetLight | nil (Light l) |
Set the Light component of a node. See Scene.CreateLight, Scene.CreatePointLight, Scene.CreateSpotLight or Scene.CreateLinearLight. | |
SetName | nil (string name) |
Set the node name. | |
SetObject | nil (Object o) |
Set the Object component of a node. See Scene.CreateObject. | |
SetRigidBody | nil (RigidBody b) |
Set the RigidBody component of a node. | |
SetScript | nil (int idx, Script s) |
SetTransform | nil (Transform t) |
Set the Transform component of a node. | |
SetWorld | nil (Mat4 world) |
SetupInstanceFromAssets | boolean (PipelineResources resources, PipelineInfo pipeline) |
SetupInstanceFromAssets | boolean (PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags) |
SetupInstanceFromFile | boolean (PipelineResources resources, PipelineInfo pipeline) |
SetupInstanceFromFile | boolean (PipelineResources resources, PipelineInfo pipeline, LoadSaveSceneFlags flags) |
StartOnInstantiateAnim | nil () |
StopOnInstantiateAnim | nil () |
operator== | boolean (Node n) |
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 | Node (int idx) |
clear | nil () |
push_back | nil (Node v) |
reserve | nil (int size) |
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 | nil () |
GetBone | Node (int idx) |
GetBoneCount | int () |
GetMaterial | Material (int slot_idx) |
Return the object Material at index. | |
GetMaterial | Material (string name) |
Return the object Material at index. | |
GetMaterialCount | int () |
Return the number of Material in the object material table. | |
GetMaterialName | string (int slot_idx) |
GetMinMax | boolean, MinMax (PipelineResources resources) |
GetModelRef | ModelRef () |
Return the ModelRef to display. | |
IsValid | boolean () |
SetBone | boolean (int idx, Node node) |
SetBoneCount | nil (int count) |
SetMaterial | nil (int slot_idx, Material mat) |
Set the object Material at index. | |
SetMaterialCount | nil (int count) |
Set the number of Material in the object material table. | |
SetMaterialName | nil (int slot_idx, string name) |
SetModelRef | nil (ModelRef r) |
Set the ModelRef to display. | |
operator== | boolean (Object o) |
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 |
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 | Picture (int width, int height, PictureFormat format) |
Constructor | Picture (VoidPointer data, int width, int height, PictureFormat format) |
CopyData | nil (VoidPointer data, int width, int height, PictureFormat format) |
GetData | pointer () |
GetFormat | PictureFormat () |
GetHeight | int () |
Return the picture height. | |
GetPixelRGBA | Color (int x, int y) |
GetWidth | int () |
Return the picture width. | |
SetData | nil (VoidPointer data, int width, int height, PictureFormat format) |
SetPixelRGBA | nil (int x, int y, Color col) |
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 | string |
PipelineProgram
Related classes: PipelineResources.
Related functions: LoadPipelineProgramFromAssets, LoadPipelineProgramFromFile and SubmitModelToForwardPipeline.
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 | ModelRef (string name, Model mdl) |
AddProgram | PipelineProgramRef (string name, PipelineProgram prg) |
AddTexture | TextureRef (string name, Texture tex) |
Constructor | PipelineResources () |
DestroyAllModels | nil () |
DestroyAllPrograms | nil () |
DestroyAllTextures | nil () |
DestroyModel | nil (ModelRef ref) |
DestroyProgram | nil (PipelineProgramRef ref) |
DestroyTexture | nil (TextureRef ref) |
GetModel | Model (ModelRef ref) |
GetModelName | string (ModelRef ref) |
GetProgram | PipelineProgram (PipelineProgramRef ref) |
GetProgramName | string (PipelineProgramRef ref) |
GetTexture | Texture (TextureRef ref) |
GetTextureInfo | TextureInfo (TextureRef ref) |
GetTextureName | string (TextureRef ref) |
HasModel | ModelRef (string name) |
HasProgram | PipelineProgramRef (string name) |
HasTexture | TextureRef (string name) |
HasTextureInfo | boolean (TextureRef ref) |
UpdateModel | nil (ModelRef ref, Model mdl) |
UpdateProgram | nil (PipelineProgramRef ref, PipelineProgram prg) |
UpdateTexture | nil (TextureRef ref, Texture tex) |
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 | number |
x | number |
y | number |
z | number |
Method | Prototype |
---|---|
Constructor | Quaternion () |
Constructor | Quaternion (number x, number y, number z, number w) |
Constructor | Quaternion (Quaternion q) |
operator* | Quaternion (number v) |
operator* | Quaternion (Quaternion q) |
operator*= | nil (number v) |
operator*= | nil (Quaternion q) |
operator+ | Quaternion (number v) |
operator+ | Quaternion (Quaternion q) |
operator+= | nil (number v) |
operator+= | nil (Quaternion q) |
operator- | Quaternion (number v) |
operator- | Quaternion (Quaternion q) |
operator-= | nil (number v) |
operator-= | nil (Quaternion q) |
operator/ | Quaternion (number v) |
operator/= | nil (number v) |
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 | number |
RaycastOutList
Related classes: SceneBullet3Physics.
Method | Prototype |
---|---|
at | RaycastOut (int idx) |
clear | nil () |
push_back | nil (RaycastOut v) |
reserve | nil (int size) |
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 | number |
ey | number |
sx | number |
sy | number |
Method | Prototype |
---|---|
Constructor | Rect () |
Constructor | Rect (number x, number y) |
Constructor | Rect (number sx, number sy, number ex, number ey) |
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 | number () |
Return the rigid body angular damping. A value of 0.0 means no damping, 1.0 means the maximal dissipation of the energy. | |
GetFriction | number () |
GetLinearDamping | number () |
GetRestitution | number () |
GetRollingFriction | number () |
GetType | RigidBodyType () |
Return the rigid body type. See RigidBody.SetType. | |
IsValid | boolean () |
SetAngularDamping | nil (number damping) |
Set the rigid body angular damping. A value of 0.0 means no damping, 1.0 means the maximal dissipation of the energy. | |
SetFriction | nil (number friction) |
SetLinearDamping | nil (number damping) |
SetRestitution | nil (number restitution) |
SetRollingFriction | nil (number rolling_friction) |
SetType | nil (RigidBodyType type) |
Set the rigid body type. | |
operator== | boolean (RigidBody b) |
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 | number |
gaze_direction_normalized | Vec3 |
gaze_origin_mm | Vec3 |
pupil_diameter_mm | number |
pupil_diameter_valid | boolean |
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 | nil () |
Remove all nodes from the scene. | |
ComputeCurrentCameraViewState | ViewState (Vec2 aspect_ratio) |
ComputeWorldMatrices | nil () |
Constructor | Scene () |
CreateCamera | Camera () |
CreateCamera | Camera (number znear, number zfar) |
CreateCamera | Camera (number znear, number zfar, number fov) |
CreateCollision | Collision () |
CreateInstance | Instance () |
CreateLight | Light () |
CreateLinearLight | Light (Color diffuse, number diffuse_intensity, Color specular, number specular_intensity) |
CreateLinearLight | Light (Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority) |
CreateLinearLight | Light (Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type) |
CreateLinearLight | Light (Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias) |
CreateLinearLight | Light (Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias, Vec4 pssm_split) |
CreateLinearLight | Light (Color diffuse, Color specular) |
CreateLinearLight | Light (Color diffuse, Color specular, number priority) |
CreateLinearLight | Light (Color diffuse, Color specular, number priority, LightShadowType shadow_type) |
CreateLinearLight | Light (Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias) |
CreateLinearLight | Light (Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias, Vec4 pssm_split) |
CreateNode | Node () |
Create a Node in the scene. | |
CreateNode | Node (string name) |
Create a Node in the scene. | |
CreateObject | Object () |
CreateObject | Object (ModelRef model, MaterialList materials) |
CreateOrthographicCamera | Camera (number znear, number zfar) |
CreateOrthographicCamera | Camera (number znear, number zfar, number size) |
CreatePointLight | Light (number radius, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity) |
CreatePointLight | Light (number radius, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority) |
CreatePointLight | Light (number radius, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type) |
CreatePointLight | Light (number radius, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias) |
CreatePointLight | Light (number radius, Color diffuse, Color specular) |
CreatePointLight | Light (number radius, Color diffuse, Color specular, number priority) |
CreatePointLight | Light (number radius, Color diffuse, Color specular, number priority, LightShadowType shadow_type) |
CreatePointLight | Light (number radius, Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias) |
CreateRigidBody | RigidBody () |
CreateScript | Script () |
CreateScript | Script (string path) |
CreateSpotLight | Light (number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity) |
CreateSpotLight | Light (number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority) |
CreateSpotLight | Light (number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type) |
CreateSpotLight | Light (number radius, number inner_angle, number outer_angle, Color diffuse, number diffuse_intensity, Color specular, number specular_intensity, number priority, LightShadowType shadow_type, number shadow_bias) |
CreateSpotLight | Light (number radius, number inner_angle, number outer_angle, Color diffuse, Color specular) |
CreateSpotLight | Light (number radius, number inner_angle, number outer_angle, Color diffuse, Color specular, number priority) |
CreateSpotLight | Light (number radius, number inner_angle, number outer_angle, Color diffuse, Color specular, number priority, LightShadowType shadow_type) |
CreateSpotLight | Light (number radius, number inner_angle, number outer_angle, Color diffuse, Color specular, number priority, LightShadowType shadow_type, number shadow_bias) |
CreateTransform | Transform () |
CreateTransform | Transform (Vec3 T) |
CreateTransform | Transform (Vec3 T, Vec3 R) |
CreateTransform | Transform (Vec3 T, Vec3 R, Vec3 S) |
DestroyCamera | nil (Camera camera) |
DestroyCollision | nil (Collision collision) |
DestroyInstance | nil (Instance Instance) |
DestroyLight | nil (Light light) |
DestroyNode | nil (Node node) |
Remove a Node from the scene. | |
DestroyObject | nil (Object object) |
DestroyRigidBody | nil (RigidBody rigid_body) |
DestroyScript | nil (Script script) |
DestroyTransform | nil (Transform transform) |
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 | NodeList (NodeComponentIdx idx) |
GetCurrentCamera | Node () |
Get the current camera. | |
GetKeys | StringList () |
GetMinMax | boolean, MinMax (PipelineResources resources) |
GetNode | Node (string name) |
Get a node by name. For more complex queries see Scene.GetNodeEx. | |
GetNodeChildren | NodeList (Node node) |
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 | Node (string path) |
Get a node by its absolute path in the node hierarchy. A node path is constructed as follow:
Examples: Get the node named
Get the node named
| |
GetNodes | NodeList () |
Return all nodes in scene. | |
GetNodesWithComponent | NodeList (NodeComponentIdx idx) |
GetPlayingAnimNames | StringList () |
GetPlayingAnimRefs | ScenePlayAnimRefList () |
GetSceneAnim | SceneAnimRef (string name) |
GetSceneAnims | SceneAnimRefList () |
GetScript | Script (int slot_idx) |
GetScriptCount | int () |
GetValue | string (string key) |
HasKey | boolean (string key) |
IsChildOf | boolean (Node node, Node parent) |
IsPlaying | boolean (ScenePlayAnimRef ref) |
IsRoot | boolean (Node node) |
PlayAnim | ScenePlayAnimRef (SceneAnimRef ref) |
PlayAnim | ScenePlayAnimRef (SceneAnimRef ref, AnimLoopMode loop_mode) |
PlayAnim | ScenePlayAnimRef (SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing) |
PlayAnim | ScenePlayAnimRef (SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing, int t_start) |
PlayAnim | ScenePlayAnimRef (SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing, int t_start, int t_end) |
PlayAnim | ScenePlayAnimRef (SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing, int t_start, int t_end, boolean paused) |
PlayAnim | ScenePlayAnimRef (SceneAnimRef ref, AnimLoopMode loop_mode, Easing easing, int t_start, int t_end, boolean paused, number t_scale) |
ReadyWorldMatrices | nil () |
RemoveKey | nil (string key) |
ReserveCameras | nil (int count) |
ReserveLights | nil (int count) |
Allocates internal storage for the required number of Light components in one go. | |
ReserveNodes | nil (int count) |
Allocates internal storage for the required number of nodes in one go. | |
ReserveObjects | nil (int count) |
Allocates internal storage for the required number of Object components in one go. | |
ReserveScripts | nil (int count) |
ReserveTransforms | nil (int count) |
Allocates internal storage for the required number of Transform components in one go. | |
SetCurrentCamera | nil (Node camera) |
Set the current camera. | |
SetScript | nil (int slot_idx, Script script) |
SetValue | nil (string key, string value) |
StopAllAnims | nil () |
StopAnim | nil (ScenePlayAnimRef ref) |
Update | nil (int dt) |
Start the Update phase of the scene. | |
UpdatePlayingAnims | nil (int dt) |
SceneAnimRef
Reference to a scene animation.
Related classes: Node, SceneAnimRefList and Scene.
SceneAnimRefList
Related classes: Scene.
Method | Prototype |
---|---|
at | SceneAnimRef (int idx) |
clear | nil () |
push_back | nil (SceneAnimRef v) |
reserve | nil (int size) |
size | int () |
SceneBullet3Physics
Newton physics for scene physics and collision components.
See Physics.
Related functions: SceneClearSystems, SceneGarbageCollectSystems, SceneSyncToSystemsFromAssets, SceneSyncToSystemsFromFile and SceneUpdateSystems.
Method | Prototype |
---|---|
Clear | nil () |
ClearNodes | nil () |
CollectCollisionEvents | nil (Scene scene, NodePairContacts node_pair_contacts) |
Constructor | SceneBullet3Physics () |
Constructor | SceneBullet3Physics (int thread_count) |
GarbageCollect | int (Scene scene) |
GarbageCollectResources | int () |
NodeAddForce | nil (Node node, Vec3 F) |
NodeAddForce | nil (Node node, Vec3 F, Vec3 world_pos) |
NodeAddImpulse | nil (Node node, Vec3 dt_velocity) |
NodeAddImpulse | nil (Node node, Vec3 dt_velocity, Vec3 world_pos) |
NodeAddTorque | nil (Node node, Vec3 T) |
NodeAddTorqueImpulse | nil (Node node, Vec3 dt_angular_velocity) |
NodeCollideWorld | NodePairContacts (Node node, Mat4 world) |
NodeCollideWorld | NodePairContacts (Node node, Mat4 world, int max_contact) |
NodeCreatePhysicsFromAssets | nil (Node node) |
NodeCreatePhysicsFromFile | nil (Node node) |
NodeDestroyPhysics | nil (Node node) |
NodeGetAngularFactor | Vec3 (Node node) |
NodeGetAngularVelocity | Vec3 (Node node) |
NodeGetDeactivation | boolean (Node node) |
NodeGetLinearFactor | Vec3 (Node node) |
NodeGetLinearVelocity | Vec3 (Node node) |
NodeGetPointVelocity | Vec3 (Node node, Vec3 world_pos) |
NodeHasBody | boolean (Node node) |
NodeResetWorld | nil (Node node, Mat4 world) |
NodeSetAngularFactor | nil (Node node, Vec3 k) |
NodeSetAngularVelocity | nil (Node node, Vec3 W) |
NodeSetDeactivation | nil (Node node, boolean enable) |
NodeSetLinearFactor | nil (Node node, Vec3 k) |
NodeSetLinearVelocity | nil (Node node, Vec3 V) |
NodeStartTrackingCollisionEvents | nil (Node node) |
NodeStartTrackingCollisionEvents | nil (Node node, CollisionEventTrackingMode mode) |
NodeStopTrackingCollisionEvents | nil (Node node) |
NodeTeleport | nil (Node node, Mat4 world) |
NodeWake | nil (Node node) |
RaycastAllHits | RaycastOutList (Scene scene, Vec3 p0, Vec3 p1) |
RaycastFirstHit | RaycastOut (Scene scene, Vec3 p0, Vec3 p1) |
RenderCollision | nil (int view_id, VertexLayout vtx_layout, ProgramHandle prg, RenderState render_state, int depth) |
SceneCreatePhysicsFromAssets | nil (Scene scene) |
SceneCreatePhysicsFromFile | nil (Scene scene) |
StepSimulation | nil (int display_dt) |
StepSimulation | nil (int display_dt, int step_dt) |
StepSimulation | nil (int display_dt, int step_dt, int max_step) |
SyncTransformsFromScene | nil (Scene scene) |
SyncTransformsToScene | nil (Scene scene) |
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 | boolean, LuaObjectList (Script script, string function, LuaObjectList args) |
Constructor | SceneLuaVM () |
CreateNodeScriptsFromAssets | ScriptList (Scene scene, Node node) |
CreateNodeScriptsFromFile | ScriptList (Scene scene, Node node) |
CreateScriptFromAssets | boolean (Scene scene, Script script) |
CreateScriptFromFile | boolean (Scene scene, Script script) |
CreateScriptFromSource | boolean (Scene scene, Script script, string src) |
DestroyScripts | nil (ScriptList scripts) |
GarbageCollect | ScriptList (Scene scene) |
GetScriptCount | int () |
GetScriptEnv | LuaObject (Script script) |
GetScriptInterface | StringList (Script script) |
GetScriptValue | LuaObject (Script script, string name) |
MakeLuaObject | LuaObject () |
SceneCreateScriptsFromAssets | ScriptList (Scene scene) |
SceneCreateScriptsFromFile | ScriptList (Scene scene) |
SetScriptValue | boolean (Script script, string name, LuaObject value) |
ScenePlayAnimRef
Reference to a playing scene animation.
Related classes: Instance, ScenePlayAnimRefList and Scene.
ScenePlayAnimRefList
Related classes: Scene.
Method | Prototype |
---|---|
at | ScenePlayAnimRef (int idx) |
clear | nil () |
push_back | nil (ScenePlayAnimRef v) |
reserve | nil (int size) |
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 | Node (Scene scene, string name) |
Find a node by name in the view. Pass the host scene as the See Working with Scene. | |
GetNodes | NodeList (Scene scene) |
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 | string () |
IsValid | boolean () |
SetPath | nil (string path) |
operator== | boolean (Script s) |
ScriptList
Related classes: SceneLuaVM.
Method | Prototype |
---|---|
at | Script (int idx) |
clear | nil () |
push_back | nil (Script v) |
reserve | nil (int size) |
size | int () |
SetDrawStatesCallback
Signal_returning_void_taking_const_char_ptr
Method | Prototype |
---|---|
Connect | TextInputCallbackConnection (TextInputCallback listener) |
Disconnect | nil (TextInputCallbackConnection connection) |
DisconnectAll | nil () |
Emit | nil (string arg0) |
GetListenerCount | int () |
Signal_returning_void_taking_time_ns
Method | Prototype |
---|---|
Connect | TimeCallbackConnection (TimeCallback listener) |
Disconnect | nil (TimeCallbackConnection connection) |
DisconnectAll | nil () |
Emit | nil (int arg0) |
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 | number |
Method | Prototype |
---|---|
Constructor | SpatializedSourceState () |
Constructor | SpatializedSourceState (Mat4 mtx) |
Constructor | SpatializedSourceState (Mat4 mtx, number volume) |
Constructor | SpatializedSourceState (Mat4 mtx, number volume, SourceRepeat repeat) |
Constructor | SpatializedSourceState (Mat4 mtx, number volume, SourceRepeat repeat, Vec3 vel) |
StereoSourceState
State for a stereo audio source, see Playing Audio.
Related functions: PlayStereo, StreamOGGAssetStereo, StreamOGGFileStereo, StreamWAVAssetStereo and StreamWAVFileStereo.
Member | Type |
---|---|
panning | number |
repeat | SourceRepeat |
volume | number |
Method | Prototype |
---|---|
Constructor | StereoSourceState () |
Constructor | StereoSourceState (number volume) |
Constructor | StereoSourceState (number volume, SourceRepeat repeat) |
Constructor | StereoSourceState (number volume, SourceRepeat repeat, number panning) |
StringList
Related classes: SceneLuaVM and Scene.
Related functions: GetGamepadNames, GetJoystickDeviceNames, GetJoystickNames, GetKeyboardNames, GetMaterialTextures, GetMaterialValues, GetMouseNames, GetVRControllerNames, GetVRGenericTrackerNames, ImGuiCombo, ImGuiListBox and PathJoin.
Method | Prototype |
---|---|
at | string (int idx) |
clear | nil () |
push_back | nil (string v) |
reserve | nil (int size) |
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, UpdateTextureFromPicture and UpdateTexture.
TextureInfo
Related classes: PipelineResources.
Related functions: LoadTextureFromAssets and LoadTextureFromFile.
Member | Type |
---|---|
bitsPerPixel | int |
cubeMap | boolean |
depth | int |
format | TextureFormat |
height | int |
numLayers | int |
numMips | int |
storageSize | int |
width | int |
TextureRef
Related classes: Environment and PipelineResources.
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 | nil () |
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 | boolean () |
SetLocal | nil (Mat4 local) |
SetParent | nil (Node n) |
Set the parent node for this transform. This transform will then inherit the transformation of its parent node’s Transform component. | |
SetPos | nil (Vec3 T) |
Set the transform position.
| |
SetPosRot | nil (Vec3 pos, Vec3 rot) |
SetRot | nil (Vec3 R) |
Set the transform rotation from a vector of Euler angles.
| |
SetScale | nil (Vec3 S) |
Set the transform scale. | |
SetTRS | nil (TransformTRS TRS) |
Set the TransformTRS. | |
SetWorld | nil (Mat4 world) |
Set the world matrix.
| |
operator== | boolean (Transform t) |
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 | int (int idx) |
clear | nil () |
push_back | nil (int v) |
reserve | nil (int size) |
size | int () |
UInt32List
Related classes: GeometryBuilder and ModelBuilder.
Method | Prototype |
---|---|
at | int (int idx) |
clear | nil () |
push_back | nil (int v) |
reserve | nil (int size) |
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 | UniformSetTexture (int idx) |
clear | nil () |
push_back | nil (UniformSetTexture v) |
reserve | nil (int size) |
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 | UniformSetValue (int idx) |
clear | nil () |
push_back | nil (UniformSetValue v) |
reserve | nil (int size) |
size | int () |
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 | boolean () |
Gamepad was connected since the last update. | |
Constructor | VRController () |
Constructor | VRController (string name) |
Disconnected | boolean () |
Gamepad was disconnected since the last update. | |
Down | boolean (VRControllerButton btn) |
DtSurface | Vec2 (int idx) |
IsConnected | boolean () |
Gamepad is currently connected. | |
Pressed | boolean (VRControllerButton btn) |
Released | boolean (VRControllerButton btn) |
SendHapticPulse | nil (int duration) |
Surface | Vec2 (int idx) |
Touch | boolean (VRControllerButton btn) |
TouchEnd | boolean (VRControllerButton btn) |
TouchStart | boolean (VRControllerButton btn) |
Update | nil () |
World | Mat4 () |
VRControllerState
Related functions: ReadVRController.
Method | Prototype |
---|---|
IsConnected | boolean () |
Pressed | boolean (VRControllerButton btn) |
Surface | Vec2 (int idx) |
Touched | boolean (VRControllerButton btn) |
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 | VRGenericTracker (string name) |
IsConnected | boolean () |
Update | nil () |
World | Mat4 () |
VRGenericTrackerState
Related functions: ReadVRGenericTracker.
Method | Prototype |
---|---|
IsConnected | boolean () |
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, 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 | number |
y | number |
Method | Prototype |
---|---|
Constructor | Vec2 () |
Constructor | Vec2 (number x, number y) |
Constructor | Vec2 (Vec2 v) |
Constructor | Vec2 (Vec3 v) |
Constructor | Vec2 (Vec4 v) |
Set | nil (number x, number y) |
operator* | Vec2 (Vec2 v) |
operator* | Vec2 (number k) |
operator* | Vec2 (Mat3 m) |
operator*= | nil (Vec2 v) |
operator*= | nil (number k) |
operator+ | Vec2 (Vec2 v) |
operator+ | Vec2 (number k) |
operator+= | nil (Vec2 v) |
operator+= | nil (number k) |
operator- | Vec2 (Vec2 v) |
operator- | Vec2 (number k) |
operator-= | nil (Vec2 v) |
operator-= | nil (number k) |
operator/ | Vec2 (Vec2 v) |
operator/ | Vec2 (number k) |
operator/= | nil (Vec2 v) |
operator/= | nil (number k) |
Vec2List
Related classes: ImDrawList.
Method | Prototype |
---|---|
at | Vec2 (int idx) |
Gets the element at the specified index. | |
clear | nil () |
push_back | nil (Vec2 v) |
Adds an element to the end. | |
reserve | nil (int size) |
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, 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 | number |
y | number |
z | number |
Method | Prototype |
---|---|
Constructor | Vec3 () |
Constructor | Vec3 (number x, number y, number z) |
Constructor | Vec3 (Vec2 v) |
Constructor | Vec3 (iVec2 v) |
Constructor | Vec3 (Vec3 v) |
Constructor | Vec3 (Vec4 v) |
Set | nil (number x, number y, number z) |
operator!= | boolean (Vec3 v) |
operator* | Vec3 (Vec3 v) |
operator* | Vec3 (number k) |
operator*= | nil (Vec3 v) |
operator*= | nil (number k) |
operator+ | Vec3 (Vec3 v) |
operator+ | Vec3 (number k) |
operator+= | nil (Vec3 v) |
operator+= | nil (number k) |
operator- | Vec3 (Vec3 v) |
operator- | Vec3 (number k) |
operator-= | nil (Vec3 v) |
operator-= | nil (number k) |
operator/ | Vec3 (Vec3 v) |
operator/ | Vec3 (number k) |
operator/= | nil (Vec3 v) |
operator/= | nil (number k) |
operator== | boolean (Vec3 v) |
Vec3List
Related functions: DrawSprites.
Method | Prototype |
---|---|
at | Vec3 (int idx) |
clear | nil () |
push_back | nil (Vec3 v) |
reserve | nil (int size) |
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 | number |
x | number |
y | number |
z | number |
Method | Prototype |
---|---|
Constructor | Vec4 () |
Constructor | Vec4 (number x, number y, number z) |
Constructor | Vec4 (number x, number y, number z, number w) |
Constructor | Vec4 (Vec2 v) |
Constructor | Vec4 (iVec2 v) |
Constructor | Vec4 (Vec3 v) |
Constructor | Vec4 (Vec4 v) |
Set | nil (number x, number y, number z) |
Set | nil (number x, number y, number z, number w) |
operator* | Vec4 (Vec4 v) |
operator* | Vec4 (number k) |
operator*= | nil (Vec4 v) |
operator*= | nil (number k) |
operator+ | Vec4 (Vec4 v) |
operator+ | Vec4 (number k) |
operator+= | nil (Vec4 v) |
operator+= | nil (number k) |
operator- | Vec4 (Vec4 v) |
operator- | Vec4 (number k) |
operator-= | nil (Vec4 v) |
operator-= | nil (number k) |
operator/ | Vec4 (Vec4 v) |
operator/ | Vec4 (number k) |
operator/= | nil (Vec4 v) |
operator/= | nil (number k) |
Vec4List
Method | Prototype |
---|---|
at | Vec4 (int idx) |
clear | nil () |
push_back | nil (Vec4 v) |
reserve | nil (int size) |
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 | VertexLayout (Attrib attrib, int count, AttribType type) |
Add | VertexLayout (Attrib attrib, int count, AttribType type, boolean normalized) |
Add | VertexLayout (Attrib attrib, int count, AttribType type, boolean normalized, boolean as_int) |
Begin | VertexLayout () |
Constructor | VertexLayout () |
End | nil () |
GetOffset | int (Attrib attrib) |
GetSize | int (int count) |
GetStride | int () |
Has | boolean (Attrib attrib) |
Skip | VertexLayout (int size) |
Vertices
Helper class to generate vertex buffers for drawing primitives.
Related functions: DrawLines and DrawTriangles.
Method | Prototype |
---|---|
Begin | Vertices (int vertex_index) |
Clear | nil () |
Constructor | Vertices (VertexLayout decl, int count) |
End | nil () |
End | nil (boolean validate) |
GetCapacity | int () |
GetCount | int () |
GetData | VoidPointer () |
GetDecl | VertexLayout () |
GetSize | int () |
Reserve | nil (int count) |
Resize | nil (int count) |
SetBinormal | Vertices (Vec3 binormal) |
SetColor0 | Vertices (Color color) |
SetColor1 | Vertices (Color color) |
SetColor2 | Vertices (Color color) |
SetColor3 | Vertices (Color color) |
SetNormal | Vertices (Vec3 normal) |
SetPos | Vertices (Vec3 pos) |
SetTangent | Vertices (Vec3 tangent) |
SetTexCoord0 | Vertices (Vec2 uv) |
SetTexCoord1 | Vertices (Vec2 uv) |
SetTexCoord2 | Vertices (Vec2 uv) |
SetTexCoord3 | Vertices (Vec2 uv) |
SetTexCoord4 | Vertices (Vec2 uv) |
SetTexCoord5 | Vertices (Vec2 uv) |
SetTexCoord6 | Vertices (Vec2 uv) |
SetTexCoord7 | Vertices (Vec2 uv) |
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.