SceneObjectPlane
Extends: SceneObject
Properties
drawable(DrawablePlane)
Constructor
new SceneObjectPlane(
name: string,
drawableObj: DrawablePlane,
): SceneObjectPlaneParameters
name(string)drawableObj(DrawablePlane)
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
camera(Camera3d)
Returns
float
participatesInOverlapDetection(): boolean
Returns
boolean
objMovedInRelationToCamera(cameraObj: Camera): boolean
Parameters
cameraObj(Camera)
Returns
boolean
isPotentiallyOnScreen(cameraObj: Camera): boolean
Parameters
cameraObj(Camera)
Returns
boolean
performDraw(
rendererObj: BGE.Renderer,
drawMode: SceneObjectDrawMode,
): boolean
Parameters
rendererObj(BGE.Renderer)drawMode(SceneObjectDrawMode)
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
rendererObj(BGE.Renderer)
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
rendererObj(BGE.Renderer)
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
rendererObj(BGE.Renderer)width(float)height(float)
Returns
Array.<PlaneLightPoolPlacement>
findCanvasPosition(
rendererObj: Renderer,
drawMode: SceneObjectDrawMode,
): boolean
Parameters
rendererObj(Renderer)drawMode(SceneObjectDrawMode)
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
camera(Camera3d)
Returns
float
drawsInFixedStage(): boolean
Returns
boolean
participatesInDistanceFade(): boolean
Returns
boolean