h3d.scene.Scene is the root class for a 3D scene. All root objects are added to it before being drawn on screen.
addEventListener(f:Event ‑> Void):Void
Add an event listener that will capture all events not caught by an h2d.Interactive
Perform a rendering with
RendererContext.computingStatic=true, allowing the computation of static shadow maps, etc.
Free the GPU memory for this Scene and its children
Use GPU rendering to pick a model at the given pixel position. hardwarePick() will check all scene visible meshes bounds against a ray cast with current camera, then draw them into a 1x1 pixel texture with a specific shader. The texture will then be read and the color will identify the object that was rendered at this pixel. This is a very precise way of doing scene picking since it performs exactly the same transformations (skinning, custom shaders, etc.) but might be more costly than using CPU colliders. Please note that when done during/after rendering, this might clear the screen on some platforms so it should always be done before rendering.
removeEventListener(f:Event ‑> Void):Bool
Remove a previously added event listener, return false it was not part of our event listeners.
Serialize the scene content as HSD bytes (see hxd.fmt.hsd package). Requires -lib hxbit
Before render() or sync() are called, allow to set how much time has elapsed (in seconds) since the last frame in order to update scene animations. This is managed automatically by hxd.App
Synchronize the scene without rendering, updating all objects and animations by the given amount of time, in seconds.