C# Class Drought.World.Water

Show file Open project: kiniry-teaching/UCD Class Usage Examples

Public Methods

Method Description
Water ( List points, LevelInfo levelInfo, Sun aSun, GraphicsDevice graphics ) : System
approximateArea ( float circumference, float height ) : float
findWater ( LevelInfo levelInfo ) : List>
initialize ( List points, LevelInfo levelInfo ) : void
removeWater ( float amt ) : float
render ( GraphicsDevice graphics, Matrix viewMatrix, Matrix projectionMatrix ) : void
update ( GameTime gameTime ) : void

Private Methods

Method Description
depthFirstSearch ( Vector3 start, Vector3 end ) : List
depthFirstSearch ( Vector3 curr, Vector3 goal, List path ) : Vector3
edgeFacesPoint ( WaterEdge edge, Vector3 point ) : bool
facePointArea ( List points, Vector3 center ) : List
isClosed ( List points, Vector3 center, Vector3 a, Vector3 b ) : List
isEdge ( int x, int y ) : bool
minimumConvexArea ( List points, List initialPoints, Vector3 center ) : List
notEdgePoint ( Vector3 p, LevelInfo levelInfo ) : bool
setNewWaterLevel ( ) : void

Method Details

Water() public method

public Water ( List points, LevelInfo levelInfo, Sun aSun, GraphicsDevice graphics ) : System
points List
levelInfo LevelInfo
aSun Sun
graphics GraphicsDevice
return System

approximateArea() public static method

public static approximateArea ( float circumference, float height ) : float
circumference float
height float
return float

findWater() public static method

public static findWater ( LevelInfo levelInfo ) : List>
levelInfo LevelInfo
return List>

initialize() public method

public initialize ( List points, LevelInfo levelInfo ) : void
points List
levelInfo LevelInfo
return void

removeWater() public method

public removeWater ( float amt ) : float
amt float
return float

render() public method

public render ( GraphicsDevice graphics, Matrix viewMatrix, Matrix projectionMatrix ) : void
graphics GraphicsDevice
viewMatrix Matrix
projectionMatrix Matrix
return void

update() public method

public update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void