In this programming example we are going to put a building on a place on earth.

The place on earth is defined as a local coordinate system at a geo-referenced position. Possible geographic reference systems are Lat/Lon, UTM, Mercator or ECEF. The z-axis of the local coordinate system points upwards and the y-axis points north. The units of the local coordinate system are meters.

The building is modeled in the local coordinate system as a scene graph that contains two simple geometric objects, a cube as the base and a prism as the roof.

The scene graph is constructed from a set of graph nodes as follows:

derive from Viewer class

overwrite build_ecef_geometry method to describe the scene as a graph

construct scene graph to contain a single house in a local coordinate system

at position Lat/Lon = 49 degrees latitude, 11 degrees longitude

via appending a coord node to the scene graph

and define the local scale of the building

via appending a scale node

and define the appearance of the building’s components

via appending color nodes

and define the proper positions of the components in the local coordinate system