Class UI3dComponent

All Implemented Interfaces:
LXLoopTask
Direct Known Subclasses:
UIAxes, UIGrid, UINormalizationBounds, UIPointCloud, UISoundStage

public abstract class UI3dComponent extends UIObject
A component in a UI3dContext. Draws itself and may draw children.
  • Constructor Details

    • UI3dComponent

      public UI3dComponent()
  • Method Details

    • contains

      public boolean contains(float x, float y)
      Description copied from class: UIObject
      Whether the given point is contained by this object
      Overrides:
      contains in class UIObject
      Parameters:
      x - x-coordinate
      y - y-coordinate
      Returns:
      True if the object contains this point
    • getWidth

      public float getWidth()
      Specified by:
      getWidth in class UIObject
    • getHeight

      public float getHeight()
      Specified by:
      getHeight in class UIObject
    • getContext

      public UI3dContext getContext()
    • addChild

      public final UI3dComponent addChild(UI3dComponent child)
      Adds a child to this component
      Parameters:
      child - Child component
      Returns:
      this
    • removeChild

      public final UI3dComponent removeChild(UI3dComponent child)
      Removes a child from this component
      Parameters:
      child - Child component
      Returns:
      this
    • draw

      public final void draw(UI ui, View view)
      Draw the given component into the View context
      Parameters:
      ui - UI context
      view - View to draw into
    • onDraw

      protected void onDraw(UI ui, View view)
      Subclasses should override this method with specific drawing routings
      Parameters:
      ui - UI
      view - View to draw into
    • onCameraChanged

      protected void onCameraChanged(UI ui, UI3dContext context)
      Invoked when the camera position of the parent context has changed
      Parameters:
      ui - UI
      context - Context being rendered into