Faze
v2.0.0-pre
v2.0.0-pre
  • Introduction
  • Getting Started
  • Abstractions
    • IPipeline
    • IGameState
    • IPlayer
    • Rendering
      • ITreePainter
      • IPaintedTreeRenderer
      • IColorInterpolator
  • Engine
    • Agents
  • Rendering
    • Tree Renderers
      • SquareTreeRenderer
      • SliceAndDiceTreeRenderer
    • Color Interpolators
  • Concept
    • Tree Rendering
    • Real-time Rendering
  • Blog
    • Visualising games as fractals
    • Visualising player choice
  • Examples
    • 8 Queens Problem
    • Chess Pieces
    • Gallery
  • Research
    • Renderers
      • Square Tree Renderer
      • Circle Edge Renderer
      • Compressed Square Tree Renderer
  • GitHub Repository
Powered by GitBook
On this page
  • Members
  • GetVisible
  • Draw
  • Save

Was this helpful?

  1. Abstractions
  2. Rendering

IPaintedTreeRenderer

PreviousITreePainterNextIColorInterpolator

Last updated 3 years ago

Was this helpful?

A pained tree renderer is responsible for producing images given a 'painted tree'. A painted tree is a tree that has a colour value at each node. If the renderer supports viewports, it is also possible for the renderer to trim a given tree to only its visible nodes - see for more information.

    public interface IPaintedTreeRenderer
    {
        Tree<T> GetVisible<T>(Tree<T> tree);
        void Draw(Tree<Color> tree);
        void Save(Stream stream);
    }

Members

GetVisible

Tree<T> GetVisible<T>(Tree<T> tree);

Returns a new tree which excludes any nodes/branches that will not be rendered according to the current viewport or another other setting. This would also include pruning branches past a certain depth if drawing them would result in sub-pixel rendering.

Draw

void Draw(Tree<Color> tree);

Draws the given tree to the renderer's internal state

Save

void Save(Stream stream);

Saves the renderer's current state to the given stream.

Real-time Rendering