Godot Nature of Code  1.2.0
Nature of Code implemented in Godot Engine
Public Member Functions | Properties | List of all members
Fractals.RecursiveBranch Class Reference

Recursive branch. More...

Public Member Functions

 RecursiveBranch (Vector2 start, Vector2 end, float weight)
 Creates a new recursive branch. More...
 
void Draw (CanvasItem canvas)
 Draw branch using canvas. More...
 

Properties

Vector2 Start [get]
 Starting point. More...
 
Vector2 End [get]
 Ending point. More...
 
float Weight [get]
 Weight. More...
 

Detailed Description

Recursive branch.

Definition at line 9 of file RecursiveTree.cs.

Constructor & Destructor Documentation

◆ RecursiveBranch()

Fractals.RecursiveBranch.RecursiveBranch ( Vector2  start,
Vector2  end,
float  weight 
)
inline

Creates a new recursive branch.

Parameters
startStarting point.
endEnding point.
weightWeight.

Definition at line 24 of file RecursiveTree.cs.

25  {
26  Start = start;
27  End = end;
28  Weight = weight;
29  }
Vector2 Start
Starting point.
Vector2 End
Ending point.

Member Function Documentation

◆ Draw()

void Fractals.RecursiveBranch.Draw ( CanvasItem  canvas)
inline

Draw branch using canvas.

Parameters
canvasCanvas item

Definition at line 35 of file RecursiveTree.cs.

36  {
37  canvas.DrawLine(Start, End, Colors.White, Weight);
38  }

Property Documentation

◆ End

Vector2 Fractals.RecursiveBranch.End
get

Ending point.

Definition at line 14 of file RecursiveTree.cs.

14 { get; }

◆ Start

Vector2 Fractals.RecursiveBranch.Start
get

Starting point.

Definition at line 12 of file RecursiveTree.cs.

12 { get; }

◆ Weight

float Fractals.RecursiveBranch.Weight
get

Weight.

Definition at line 16 of file RecursiveTree.cs.

16 { get; }

The documentation for this class was generated from the following file: