C# Class Buildings, City-Generator

Datei anzeigen Open project: cybercritic/City-Generator Class Usage Examples

Public Properties

Property Type Description
BuildingStatic GameObject,
Instances GameObject,
Roads GameObject,
Splitting bool

Private Properties

Property Type Description
AddBuildingMesh void
CheckValidPlacement bool
GetQuad void
GetRotation float
IntersectsRoad bool
RotateAroundPoint Vector3
Start void
Update void
checkSegment void

Public Methods

Method Description
Clear ( ) : void

clears all buildings and their objects

PopulateClick ( ) : void

Flips the building generation on

Private Methods

Method Description
AddBuildingMesh ( Building, building ) : void

Adds a building mesh

CheckValidPlacement ( Building, building ) : bool

check if new building placement is ok

GetQuad ( Vector3 vertices, int &last, int &triangles, Vector3 &normals, Vector2 &uvs ) : void

construct a building quad given 4 points and last indice

GetRotation ( Vector3 segDir ) : float

get 360 rotation of vector

IntersectsRoad ( Building, building ) : bool

check if a given building intersecs a road

RotateAroundPoint ( Vector3 point, Vector3 pivot, Quaternion, angle ) : Vector3
Start ( ) : void
Update ( ) : void
checkSegment ( RoadSegment, segment ) : void

evaluate segment for potential building placement

Method Details

Clear() public method

clears all buildings and their objects
public Clear ( ) : void
return void

PopulateClick() public method

Flips the building generation on
public PopulateClick ( ) : void
return void

Property Details

BuildingStatic public_oe property

public GameObject, BuildingStatic
return GameObject,

Instances public_oe property

public GameObject, Instances
return GameObject,

Roads public_oe property

public GameObject, Roads
return GameObject,

Splitting public_oe static_oe property

public static bool Splitting
return bool