The result(s) of calling pick (see below).
This may be a broadcast stream, so you should ensure you have subscribed to this stream before calling pick.
If pick is called without an active subscription to this stream, the results will be silently discarded.
An entity will only be animatable after an animation component is attached.
Any calls to playAnimation/setBoneAnimation/setMorphAnimation will have no visual effect until addAnimationComponent has been called on the instance.
Enqueues and plays the animation for the specified bone(s).
By default, frame data is interpreted as being in parent bone space;
a 45 degree around Y means the bone will rotate 45 degrees around the
Y axis of the parent bone in its current orientation.
(i.e NOT the parent bone's rest position!).
Currently, only Space.ParentBone and Space.Model are supported; if you want
to transform to another space, you will need to do so manually.
Makes entity collidable.
This allows you to call testCollisions with any other entity ("entity B") to see if entity has collided with entity B. The callback will be invoked if so.
Alternatively, if affectsTransform is true and this entity collides with another entity, any queued position updates to the latter entity will be ignored.
Add a light to the scene.
See LightManager.h for details
Note that sunAngularRadius is in degrees,
whereas spotLightConeInner and spotLightConeOuter are in radians
Removes/destroys all renderable entities from the scene (including cameras).
All ThermionEntity handles will no longer be valid after this method is called; ensure you immediately discard all references to all entities once this method is complete.
Get the camera's culling frustum in world space. Returns a (vector_math) Frustum instance where plane0-plane6 define the left, right, bottom, top, far and near planes respectively.
See Camera.h and (filament) Frustum.h for more details.
Finds the child entity named childName associated with the given parent.
Usually, parent will be the return value from loadGlb/loadGltf and childName will be the name of a node/mesh.
Gets the inverse bind (pose) matrix for the bone.
Note that parent must be the ThermionEntity returned by loadGlb/loadGltf, not any other method (getChildEntity etc).
This is because all joint information is internally stored with the parent entity.
If meshName is provided, hide the node meshName under entity, otherwise hide the root node for entity.
The entity still exists in memory, but is no longer being rendered into the scene. Call reveal to re-commence rendering.
Load the .gltf asset at the given path and insert into the scene.
relativeResourcePath is the folder path where the glTF resources are stored;
this is usually the parent directory of the .gltf file itself.
Loads an image-based light from the specified path at the given intensity.
Only one IBL can be active at any given time; if an IBL has already been loaded, it will be replaced.
Used to select the entity in the scene at the given viewport coordinates.
Called by FilamentGestureDetector on a mouse/finger down event. You probably don't want to call this yourself.
This is asynchronous and will require 2-3 frames to complete - subscribe to the pickResult stream to receive the results of this method.
x and y must be in local logical coordinates (i.e. where 0,0 is at top-left of the ThermionWidget).
Queues an update to the worldspace position for entity to {x,y,z}.
The actual update will occur on the next frame, and will be subject to collision detection.
Removes the collision component from entity, meaning this will no longer be tested when testCollisions or queuePositionUpdate is called with another entity.
Removes/destroys the specified entity from the scene.
entity will no longer be a valid handle after this method is called; ensure you immediately discard all references once this method is complete.
Set the background image to path (which should have a file extension .png, .jpg, or .ktx).
This will be rendered at the maximum depth (i.e. behind all other objects including the skybox).
If fillHeight is false, the image will be rendered at its original size. Note this may cause issues with pixel density so be sure to specify the correct resolution
If fillHeight is true, the image will be stretched/compressed to fit the height of the viewport.
Moves the background image to the relative offset from the origin (bottom-left) specified by x and y.
If clamp is true, the image cannot be positioned outside the bounds of the viewport.
Sets the options for manipulating the camera via the viewport.
ManipulatorMode.FREE_FLIGHT and ManipulatorMode.MAP are currently unsupported and will throw an exception.
Animate the morph targets in entity. See MorphTargetAnimation for an explanation as to how to construct the animation frame data.
This method will check the morph target names specified in animation against the morph target names that actually exist exist under meshName in entity,
throwing an exception if any cannot be found.
It is permissible for animation to omit any targets that do exist under meshName; these simply won't be animated.
Set the weights for all morph targets in entity to weights.
Note that weights must contain values for ALL morph targets, but no exception will be thrown if you don't do so (you'll just get incorrect results).
If you only want to set one value, set all others to zero (check getMorphTargetNames if you need the get a list of all morph targets).
IMPORTANT - this accepts the actual ThermionEntity with the relevant morph targets (unlike getMorphTargetNames, which uses the parent entity and the child mesh name).
Use getChildEntityByName if you are setting the weights for a child mesh.
Enables/disables frustum culling. Currently we don't expose a method for manipulating the camera projection/culling matrices so this is your only option to deal with unwanted near/far clipping.
Test all collidable entities against this entity to see if any have collided.
This method returns void; the relevant callback passed to addCollisionComponent will be fired if a collision is detected.
Updates the bone matrices for entity (which must be the ThermionEntity
returned by loadGlb/loadGltf).
Under the hood, this just calls updateBoneMatrices on the Animator
instance of the relevant FilamentInstance (which uses the local
bone transform and the inverse bind matrix to set the bone matrix).