SceneObjectSkybox

Extends: SceneObject

Properties


Constructor

new SceneObjectSkybox( name: string, drawableObj: DrawableSkybox, ): SceneObjectSkybox

Parameters


Instance Methods

participatesInOverlapDetection(): boolean

Returns

  • boolean

isPotentiallyOnScreen(cameraObj: Camera): boolean

protected

Parameters

Returns

  • boolean

updateWorldPosition(drawMode: SceneObjectDrawMode): boolean

protected

Parameters

Returns

  • boolean

arcsinDegrees(sinValue: float): float

BrighterScript/BrightScript has no native arcsine - asin(x) = atan2(x, sqrt(1-x^2)) for x in [-1, 1] is the standard identity, reusing the engine's existing atan2. Exposed (not private) so its correctness can be tested directly, matching SceneObjectPlane.getRollCanvasSize()'s precedent for pure-math helpers.

Parameters

  • sinValue (float) — the sine of an angle, clamped to [-1, 1]

Returns

  • float — the angle in degrees whose sine is sinValue

computeVisibleBand( camera: Camera3d, destWidth: float, destHeight: float, ): object

Camera3d.orientation itself is unaffected by roll (rolling spins the camera around its own forward axis, which doesn't change that axis's direction) - so yaw and pitch can be read directly off orientation with no roll-aware "level" variant needed, unlike SceneObjectPlane's horizon math. Roll is applied separately, as a final image rotation (see the roll path in performDraw, Task 3).

Parameters

  • camera (Camera3d)
  • destWidth (float) — the destination surface's width in pixels
  • destHeight (float) — the destination surface's height in pixels

Returns

  • object — {leftX, topY, cropHeight, scaleX, scaleY, textureWidth, textureHeight}

findCanvasPosition( rendererObj: Renderer, drawMode: SceneObjectDrawMode, ): boolean

protected

Parameters

Returns

  • boolean

getRollCanvasSize(frameSize: BGE.Math.Vector): float

Sized to at least the camera frame's diagonal, so a composite rendered into a canvasSize x canvasSize square can be rotated by any angle without exposing an empty corner once it's cropped back down to the real frame - mirrors SceneObjectPlane.getRollCanvasSize() exactly (same underlying geometry problem).

Parameters

  • frameSize (BGE.Math.Vector)

Returns

  • float

performDraw( rendererObj: BGE.Renderer, drawMode: SceneObjectDrawMode, ): boolean

protected

Parameters

Returns

  • boolean

renderNow(rendererObj: BGE.Renderer): boolean

Draws this skybox against rendererObj's current camera right now, bypassing the base SceneObject update()/draw() pipeline and Renderer.render() entirely - for a caller that wants to draw a skybox immediately without registering it with a renderer (e.g. the rendererTest SkyboxTest demo). It applies the same Camera2d/Camera3d gate isPotentiallyOnScreen() would.

Parameters

Returns

  • boolean — true if the skybox was actually drawn