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
  • Options
  • Examples

Was this helpful?

  1. Rendering
  2. Tree Renderers

SquareTreeRenderer

Draws a tree by uniformly subdividing an image into squares. The number of branches at each depth is assumed to be constant and equal to: SquareTreeRendererOptions.Size * SquareTreeRendererOptions.Size

Options

SquareTreeRendererOptions

    public int Size { get; }
    public int ImageSize { get; }
    public float BorderProportion { get; set; }
    public float MinChildDrawSize { get; set; }

    public IViewport Viewport { get; set; }
    public int? MaxDepth { get; set; }

Property

Type

Description

Size

int

Square size. E.g. a Size=2 for 2x2 grid

ImageSize

int

Width and Height of the image in pixels

BorderProportion

float

Border size at each depth as a fraction of the parent's size

MinChildDrawSize

float

Nodes under this pixel size will be ignored by the renderer

Viewport

IViewport

Renders only a sub-portion of the image. Used for zooming

MaxDepth

int?

If a value is set, the renderer will ignore nodes past the specified depth

Examples

Changing BorderProportion

PreviousTree RenderersNextSliceAndDiceTreeRenderer

Last updated 3 years ago

Was this helpful?

For more applied examples see and

8 Queens Problem
Chess Pieces