Vis2_CO2Data
 
Loading...
Searching...
No Matches
DataVisualizer Class Reference

Visualizes CO2 emissions data on a globe. Handles the creation and management of meshes and UI updates for CO2 data visualization. More...

Inherits MonoBehaviour.

Public Member Functions

Vector3 GetGlobeScale ()
 Gets the scale of the globe.
 
void CreateMeshes (List< YearData > years)
 Creates visual meshes for the given years of CO2 data.
 
void ChangeYear (System.Single year)
 Changes the displayed year and updates the data visualization.
 
void AutoPlayYears ()
 Starts autoplay for changing years.
 
void ToggleAbs (System.Boolean isActive)
 Toggles the visibility of absolute CO2 emission bars.
 
void ToggleCap (System.Boolean isActive)
 Toggles the visibility of per capita CO2 emission bars.
 
void ShowDetailsOnDemand (String name, Vector3 position)
 Displays detailed information about a country.
 
void RemoveDetailsOnDemand ()
 Removes any displayed detailed information.
 

Public Attributes

Material pointMaterial
 Material for absolute CO2 emission bars.
 
Material pointMaterialCap
 Material for per capita CO2 emission bars.
 
Gradient colorsAbs
 Gradient for absolute CO2 emissions.
 
Gradient colorsCap
 Gradient for per capita CO2 emissions.
 
GameObject earth
 Reference to the globe GameObject.
 
GameObject pointPrefab
 Prefab for data point representation.
 
UIHandler uiHandler
 Reference to the UIHandler for UI updates.
 
DetailsOnDemand DetailsOnDemand
 Reference to the DetailsOnDemand component for showing detailed information.
 

Detailed Description

Visualizes CO2 emissions data on a globe. Handles the creation and management of meshes and UI updates for CO2 data visualization.

Member Function Documentation

◆ AutoPlayYears()

void DataVisualizer.AutoPlayYears ( )

Starts autoplay for changing years.

◆ ChangeYear()

void DataVisualizer.ChangeYear ( System.Single year)

Changes the displayed year and updates the data visualization.

Parameters
yearThe year to change to.

◆ CreateMeshes()

void DataVisualizer.CreateMeshes ( List< YearData > years)

Creates visual meshes for the given years of CO2 data.

Parameters
yearsList of YearData objects to visualize.

◆ GetGlobeScale()

Vector3 DataVisualizer.GetGlobeScale ( )

Gets the scale of the globe.

Returns
The scale of the globe as a Vector3.

◆ RemoveDetailsOnDemand()

void DataVisualizer.RemoveDetailsOnDemand ( )

Removes any displayed detailed information.

◆ ShowDetailsOnDemand()

void DataVisualizer.ShowDetailsOnDemand ( String name,
Vector3 position )

Displays detailed information about a country.

Parameters
nameThe name of the country.
positionThe position to display the details at.

◆ ToggleAbs()

void DataVisualizer.ToggleAbs ( System.Boolean isActive)

Toggles the visibility of absolute CO2 emission bars.

Parameters
isActiveWhether to activate or deactivate the bars.

◆ ToggleCap()

void DataVisualizer.ToggleCap ( System.Boolean isActive)

Toggles the visibility of per capita CO2 emission bars.

Parameters
isActiveWhether to activate or deactivate the bars.

Member Data Documentation

◆ colorsAbs

Gradient DataVisualizer.colorsAbs

Gradient for absolute CO2 emissions.

◆ colorsCap

Gradient DataVisualizer.colorsCap

Gradient for per capita CO2 emissions.

◆ DetailsOnDemand

DetailsOnDemand DataVisualizer.DetailsOnDemand

Reference to the DetailsOnDemand component for showing detailed information.

◆ earth

GameObject DataVisualizer.earth

Reference to the globe GameObject.

◆ pointMaterial

Material DataVisualizer.pointMaterial

Material for absolute CO2 emission bars.

◆ pointMaterialCap

Material DataVisualizer.pointMaterialCap

Material for per capita CO2 emission bars.

◆ pointPrefab

GameObject DataVisualizer.pointPrefab

Prefab for data point representation.

◆ uiHandler

UIHandler DataVisualizer.uiHandler

Reference to the UIHandler for UI updates.


The documentation for this class was generated from the following file: