Skip to main content

cturtle/ui/btlib/engine

include "cturtle/ui/btlib/engine";

Types​

CtAnimationMesh​

Object

FieldTypeWritableDescription
nodeintyes
entityEntityyes
restCtMotionPoseyes

ConsoleField​

Object

FieldTypeWritableDescription
inputTextInputyes
tokenintyes
draftstringyes
draftCursorintyes
draftAnchorintyes
draftScrollfloatyes
historyOffsetintyes

takeCommand​

fn takeCommand() -> string

previousCommand​

fn previousCommand()

nextCommand​

fn nextCommand()

keyDown​

fn keyDown(int key, int modifiers)

Console​

Object

FieldTypeWritableDescription
libUiLibyes
panelUiElementyes
panelIdintyes
outputUiElementyes
outputTokenintyes
rowsarray<UiElement>yes
rowCountintyes
scrollbackarray<string>yes
scrollOffsetintyes
fieldConsoleFieldyes
openboolyes
screenWidthfloatyes
screenHeightfloatyes
panelHeightfloatyes
lineHeightfloatyes

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

FieldTypeWritableDescription
directionXfloatyes
directionYfloatyes
directionZfloatyes
distancefloatyes

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

FieldTypeWritableDescription
xfloatyes
yfloatyes
zfloatyes

PreviewViewportRay​

Object

FieldTypeWritableDescription
originXfloatyes
originYfloatyes
originZfloatyes
directionXfloatyes
directionYfloatyes
directionZfloatyes

PreviewViewportInteractionNothing​

Object

previewViewportPressed infallible​

infallible fn previewViewportPressed(PreviewViewportRay ray) -> bool

previewViewportDragged infallible​

infallible fn previewViewportDragged(PreviewViewportRay ray)

previewViewportReleased infallible​

infallible fn previewViewportReleased()

PreviewViewport​

Object

FieldTypeWritableDescription
libUiLibyes
themeThemeyes
rootUiElementyes
imageUiElementyes
hintUiElementyes
nativeViewportRenderViewportyes
cameraHandleintyes
lightingScopeIdintyes
visibleboolyes
tokenintyes
cameraPreviewOrbityes
planarboolyes
planarSpanfloatyes
framedRadiusfloatyes
planarFitboolyes
boxFramingboolyes
frameXfloatyes
frameYfloatyes
frameZfloatyes
frameHalfXfloatyes
frameHalfYfloatyes
frameHalfZfloatyes
adaptiveClippingboolyes
clipXfloatyes
clipYfloatyes
clipZfloatyes
clipRadiusfloatyes
nearClipfloatyes
appliedNearClipfloatyes
appliedFarClipfloatyes
appliedSpanfloatyes
targetXfloatyes
targetYfloatyes
targetZfloatyes
framedDistancefloatyes
farClipfloatyes
maximumDistancefloatyes
logicalXfloatyes
logicalYfloatyes
logicalWidthfloatyes
logicalHeightfloatyes
gridVisibleboolyes
gridSpacingfloatyes
pointerTravelfloatyes
panGestureboolyes
interactionCapturedboolyes
suppressClickboolyes
focusedboolyes
clickHandlerPreviewViewportClickHandleryes
interactionHandlerPreviewViewportInteractionHandleryes
cancelHandlerPreviewViewportCancelHandleryes
frameHandlerPreviewViewportFrameHandleryes

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

FieldTypeWritableDescription
viewportPreviewViewportyes

comboSelected infallible​

infallible fn comboSelected(int index, string value)

CtMotionMeshPart​

Object

FieldTypeWritableDescription
namestringyes
entityEntityyes
restCtMotionPoseyes

ViewportAxisParameter​

Object

FieldTypeWritableDescription
hitboolyes
valuefloatyes

ViewportAxisDrag​

Object

FieldTypeWritableDescription
activeboolyes
axisintyes
originXfloatyes
originYfloatyes
originZfloatyes
axisXfloatyes
axisYfloatyes
axisZfloatyes
normalXfloatyes
normalYfloatyes
normalZfloatyes
startParameterfloatyes
originalValuefloatyes
currentValuefloatyes

ViewportRotationPoint​

Object

FieldTypeWritableDescription
hitboolyes
distancefloatyes
xfloatyes
yfloatyes
zfloatyes

ViewportRotationDrag​

Object

FieldTypeWritableDescription
activeboolyes
axisintyes
originXfloatyes
originYfloatyes
originZfloatyes
axisXfloatyes
axisYfloatyes
axisZfloatyes
startXfloatyes
startYfloatyes
startZfloatyes
originalValuefloatyes
accumulatedValuefloatyes
currentValuefloatyes

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