cturtle/ui/btlib/engine
include "cturtle/ui/btlib/engine";
Types
CtAnimationMesh
Object
| Field | Type | Writable | Description |
|---|---|---|---|
node | int | yes | |
entity | Entity | yes | |
rest | CtMotionPose | yes |
ConsoleField
Object
| Field | Type | Writable | Description |
|---|---|---|---|
input | TextInput | yes | |
token | int | yes | |
draft | string | yes | |
draftCursor | int | yes | |
draftAnchor | int | yes | |
draftScroll | float | yes | |
historyOffset | int | yes |
takeCommand
fn takeCommand() -> string
previousCommand
fn previousCommand()
nextCommand
fn nextCommand()
keyDown
fn keyDown(int key, int modifiers)
Console
Object
| Field | Type | Writable | Description |
|---|---|---|---|
lib | UiLib | yes | |
panel | UiElement | yes | |
panelId | int | yes | |
output | UiElement | yes | |
outputToken | int | yes | |
rows | array<UiElement> | yes | |
rowCount | int | yes | |
scrollback | array<string> | yes | |
scrollOffset | int | yes | |
field | ConsoleField | yes | |
open | bool | yes | |
screenWidth | float | yes | |
screenHeight | float | yes | |
panelHeight | float | yes | |
lineHeight | float | yes |
relayout
fn relayout(float width, float height)
ensureRows
fn ensureRows(int needed)
refresh infallible
infallible fn refresh()
addLine
fn addLine(string line)
setOpen infallible
infallible fn setOpen(bool open)
submit
fn submit()
pointerDownModified
fn pointerDownModified(
int surfaceId,
int token,
int button,
float x,
float y,
int modifiers)
pointerUp
fn pointerUp(int surfaceId, int token, int button, float x, float y)
pointerMoved
fn pointerMoved(
int surfaceId,
int token,
float x,
float y,
float dx,
float dy)
scrolled
fn scrolled(
int surfaceId,
int token,
float x,
float y,
float amountX,
float amountY)
keyDown
fn keyDown(int key, int modifiers)
keyUp
fn keyUp(int key, int modifiers)
charTyped
fn charTyped(int codepoint)
pasted
fn pasted(string text)
surfaceResized
fn surfaceResized(int surfaceId, int width, int height)
layoutChanged
fn layoutChanged(int element, float x, float y, float width, float height)
transitionFinished
fn transitionFinished(int element, int property)
PreviewOrbit
Object
| Field | Type | Writable | Description |
|---|---|---|---|
directionX | float | yes | |
directionY | float | yes | |
directionZ | float | yes | |
distance | float | yes |
setHorizontalLength infallible
infallible fn setHorizontalLength(float wanted)
setDefaultElevation infallible
infallible fn setDefaultElevation()
drag infallible
infallible fn drag(float dx, float dy)
reset infallible
infallible fn reset(float framedDistance)
PreviewPanDelta
Object
| Field | Type | Writable | Description |
|---|---|---|---|
x | float | yes | |
y | float | yes | |
z | float | yes |
PreviewViewportRay
Object
| Field | Type | Writable | Description |
|---|---|---|---|
originX | float | yes | |
originY | float | yes | |
originZ | float | yes | |
directionX | float | yes | |
directionY | float | yes | |
directionZ | float | yes |
PreviewViewportInteractionNothing
Object
previewViewportPressed infallible
infallible fn previewViewportPressed(PreviewViewportRay ray) -> bool
previewViewportDragged infallible
infallible fn previewViewportDragged(PreviewViewportRay ray)
previewViewportReleased infallible
infallible fn previewViewportReleased()
PreviewViewport
Object
| Field | Type | Writable | Description |
|---|---|---|---|
lib | UiLib | yes | |
theme | Theme | yes | |
root | UiElement | yes | |
image | UiElement | yes | |
hint | UiElement | yes | |
nativeViewport | RenderViewport | yes | |
cameraHandle | int | yes | |
lightingScopeId | int | yes | |
visible | bool | yes | |
token | int | yes | |
camera | PreviewOrbit | yes | |
planar | bool | yes | |
planarSpan | float | yes | |
framedRadius | float | yes | |
planarFit | bool | yes | |
boxFraming | bool | yes | |
frameX | float | yes | |
frameY | float | yes | |
frameZ | float | yes | |
frameHalfX | float | yes | |
frameHalfY | float | yes | |
frameHalfZ | float | yes | |
adaptiveClipping | bool | yes | |
clipX | float | yes | |
clipY | float | yes | |
clipZ | float | yes | |
clipRadius | float | yes | |
nearClip | float | yes | |
appliedNearClip | float | yes | |
appliedFarClip | float | yes | |
appliedSpan | float | yes | |
targetX | float | yes | |
targetY | float | yes | |
targetZ | float | yes | |
framedDistance | float | yes | |
farClip | float | yes | |
maximumDistance | float | yes | |
logicalX | float | yes | |
logicalY | float | yes | |
logicalWidth | float | yes | |
logicalHeight | float | yes | |
gridVisible | bool | yes | |
gridSpacing | float | yes | |
pointerTravel | float | yes | |
panGesture | bool | yes | |
interactionCaptured | bool | yes | |
suppressClick | bool | yes | |
focused | bool | yes | |
clickHandler | PreviewViewportClickHandler | yes | |
interactionHandler | PreviewViewportInteractionHandler | yes | |
cancelHandler | PreviewViewportCancelHandler | yes | |
frameHandler | PreviewViewportFrameHandler | yes |
planarDistance infallible
infallible fn planarDistance() -> float
fitClipping infallible
infallible fn fitClipping()
updateCamera
fn updateCamera()
queueNativeCamera
fn queueNativeCamera()
ensureNative
fn ensureNative()
layout
fn layout(float x, float y, float width, float height)
syncLayout infallible
infallible fn syncLayout()
fitPlanar infallible
infallible fn fitPlanar()
fitCamera infallible
infallible fn fitCamera()
frameBox
fn frameBox(Vec3 minimum, Vec3 maximum)
setPlanar
fn setPlanar(bool planar)
setVisible
fn setVisible(bool visible)
lightingScope
fn lightingScope() -> RenderLightingScope
setClickHandler infallible
infallible fn setClickHandler(PreviewViewportClickHandler handler)
setInteractionHandler infallible
infallible fn setInteractionHandler(
PreviewViewportInteractionHandler handler)
setGrid
fn setGrid(bool visible, float spacing)
selectGrid
fn selectGrid(int index)
pointerPressed infallible
infallible fn pointerPressed(float x, float y, int modifiers)
pointerMoved infallible
infallible fn pointerMoved(float dx, float dy)
pointerDragged
fn pointerDragged(float x, float y, float dx, float dy)
pointerReleased infallible
infallible fn pointerReleased()
rayAt infallible
infallible fn rayAt(float x, float y) -> PreviewViewportRay
pointerClicked infallible
infallible fn pointerClicked(float x, float y)
orbit
fn orbit(float dx, float dy)
pan
fn pan(float dx, float dy)
frame
fn frame(float x, float y, float z, float radius)
setHintText infallible
infallible fn setHintText(string text)
zoom
fn zoom(float amount)
setFocused infallible
infallible fn setFocused(bool focused)
keyDown
fn keyDown(int key, int modifiers)
SelectPreviewViewportGrid
Object
| Field | Type | Writable | Description |
|---|---|---|---|
viewport | PreviewViewport | yes |
comboSelected infallible
infallible fn comboSelected(int index, string value)
CtMotionMeshPart
Object
| Field | Type | Writable | Description |
|---|---|---|---|
name | string | yes | |
entity | Entity | yes | |
rest | CtMotionPose | yes |
ViewportAxisParameter
Object
| Field | Type | Writable | Description |
|---|---|---|---|
hit | bool | yes | |
value | float | yes |
ViewportAxisDrag
Object
| Field | Type | Writable | Description |
|---|---|---|---|
active | bool | yes | |
axis | int | yes | |
originX | float | yes | |
originY | float | yes | |
originZ | float | yes | |
axisX | float | yes | |
axisY | float | yes | |
axisZ | float | yes | |
normalX | float | yes | |
normalY | float | yes | |
normalZ | float | yes | |
startParameter | float | yes | |
originalValue | float | yes | |
currentValue | float | yes |
ViewportRotationPoint
Object
| Field | Type | Writable | Description |
|---|---|---|---|
hit | bool | yes | |
distance | float | yes | |
x | float | yes | |
y | float | yes | |
z | float | yes |
ViewportRotationDrag
Object
| Field | Type | Writable | Description |
|---|---|---|---|
active | bool | yes | |
axis | int | yes | |
originX | float | yes | |
originY | float | yes | |
originZ | float | yes | |
axisX | float | yes | |
axisY | float | yes | |
axisZ | float | yes | |
startX | float | yes | |
startY | float | yes | |
startZ | float | yes | |
originalValue | float | yes | |
accumulatedValue | float | yes | |
currentValue | float | yes |
Interfaces
PreviewViewportClickHandler
Interface
previewViewportClicked infallible
infallible fn previewViewportClicked(PreviewViewportRay ray)
PreviewViewportInteractionHandler
Interface
previewViewportPressed infallible
infallible fn previewViewportPressed(PreviewViewportRay ray) -> bool
previewViewportDragged infallible
infallible fn previewViewportDragged(PreviewViewportRay ray)
previewViewportReleased infallible
infallible fn previewViewportReleased()
PreviewViewportCancelHandler
Interface
previewViewportCancelled infallible
infallible fn previewViewportCancelled()
PreviewViewportFrameHandler
Interface
previewViewportFrame infallible
infallible fn previewViewportFrame(bool all)
Functions
ctAnimationUpdateMeshes
fn ctAnimationUpdateMeshes(
CtMotionRig rig,
CtMotionClip clip,
array<Entity> entities,
float time,
CtMotionPose instance)
ctAnimationUpdateParts
fn ctAnimationUpdateParts(
CtMotionRig rig,
CtMotionClip clip,
array<CtAnimationMesh> parts,
float time,
CtMotionPose instance)
consoleStart
fn consoleStart(UiLib lib) -> Console
previewFrameDistance infallible
infallible fn previewFrameDistance(
float radius,
float maximumDistance,
float aspect) -> float
previewPanDelta infallible
infallible fn previewPanDelta(
PreviewOrbit camera,
float logicalHeight,
float dx,
float dy) -> PreviewPanDelta
previewOrbitCreate infallible
infallible fn previewOrbitCreate(float distance) -> PreviewOrbit
previewViewportGridOptions infallible
infallible fn previewViewportGridOptions() -> array<string>
previewViewportCreate
fn previewViewportCreate(UiLib lib, Panel context, Theme theme) -> PreviewViewport
previewViewportCreateLazy
fn previewViewportCreateLazy(
UiLib lib,
Panel context,
Theme theme) -> PreviewViewport
ctMotionValidateMeshTargets
fn ctMotionValidateMeshTargets(
CtMotionClip clip,
array<CtMotionMeshPart> parts)
ctMotionUpdateMeshesAt
fn ctMotionUpdateMeshesAt(
CtMotionClip clip,
array<CtMotionMeshPart> parts,
float elapsed,
Vec3 origin)
ctMotionUpdateMeshes
fn ctMotionUpdateMeshes(
CtMotionClip clip,
array<CtMotionMeshPart> parts,
float elapsed)
ctMotionUpdateHierarchyMeshesAt
fn ctMotionUpdateHierarchyMeshesAt(
CtMotionClip clip,
array<CtMotionMeshPart> parts,
array<string> parents,
float elapsed,
Vec3 origin)
viewportTransformTranslate infallible
infallible fn viewportTransformTranslate() -> int
viewportTransformScale infallible
infallible fn viewportTransformScale() -> int
viewportTransformRotate infallible
infallible fn viewportTransformRotate() -> int
viewportAtan2 infallible
infallible fn viewportAtan2(float y, float x) -> float
viewportSnap infallible
infallible fn viewportSnap(float value, float step) -> float
viewportDirectedAxisParameter infallible
infallible fn viewportDirectedAxisParameter(
PreviewViewportRay ray,
float originX,
float originY,
float originZ,
float axisX,
float axisY,
float axisZ,
float normalX,
float normalY,
float normalZ) -> ViewportAxisParameter
viewportAxisParameter infallible
infallible fn viewportAxisParameter(
PreviewViewportRay ray,
int axis,
float originX,
float originY,
float originZ,
float normalX,
float normalY,
float normalZ) -> ViewportAxisParameter
viewportRotationPointDirected infallible
infallible fn viewportRotationPointDirected(
PreviewViewportRay ray,
float axisX,
float axisY,
float axisZ,
float originX,
float originY,
float originZ) -> ViewportRotationPoint
viewportRotationDragBegin infallible
infallible fn viewportRotationDragBegin(
PreviewViewportRay ray,
int axis,
float originX,
float originY,
float originZ,
float originalValue) -> ViewportRotationDrag
viewportRotationDragBeginDirected infallible
infallible fn viewportRotationDragBeginDirected(
PreviewViewportRay ray,
int axis,
float axisX,
float axisY,
float axisZ,
float originX,
float originY,
float originZ,
float originalValue) -> ViewportRotationDrag
viewportRotationDragValue infallible
infallible fn viewportRotationDragValue(
ViewportRotationDrag drag,
PreviewViewportRay ray) -> ViewportAxisParameter
viewportAxisDragBegin infallible
infallible fn viewportAxisDragBegin(
PreviewViewportRay ray,
int axis,
float originX,
float originY,
float originZ,
float originalValue) -> ViewportAxisDrag
viewportAxisDragBeginDirected infallible
infallible fn viewportAxisDragBeginDirected(
PreviewViewportRay ray,
int axis,
float axisX,
float axisY,
float axisZ,
float originX,
float originY,
float originZ,
float originalValue) -> ViewportAxisDrag