BGE/RendererHelpers
Alias: BGE.RendererHelpers
Static Methods
createTriangleBitmap(
bitmap: ifDraw2d,
points: dynamic,
): TriangleBitmap
Parameters
bitmap(ifDraw2d)points(dynamic)
Returns
createRegionWithId(region: roRegion, id?: string): RegionWithId
Parameters
region(roRegion)id(string, optional, default: "\"\"")
Returns
growOrClearBitmap(
existing: roBitmap,
width: integer,
height: integer,
): roBitmap
Returns existing, cleared and ready for reuse, if it's already at least widthxheight - or a freshly allocated bitmap otherwise. Grow-only reuse avoids a fresh CreateObject() every single frame an object's projected size merely shifts slightly, only reallocating once the existing bitmap has actually been outgrown - shared by SceneObjectBillboard.createTempBitmap and SceneObjectModel.drawFaceWithReuse.
Parameters
existing(roBitmap) — the previously cached bitmap, or invalid if there is none yetwidth(integer)height(integer)
Returns
roBitmap— invalid if allocation failed
Other
TriangleBitmap
Properties
bitmap(ifDraw2d)triangle(BGE.Math.Triangle)scratchRegion(BGE.ScratchRegion)scale(BGE.Math.Vector)
RegionWithId
Properties
region(roRegion)id(string)
FaceRasterCache
One SceneObjectModel face's own small rendered raster, reused as-is (repositioned to wherever the face's projected position actually is this frame, content unchanged) for a bounded number of frames before a real redraw - see issue #163. Only the pixel CONTENT is ever stale, never the blit position, so there's no geometric transform to get right here - a stale frame just shows this face's texture at last redraw's orientation, correctly placed at this frame's position.
Properties
bitmap(roBitmap)staleFrameCount(integer)triangleAtCapture(dynamic) — This face's own 3 canvas-space vertices as of the last real redraw - compared ' against the current frame's vertices to bound how far a face may drift while ' still reusing stale pixel content (see SceneObjectModel.drawFaceWithReuse()).
LimitPointMappings
These are limits in screen space origin top /
/
/ >right left < / \ / \ / bottom opposite
Baseline angle is the average angle from [left-right, top-bottom]
Parameters
points(dynamic)screenSpace(boolean, optional, default: true)
Properties
totalPointCount(integer)leftIndex(integer)rightIndex(integer)topIndex(integer)bottomIndex(integer)left(BGE.Math.Vector)right(BGE.Math.Vector)top(BGE.Math.Vector)bottom(BGE.Math.Vector)origin(BGE.Math.Vector)opposite(BGE.Math.Vector)baselineAngle(float)width(float)height(float)
Returns
BGE.RendererHelpers.LimitPointMappings
LimitPoints2d
Properties
left(BGE.Math.Vector)right(BGE.Math.Vector)top(BGE.Math.Vector)bottom(BGE.Math.Vector)