Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cone ¶
Cone is a struct that represents cone-like area with left and right bounds defined by angle from root point of the tree. Main branch of the tree should grow inside the cone. Lateral branches could grow outside it.
type LightningGenerator ¶
type LightningGenerator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator(x int, v *viper.Viper) (*LightningGenerator, error)
func (*LightningGenerator) Generate ¶
func (g *LightningGenerator) Generate() *Node
type Node ¶
type Node struct {
// Coordinates of the node
Point Point
Children []*Node
// IsMain holds true if node is a part of main branch and false if
// lateral branch
IsMain bool
// Generation is a number of generation of the node on a lateral branch
// only. For main branch it is always 0
Generation int
// GrowthAngle defines direction which the node growed in
GrowthAngle float64
}
Node is a struct that represents tree node
Click to show internal directories.
Click to hide internal directories.