C# Class Procedurality.RiverBuilder

Show file Open project: N3X15/VoxelSim

Public Properties

Property Type Description
AllPossibleNodes List
End Point
Pathfinder Dijkstra
RiverNodes List
Start Point
chan Channel

Public Methods

Method Description
DebugPathFinder ( int fromX, int fromY, int x, int y, PathFinderNodeType type, int totalCost, int cost ) : void
FindEndPoint ( int direction ) : Point
FindPath ( Point s, Point e ) : List
FindStartPoint ( int direction ) : Point
GenerateRiver ( float waterlevel, int seed, List &RiverPath ) : RiverBuilder
GenerateRiver ( float waterlevel, int seed, Point start, Point end ) : RiverBuilder
RiverBuilder ( Channel channel ) : System
toChannel ( ) : Channel
toLayer ( ) : Layer

Private Methods

Method Description
Clamp ( Point p ) : Point
CleanPath ( List nodes ) : void
CleanupFloodplain ( ) : void
CreateBank ( List nodes ) : void
DirectionFromAng ( double angle, int dist ) : Point
GetArrayIndex ( Point point ) : int
GetNearbyPixel ( Point origin, NearbyPosition relative ) : Point
GetNearbyPixel ( int origin, NearbyPosition relative ) : int
GetPixelWeight ( Point p ) : int
GetPixelWeights ( ) : int[]
GetPointFromArrayIndex ( int index ) : Point
GetRelativePosition ( int start, int finish ) : int
GetRelevantRegion ( Point start, Point finish ) : Rectangle
GetTraversalCost ( ) : ].int[
IsOnMap ( int x, int y ) : bool
UpdateProgress ( int VP, int IP, Point lp ) : void

Update pathfinding progress...

getInternodeTraversalCost ( int start, int finish ) : int
nearbyNodesHint ( int startingNode ) : IEnumerable

Method Details

DebugPathFinder() public method

public DebugPathFinder ( int fromX, int fromY, int x, int y, PathFinderNodeType type, int totalCost, int cost ) : void
fromX int
fromY int
x int
y int
type PathFinderNodeType
totalCost int
cost int
return void

FindEndPoint() public method

public FindEndPoint ( int direction ) : Point
direction int
return Point

FindPath() public method

public FindPath ( Point s, Point e ) : List
s Point
e Point
return List

FindStartPoint() public method

public FindStartPoint ( int direction ) : Point
direction int
return Point

GenerateRiver() public method

public GenerateRiver ( float waterlevel, int seed, List &RiverPath ) : RiverBuilder
waterlevel float
seed int
RiverPath List
return RiverBuilder

GenerateRiver() public method

public GenerateRiver ( float waterlevel, int seed, Point start, Point end ) : RiverBuilder
waterlevel float
seed int
start Point
end Point
return RiverBuilder

RiverBuilder() public method

public RiverBuilder ( Channel channel ) : System
channel Channel
return System

toChannel() public method

public toChannel ( ) : Channel
return Channel

toLayer() public method

public toLayer ( ) : Layer
return Layer

Property Details

AllPossibleNodes public property

public List AllPossibleNodes
return List

End public property

public Point End
return Point

Pathfinder public property

public Dijkstra Pathfinder
return Dijkstra

RiverNodes public property

public List RiverNodes
return List

Start public property

public Point Start
return Point

chan public property

public Channel,Procedurality chan
return Channel