Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsBuildingBase Class Referenceabstract

Base class of buildings. More...

Inheritance diagram for OnlineMapsBuildingBase:
OnlineMapsBuildingBuiltIn

Classes

struct  MetaInfo
 Building meta key-value pair. More...
 

Public Member Functions

virtual void Dispose ()
 Dispose of building.
 
void LoadMeta (OnlineMapsOSMBase item)
 Loads the meta data from the XML.
 

Public Attributes

Action< OnlineMapsBuildingBaseOnClick
 Events that occur when user click on the building.
 
Action< OnlineMapsBuildingBaseOnDispose
 Events that occur when dispose building.
 
Action< OnlineMapsBuildingBaseOnPress
 Events that occur when user press on the building.
 
Action< OnlineMapsBuildingBaseOnRelease
 Events that occur when user release on the building.
 
Bounds boundsCoords
 Geographical coordinates of the boundaries of the building.
 
Vector2 centerCoordinates
 Geographical coordinates of the center point.
 
string id
 ID of building.
 
Vector2 initialSizeInScene
 Initial size of building in scene.
 
float initialZoom
 Zoom, in which this building was created.
 
MetaInfo[] metaInfo
 Array of building meta key-value pair.
 
float perimeter
 Perimeter of building.
 
OnlineMapsOSMWay way
 Building way.
 
List< OnlineMapsOSMNodenodes
 Building nodes.
 

Static Public Attributes

static List< int > roofIndices
 Indices of the roof vertices.
 

Protected Types

enum  RoofType { dome , flat }
 Type the building's roof. More...
 

Protected Member Functions

void OnBasePress ()
 This method is called when you press a building.
 
void OnBaseRelease ()
 This method is called when you release a building.
 
void OnMouseDown ()
 This method is called when you mouse down on a building.
 
void OnMouseUp ()
 This method is called when you mouse up on a building.
 

Static Protected Member Functions

static bool CheckIgnoredBuildings (OnlineMapsOSMWay way)
 Checks ignore the building.
 
static GameObject CreateGameObject (OnlineMapsBuildings container, string id)
 Creates a new child GameObject, with the specified name.
 
static List< Vector3 > GetLocalPoints (List< OnlineMapsOSMNode > nodes, OnlineMapsBuildings container)
 Converts a list of nodes into an list of points in Unity World Space.
 

Protected Attributes

Collider buildingCollider
 Collider of building.
 
bool hasErrors = false
 Indicates that the building has an error.
 

Detailed Description

Base class of buildings.

Member Enumeration Documentation

◆ RoofType

Type the building's roof.

Enumerator
dome 

Dome roof.

flat 

Flat roof.

Member Function Documentation

◆ CheckIgnoredBuildings()

static bool OnlineMapsBuildingBase.CheckIgnoredBuildings ( OnlineMapsOSMWay way)
staticprotected

Checks ignore the building.

Parameters
wayBuilding way.
Returns
TRUE - ignore building, FALSE - generate building.

◆ CreateGameObject()

static GameObject OnlineMapsBuildingBase.CreateGameObject ( OnlineMapsBuildings container,
string id )
staticprotected

Creates a new child GameObject, with the specified name.

Parameters
containerReference to OnlineMapsBuildings
idName of GameObject.
Returns

◆ GetLocalPoints()

static List< Vector3 > OnlineMapsBuildingBase.GetLocalPoints ( List< OnlineMapsOSMNode > nodes,
OnlineMapsBuildings container )
staticprotected

Converts a list of nodes into an list of points in Unity World Space.

Parameters
nodesList of nodes
containerReference to OnlineMapsBuildings
Returns
List of points in Unity World Space

◆ LoadMeta()

void OnlineMapsBuildingBase.LoadMeta ( OnlineMapsOSMBase item)

Loads the meta data from the XML.

Parameters
itemObject that contains meta description.