Class SceneRenderer

java.lang.Object
buildengine.engine.stage.scene.renderer.SceneRenderer
All Implemented Interfaces:
Renderer
Direct Known Subclasses:
DefaultSceneRenderer

public abstract class SceneRenderer extends Object implements Renderer
Scene renderer is responsible for rendering a scene and its components. Default implementation provided.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Scene
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Draw the default debug lines around actors for Visibility Bounds and Collision Bounds
    protected void
    drawSprite(Drawable drawable)
    Draw a sprite to the screen, taking counterpoint-perspective and camera into consideration.
    protected boolean
    isVisible(Rectangle rectangle)
    Checking if a rectangle intersects with the camera using lazy intersect.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface buildengine.engine.graphics.Renderer

    render
  • Field Details

    • scene

      protected final Scene scene
  • Constructor Details

    • SceneRenderer

      protected SceneRenderer(Scene scene)
  • Method Details

    • drawSprite

      protected void drawSprite(Drawable drawable)
      Draw a sprite to the screen, taking counterpoint-perspective and camera into consideration. To be more specific, using the actor's location, subtracting half the size, and using that as the draw position. If the sprite or parts of the sprite (in case of REPEAT draw mode) are not visible to the camera object, it will not be drawn
      Parameters:
      drawable - The drawable to be drawn
    • drawDebugLines

      protected void drawDebugLines(Actor actor)
      Draw the default debug lines around actors for Visibility Bounds and Collision Bounds
      See Also:
    • isVisible

      protected boolean isVisible(Rectangle rectangle)
      Checking if a rectangle intersects with the camera using lazy intersect.
      Parameters:
      rectangle - The rectangle to check
      Returns:
      true - if the rectangle intersects.