Google. Maps. Feature. Shape. MapFeatureShape
This is an abstract class.Describes the geometric information for a Feature (such as a building or road).
Summary
All geometry in this class is relative to the Origin.
Inheritance
Direct Known Subclasses:Google.Maps.Feature.Shape.Area, Google.Maps.Feature.Shape.ExtrudedArea, Google.Maps.Feature.Shape.LineGroup, Google.Maps.Feature.Shape.ModeledVolume, Google.Maps.Unity.Intersections.Intersection
Properties |
|
---|---|
BoundingBox
|
Bounds
The bounding box of all of the geometries in this MapFeatureShape.
|
Origin
|
Vector2
The two-dimensional origin of the coordinate system for all contained vertices. I.e., all vertices in FootPrints of Extrusions are measured relative to this origin.
|
Protected functions |
|
---|---|
CalculateLocalBoundingBox()
|
virtual abstract Bounds
Calculates and returns a local bounding box for all of the geometry represented by this object.
|
InvalidateBoundingBox()
|
void
Marks the cached value of CachedBoundingBox as out of date.
|
MapFeatureShape()
|
Constructs a GeometricMapFeature with empty BoundingBox at (0,0,0).
|
Recenter()
|
void
Sets the Origin to be the center of its bounding box, and transforms all contained geometries to be relative to this origin.
|
TranslateGeometry(Vector2 offset)
|
virtual abstract void
Translates the geometry by the supplied offset. This does not change the position of the Origin.
|
Public functions |
|
---|---|
TranslateOrigin(Vector2 offset)
|
void
Moves the Origin by the supplied offset.
|
Public static functions |
|
---|---|
VerticesToBounds(IEnumerable< Vector3 > vertices)
|
Bounds
Return a Unity
Bounds object that encapsulates the supplied vertices. |
VerticesToBounds(IEnumerable< Vector2 > vertices)
|
Bounds
Return a Unity
Bounds object that encapsulates the supplied vertices. |
Properties
BoundingBox
Bounds BoundingBox
The bounding box of all of the geometries in this MapFeatureShape.
This is always relative to the parent GameObject.
Origin
Vector2 Origin
The two-dimensional origin of the coordinate system for all contained vertices. I.e., all vertices in FootPrints of Extrusions are measured relative to this origin.
This origin is relative to the parent of the MapFeatureShape, which is either the GameObject that contains a MapsService, or another MapFeatureShape.
Protected functions
CalculateLocalBoundingBox
virtual abstract Bounds CalculateLocalBoundingBox()
InvalidateBoundingBox
void InvalidateBoundingBox()
Marks the cached value of CachedBoundingBox as out of date.
MapFeatureShape
MapFeatureShape()
Constructs a GeometricMapFeature with empty BoundingBox at (0,0,0).
Recenter
void Recenter()
Sets the Origin to be the center of its bounding box, and transforms all contained geometries to be relative to this origin.
TranslateGeometry
virtual abstract void TranslateGeometry( Vector2 offset )
Translates the geometry by the supplied offset. This does not change the position of the Origin.
Details | |||
---|---|---|---|
Parameters |
|
Public functions
TranslateOrigin
void TranslateOrigin( Vector2 offset )
Moves the Origin by the supplied offset.
Details | |||
---|---|---|---|
Parameters |
|
Public static functions
VerticesToBounds
Bounds VerticesToBounds( IEnumerable< Vector3 > vertices )
Return a Unity Bounds
object that encapsulates the supplied vertices.
VerticesToBounds
Bounds VerticesToBounds( IEnumerable< Vector2 > vertices )
Return a Unity Bounds
object that encapsulates the supplied vertices.