Google.Maps.Feature.Shape.ExtrudedArea

A geometric representation of a MapFeature made up of a collection of extrusions.

Summary

Inheritance

Inherits from: Google.Maps.Feature.Shape.MapFeatureShape

Constructors and Destructors

ExtrudedArea(ICollection< Extrusion > extrusions, bool hasServerHeight, bool overhangs)
Constructor.

Properties

Extrusions
The Extrusions that make up this ExtrudedArea.

Public attributes

HasServerHeight
readonly bool
True if the height data is as reported by the server. If not then the value was generated by other means as is the case, for example, when the server sends no height data in the first place.
Overhangs
readonly bool
Specifies whether the geometry of this ExtrudedArea crosses a tile boundary.

Public functions

CloneWithHeight(float height, bool isServerHeight)
Creates a clone of this extruded area with the height (MaxZ) of all extrusions set to the supplied height.
CloneWithMinBaseHeight(float minBaseHeight)
Constructs a new ExtrudedArea as a clone of this ExtrudedArea, with all MaxZ values raised such that the lowest Extrusions are of at least the specified height.
CloneWithScaledHeight(float height, bool isServerHeight)
Constructs a new ExtrudedArea as a linearly-scaled clone of the this ExtrudedArea.
ToString()
override string

Protected functions

CalculateLocalBoundingBox()
virtual override Bounds
Calculates and returns a local bounding box for all of the geometry represented by this object. The bounding box is located relative to the Shape's origin, which means that the center of it might not be at (0, 0) if the Origin is not at the center of all of the vertices.
TranslateGeometry(Vector2 offset)
virtual override void
Translates the geometry by the supplied offset. This does not change the position of the Origin.
Parameters
offset
An offset vector used for translation.

Classes

Google.Maps.Feature.Shape.ExtrudedArea.Extrusion

A footprint together with base and top heights.

Properties

Extrusions

Extrusion[] Extrusions

The Extrusions that make up this ExtrudedArea.

Public attributes

HasServerHeight

readonly bool HasServerHeight

True if the height data is as reported by the server. If not then the value was generated by other means as is the case, for example, when the server sends no height data in the first place.

Overhangs

readonly bool Overhangs

Specifies whether the geometry of this ExtrudedArea crosses a tile boundary.

Public functions

CloneWithHeight

ExtrudedArea CloneWithHeight(
  float height,
  bool isServerHeight
)

Creates a clone of this extruded area with the height (MaxZ) of all extrusions set to the supplied height.

Each extrusion of the generated clone shares a reference to the footprint of the cloned extrusion. For more information, see Extrusion.ShallowCloneWithMinMaxZ.

Details
Parameters
height
The height to set the MaxZ of each cloned extrusion to.
isServerHeight
Does the height come from the server?
Returns
A clone with all extrusions set to the supplied height.

CloneWithMinBaseHeight

ExtrudedArea CloneWithMinBaseHeight(
  float minBaseHeight
)

Constructs a new ExtrudedArea as a clone of this ExtrudedArea, with all MaxZ values raised such that the lowest Extrusions are of at least the specified height.

The lowest Extrusions are defined as all of the Extrusions with the lowest minimum z value. Where multiple Extrusions share the same value, the shortest one is used to determine the height delta applied to the entire ExtrudedArea. The delta is applied to the entire ExtrudedArea to ensure it otherwise retains its profile.

If the shortest base-level Extrusion is taller than minBaseHeight, no height adjustment occurs.

Each extrusion of the generated clone shares a reference to the footprint of cloned extrusion. For more information, see Extrusion.ShallowCloneWithMinMaxZ.

Details
Parameters
minBaseHeight
The minimum height of the shorted base-level ExtrudedArea.
Returns
A scaled clone of this ExtrudedArea

CloneWithScaledHeight

ExtrudedArea CloneWithScaledHeight(
  float height,
  bool isServerHeight
)

Constructs a new ExtrudedArea as a linearly-scaled clone of the this ExtrudedArea.

Each extrusion of the generated clone shares a reference to the footprint of cloned extrusion. For more information, see Extrusion.ShallowCloneWithMinMaxZ.

Details
Parameters
height
The height to scale this ExtrudedArea to.
isServerHeight
Does the height come from the server?
Returns
A scaled clone of this ExtrudedArea

ExtrudedArea

 ExtrudedArea(
  ICollection< Extrusion > extrusions,
  bool hasServerHeight,
  bool overhangs
)

Constructor.

Details
Parameters
extrusions
Collection of Extrusions that make up the ExtrudedArea.
hasServerHeight
Is the height value server-supplied?
overhangs
Whether any geometry crosses a tile boundary.

ToString

override string ToString()

Protected functions

CalculateLocalBoundingBox

virtual override Bounds CalculateLocalBoundingBox()

Calculates and returns a local bounding box for all of the geometry represented by this object. The bounding box is located relative to the Shape's origin, which means that the center of it might not be at (0, 0) if the Origin is not at the center of all of the vertices.

TranslateGeometry

virtual override void TranslateGeometry(
  Vector2 offset
)

Translates the geometry by the supplied offset. This does not change the position of the Origin. Parameters

offset
An offset vector used for translation.