SceneObjectPlane

Extends: SceneObject

Properties


Constructor

new SceneObjectPlane( name: string, drawableObj: DrawablePlane, ): SceneObjectPlane

Parameters


Instance Methods

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 - see performDraw(). The +2 is slack for the sqrt/int rounding, not a precision requirement.

Parameters

  • frameSize (BGE.Math.Vector)

Returns

  • float

getRollCanvasSizeFor(camera: Camera3d): float

getRollCanvasSize() for a camera: a shear-pitched one turns its image about the moved image centre (Camera3d.getPrincipalY()), so the square must reach the frame's corners from there.

Parameters

Returns

  • float

participatesInOverlapDetection(): boolean

Returns

  • boolean

objMovedInRelationToCamera(cameraObj: Camera): boolean

protected

Parameters

Returns

  • boolean

isPotentiallyOnScreen(cameraObj: Camera): boolean

protected

Parameters

Returns

  • boolean

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

protected

Parameters

Returns

  • boolean

getLightTintRGBA(rendererObj: BGE.Renderer): integer

The color the plane is lit by, short of any light pools. Public for tests/telemetry only.

Parameters

Returns

  • integer — packed RGBA, -1 (unchanged) when unlit

getCompositeTintRGBA(rendererObj: BGE.Renderer): integer

The color the cached composite is blitted with: its lighting, unless that's drawn in. Public for tests/telemetry only.

Parameters

Returns

  • integer — packed RGBA, -1 (unchanged) when unlit or baked in

getLightPoolCountLastDraw(): integer

How many light pools the cached drawing shows. Public for tests/telemetry only.

Returns

  • integer

getLightBakeCount(): integer

How many times a staticImage plane's lit texture has been built. Public for tests/telemetry only.

Returns

  • integer

getBakedLightPoolCount(): integer

How many light pools the current lit texture shows. Public for tests/telemetry only.

Returns

  • integer

getBakedLightPools( rendererObj: BGE.Renderer, width: float, height: float, ): Array.<PlaneLightPoolPlacement>

The light pools that reach a width x height texture, placed in its texels. Public for tests only.

Parameters

Returns

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

protected

Parameters

Returns

  • boolean

getTexelScale(): float

World units per texel: the smaller of the drawable's x/y scale. The rest of a non-square scale is stretched into the source texture (see getTextureStretch()), since the texture warp rotates then scales and can't represent a shear.

Returns

  • float

getTextureStretch(): BGE.Math.Vector

How much the source texture is stretched along x and y on top of getTexelScale() - 1 on the smaller axis, and 1 on both for a square scale.

Returns

  • BGE.Math.Vector

getTextureSize(): SizeWH

The texture's size in texels: its region stretched by getTextureStretch().

Returns

worldPointToTexel(worldPoint: BGE.Math.Vector): BGE.Math.Vector

Where a world point on the plane lands in the texture, in texels.

Parameters

  • worldPoint (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

getWorldDrawDistance(camera: Camera3d): float

How far this plane draws, in world units. Its bitmaps are sized in texels, so a coarser texture reaches farther (see Camera3d.getPlaneDrawDistanceForTexelScale()).

Parameters

Returns

  • float

drawsInFixedStage(): boolean

Returns

  • boolean

participatesInDistanceFade(): boolean

Returns

  • boolean