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 stripsstripsDrawnLastFrame(integer)fogStripsDrawnLastFrame(integer)
Constructor
new SceneObjectWalls(
name: string,
drawableObj: DrawableWalls,
): SceneObjectWallsParameters
name(string)drawableObj(DrawableWalls)
Instance Methods
drawsInFixedStage(): boolean
Returns
boolean
participatesInOverlapDetection(): boolean
Returns
boolean
participatesInDistanceFade(): boolean
Returns
boolean
isEligibleForStaticBsp(): boolean
Returns
boolean
isPotentiallyOnScreen(cameraObj: Camera): boolean
Parameters
cameraObj(Camera)
Returns
boolean
findCanvasPosition(
rendererObj: Renderer,
drawMode: SceneObjectDrawMode,
): boolean
Parameters
rendererObj(Renderer)drawMode(SceneObjectDrawMode)
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
rendererObj(Renderer)
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
rendererObj(Renderer)
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
camera(Camera3d)
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
Parameters
rendererObj(Renderer)drawMode(SceneObjectDrawMode)
Returns
boolean