BuildingsApi (Class)

Namespace: Wrld.Resources.Buildings

Methods

BuildingHighlight CreateHighlight (BuildingHighlightOptions)

Create a BuildingHighlight object, for displaying graphical highlighting of a building, or for obtaining information about a building on the map.

Returns: A new BuildingHighlight object.

Argument Type Description
buildingHighlightOptions BuildingHighlightOptions Creation options - see BuildingHighlightOptions for details.

bool TryFindIntersectionWithBuilding (DoubleRay, ref LatLongAltitude)

Perform a ray intersection test against the currently streamed map features, returning true if the first intersection with the ray is a building. A suitable ray may be obtained with SpacesApi.ScreenPointToRay() or SpacesApi.LatLongToVerticallyDownRay().

Returns: True if the first intersection between the ray and map features is a building; false if no intersection is found, or if the ray first intersects with a map feature other than a building (for example, a tree).

Argument Type Description
rayEcef DoubleRay A ray in ECEF coordinates.
out_intersectionPoint ref LatLongAltitude The point of intersection of the ray and building, if any. The result is only valid if this method returns true.

bool TryFindIntersectionAndNormalWithBuilding (DoubleRay, ref LatLongAltitude, ref DoubleVector3)

Perform a ray intersection test against the currently streamed map features, returning true if the first intersection with the ray is a building. A suitable ray may be obtained with SpacesApi.ScreenPointToRay() or SpacesApi.LatLongToVerticallyDownRay().

Returns: True if the first intersection between the ray and map features is a building; false if no intersection is found, or if the ray first intersects with a map feature other than a building (for example, a tree).

Argument Type Description
rayEcef DoubleRay A ray in ECEF coordinates.
out_intersectionPoint ref LatLongAltitude The point of intersection of the ray and building, if any. The result is only valid if this method returns true.
out_intersectionNormal ref DoubleVector3 The surface normal of the intersection, if any. The result is only valid if this method returns true.