C# Class Region, tf_client

A struct to describe a region in the world grid
Show file Open project: wids-eria/tf_client Class Usage Examples

Public Properties

Property Type Description
bottom int
left int
right int
status TerrainManager.Status
top int

Public Methods

Method Description
Contains ( Vector3 p ) : bool

Tests whether the point is in the region

Encapsulate ( int x, int z ) : void

Grow the region to include the specified point

EncapsulateMegatiles ( ) : void

Encapsulates extents of all contained megatiles.

GetCenter ( Vector3 &pos ) : void
GetCenter ( float &x, float &z ) : void

Get the center of the region

GetCenter ( int &x, int &z ) : void

Get the center of the region

GetOverlap ( Region, otherRegion ) : Region,
Intersects ( Region, otherRegion ) : bool
Region ( ) : UnityEngine
Region ( ResourceTile, tiles ) : UnityEngine

Create a region that includes all of the specified tiles

Region ( ResourceTileLite, tiles ) : UnityEngine
Region ( int left, int right, int top, int bottom ) : UnityEngine

Construct using specified bounds

ToString ( ) : string

String reprensetation of the region

ToTerrainRegion ( Region, &reg ) : void

Convert to a region clamped in the space of the terrain

Method Details

Contains() public method

Tests whether the point is in the region
public Contains ( Vector3 p ) : bool
p Vector3 /// A ///
return bool

Encapsulate() public method

Grow the region to include the specified point
public Encapsulate ( int x, int z ) : void
x int /// A ///
z int /// A ///
return void

EncapsulateMegatiles() public method

Encapsulates extents of all contained megatiles.
public EncapsulateMegatiles ( ) : void
return void

GetCenter() public method

public GetCenter ( Vector3 &pos ) : void
pos Vector3
return void

GetCenter() public method

Get the center of the region
public GetCenter ( float &x, float &z ) : void
x float /// A ///
z float /// A ///
return void

GetCenter() public method

Get the center of the region
public GetCenter ( int &x, int &z ) : void
x int /// A ///
z int /// A ///
return void

GetOverlap() public method

public GetOverlap ( Region, otherRegion ) : Region,
otherRegion Region,
return Region,

Intersects() public method

public Intersects ( Region, otherRegion ) : bool
otherRegion Region,
return bool

Region() public method

public Region ( ) : UnityEngine
return UnityEngine

Region() public method

Create a region that includes all of the specified tiles
public Region ( ResourceTile, tiles ) : UnityEngine
tiles ResourceTile, /// A ///
return UnityEngine

Region() public method

public Region ( ResourceTileLite, tiles ) : UnityEngine
tiles ResourceTileLite,
return UnityEngine

Region() public method

Construct using specified bounds
public Region ( int left, int right, int top, int bottom ) : UnityEngine
left int /// A ///
right int /// A ///
top int /// A ///
bottom int /// A ///
return UnityEngine

ToString() public method

String reprensetation of the region
public ToString ( ) : string
return string

ToTerrainRegion() public method

Convert to a region clamped in the space of the terrain
public ToTerrainRegion ( Region, &reg ) : void
reg Region,
return void

Property Details

bottom public property

inclusive bottom boundary for the region
public int bottom
return int

left public property

inclusive left boundary for the region
public int left
return int

right public property

inclusive right boundary for the region
public int right
return int

status public static property

public static TerrainManager.Status status
return TerrainManager.Status

top public property

inclusive top boundary for the region
public int top
return int