DrawablePlane

Extends: BGE.Image

Used to draw a "infinite" plane in 3d space Ideally used for a ground or floor

Properties

  • plane (BGE.Math.Plane)

Constructor

new DrawablePlane( owner: BGE.GameEntity, region: roRegion, plane: BGE.Math.Plane, args?: object, ): DrawablePlane

Parameters

  • owner (BGE.GameEntity)
  • region (roRegion)
  • plane (BGE.Math.Plane)
  • args (object, optional, default: "{}")

Instance Methods

addToScene(rendererObj: Renderer): void

Parameters

Returns

  • void

getPretranslation(): BGE.Math.Vector

Inherited from BGE.Image#getPretranslation

Returns

  • BGE.Math.Vector

setAnchor(x: float, y: float): void

Inherited from BGE.Image#setAnchor

Sets the normalized anchor point this drawable pivots around. (0,0) is top left (the default), (0.5, 1) is bottom-center, etc. This isn't movement, so it can't be picked up by the per-frame MotionChecker dirty-check - invalidateGeometry() tells the renderer to recompute this drawable's projected geometry even though nothing moved.

Parameters

  • x (float)
  • y (float)

Returns

  • void

applyAnchorToRegion(): void

protected

Inherited from BGE.Image#applyAnchorToRegion

Overrides: BGE.Image#applyAnchorToRegion

Pushes the anchor-derived pretranslation onto the region so Roku's own DrawObject/ DrawScaledObject picks it up natively in the plain 2D draw path - see getPretranslation(), which reads it straight back off the region.

Returns

  • void

addToScene(rendererObj: Renderer): void

Inherited from BGE.DrawablePlane#addToScene

Overrides: BGE.Image#addToScene

Adds the Drawable object to the given render scene.

Parameters

Returns

  • void

removeFromScene(rendererScene: Renderer): void

Inherited from BGE.Drawable#removeFromScene

Overrides: BGE.Image#removeFromScene

Parameters

Returns

  • void

computeTransformationMatrix(): void

Inherited from BGE.Drawable#computeTransformationMatrix

Overrides: BGE.Image#computeTransformationMatrix

Returns

  • void

invalidateGeometry(): void

Inherited from BGE.Drawable#invalidateGeometry

Overrides: BGE.Image#invalidateGeometry

Marks this drawable's geometry as changed, so the renderer recomputes its world and canvas geometry on the next frame. Movement is dirty-checked automatically (see MotionChecker), but a change in shape - resizing a rectangle, replacing a polygon's points - isn't visible to that check and has to be declared.

Returns

  • void

getAnchor(): BGE.Math.Vector

Inherited from BGE.Drawable#getAnchor

Overrides: BGE.Image#getAnchor

Returns

  • BGE.Math.Vector

movedLastFrame(includeOwner?: boolean): boolean

Inherited from BGE.Drawable#movedLastFrame

Overrides: BGE.Image#movedLastFrame

Parameters

  • includeOwner (boolean, optional, default: false)

Returns

  • boolean

update(): void

Inherited from BGE.Drawable#update

Overrides: BGE.Image#update

Returns

  • void

onResume(pausedTimeMs: integer): void

Inherited from BGE.Drawable#onResume

Overrides: BGE.Image#onResume

Parameters

  • pausedTimeMs (integer)

Returns

  • void

isEnabled(): boolean

Inherited from BGE.Drawable#isEnabled

Overrides: BGE.Image#isEnabled

Returns

  • boolean

getSize(): SizeWH

Inherited from BGE.Drawable#getSize

Overrides: BGE.Image#getSize

Returns

getDrawnSize(): SizeWH

Inherited from BGE.Drawable#getDrawnSize

Overrides: BGE.Image#getDrawnSize

Returns

getWorldPosition(): BGE.Math.Vector

Inherited from BGE.Drawable#getWorldPosition

Overrides: BGE.Image#getWorldPosition

Returns

  • BGE.Math.Vector

getFillColorRGBA(ignoreColor?: boolean): integer

Inherited from BGE.Drawable#getFillColorRGBA

Overrides: BGE.Image#getFillColorRGBA

Parameters

  • ignoreColor (boolean, optional, default: false)

Returns

  • integer

getOutlineColorRGBA(ignoreColor?: boolean): integer

Inherited from BGE.Drawable#getOutlineColorRGBA

Overrides: BGE.Image#getOutlineColorRGBA

Parameters

  • ignoreColor (boolean, optional, default: false)

Returns

  • integer

hasOutline(): boolean

Inherited from BGE.Drawable#hasOutline

Overrides: BGE.Image#hasOutline

Whether this drawable should be stroked with an outline, which is the case once outlineRGBA has been given a color. Setting outlineRGBA is what turns outline drawing on - there is no separate flag - so this is the check the renderer uses to skip all outline work for the (common) drawables that don't want one.

Returns

  • boolean — true if an outline should be drawn for this drawable

getSceneObjectName(extraBit?: string): string

protected

Inherited from BGE.Drawable#getSceneObjectName

Overrides: BGE.Image#getSceneObjectName

Parameters

  • extraBit (string, optional, default: "\"\"")

Returns

  • string

addSceneObjectToRenderer( sceneObj: SceneObject, renderScene: Renderer, ): SceneObject

protected

Inherited from BGE.Drawable#addSceneObjectToRenderer

Overrides: BGE.Image#addSceneObjectToRenderer

Parameters

Returns

drawRegionToCanvas( region: ifDraw2d, additionalRotation?: BGE.Math.Vector, ignoreColor?: boolean, drawTo?: ifDraw2D, ): void

protected

Inherited from BGE.Drawable#drawRegionToCanvas

Overrides: BGE.Image#drawRegionToCanvas

Parameters

  • region (ifDraw2d)
  • additionalRotation (BGE.Math.Vector, optional, default: "invalid")
  • ignoreColor (boolean, optional, default: false)
  • drawTo (ifDraw2D, optional, default: "invalid")

Returns

  • void

forEachSceneObject( operation: function, context: roAssociativeArray, ): void

Inherited from BGE.Drawable#forEachSceneObject

Overrides: BGE.Image#forEachSceneObject

Parameters

  • operation (function)
  • context (roAssociativeArray)

Returns

  • void

getPretranslation(): BGE.Math.Vector

Inherited from BGE.Image#getPretranslation

Returns

  • BGE.Math.Vector

setAnchor(x: float, y: float): void

Inherited from BGE.Image#setAnchor

Sets the normalized anchor point this drawable pivots around. (0,0) is top left (the default), (0.5, 1) is bottom-center, etc. This isn't movement, so it can't be picked up by the per-frame MotionChecker dirty-check - invalidateGeometry() tells the renderer to recompute this drawable's projected geometry even though nothing moved.

Parameters

  • x (float)
  • y (float)

Returns

  • void

addToScene(rendererObj: Renderer): void

Inherited from BGE.DrawablePlane#addToScene

Overrides: BGE.Image#addToScene

Adds the Drawable object to the given render scene.

Parameters

Returns

  • void