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
participatesInOverlapDetection(): boolean
getPositionsForFrustumCheck() is unoverridden here, so it inherits the base class's single-point default - that can never reach BGE.DepthSort. MIN_VALID_HULL_POINTS (3), so this object's hull can never pass the narrow phase anyway (see the base class's doc comment for why that means this is a pure cost avoidance, not a tolerated visual error - matching SceneObjectLine's own participatesInOverlapDetection() override for the same reason). Making the exclusion explicit here rather than relying on it being an accidental side effect of not overriding getPositionsForFrustumCheck() also buys the same broad-phase cost-avoidance benefit the line exclusion does.
Returns
boolean
isPotentiallyOnScreen(cameraObj: Camera): boolean
Parameters
cameraObj(Camera)
Returns
boolean
findCanvasPosition(
rendererObj: Renderer,
drawMode: SceneObjectDrawMode,
): boolean
Parameters
rendererObj(Renderer)drawMode(SceneObjectDrawMode)
Returns
boolean
performDraw(
rendererObj: Renderer,
drawMode: SceneObjectDrawMode,
): boolean
Perform any drawing logic for the object Override this function in subclasses to provide specific behavior
Parameters
rendererObj(Renderer)drawMode(SceneObjectDrawMode)
Returns
boolean— True if the draw call was successful