SceneObjectWalls

Extends: SceneObject

Draws a DrawableWalls: walks its WallsView each time the camera changes, then draws the visible strips far to near.

Properties

  • drawable (DrawableWalls)
  • view (BGE.WallsView) — This frame's strips and the depth windows that hide things behind walls.
  • raysLastFrame (integer) — Rays in the fan and strips drawn by the last draw, and how many of those were fog strips
  • stripsDrawnLastFrame (integer)
  • fogStripsDrawnLastFrame (integer)

Constructor

new SceneObjectWalls( name: string, drawableObj: DrawableWalls, ): SceneObjectWalls

Parameters


Instance Methods

drawsInFixedStage(): boolean

Returns

  • boolean

participatesInOverlapDetection(): boolean

Returns

  • boolean

participatesInDistanceFade(): boolean

Returns

  • boolean

isEligibleForStaticBsp(): boolean

Returns

  • boolean

isPotentiallyOnScreen(cameraObj: Camera): boolean

protected

Parameters

Returns

  • boolean

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

protected

Parameters

Returns

  • boolean

updateView(rendererObj: Renderer): boolean

Walks the view for rendererObj's camera now. The renderer does this each frame the camera changes; call it yourself only in tests.

Parameters

Returns

  • boolean — false with a Camera2d, or a camera looking straight up or down

prepareView(rendererObj: Renderer): boolean

Walks the view now unless it was already walked for the camera as it is, so its pieces and surfaces (WallsView.recordSurfaces) can be read before render(), which then reuses the walk. Call after Renderer.setupCameraForFrame().

Parameters

Returns

  • boolean — false with a Camera2d, or a camera looking straight up or down

getWalkReach(camera: Camera3d): float

getWalkFar() as a multiple of the draw distance: past it, the walls can't hide anything.

Parameters

Returns

  • float

redrawStrips( rendererObj: Renderer, firstRay: integer, lastRay: integer, nearerThan: float, ): void

Draws again, far to near, the strips drawn this frame on rays firstRay..lastRay nearer than nearerThan - to put walls back over something drawn after them.

Parameters

  • rendererObj (Renderer)
  • firstRay (integer)
  • lastRay (integer)
  • nearerThan (float) — forward depth

Returns

  • void

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

protected

Parameters

Returns

  • boolean