Struct SerializableDoubleBounds
This struct should only be used for serialization purposes within Unity, either in MonoBehaviours, such that it can appear in the inspector, or for JSON serialization. For any purpose that does not require serialization, please use DoubleBounds. Cast as quickly as you can to the DoubleBounds struct which is immutable.
Namespace: Unity.Geospatial.HighPrecision
Assembly: solution.dll
Syntax
[Serializable]
public struct SerializableDoubleBounds
Constructors
SerializableDoubleBounds(DoubleBounds)
Default constructor, using a DoubleBounds.
Declaration
public SerializableDoubleBounds(DoubleBounds bounds)
Parameters
Type | Name | Description |
---|---|---|
DoubleBounds | bounds | The bounds which should be copied into the serializable version |
Fields
Center
The center of the bounds
Declaration
public double3 Center
Field Value
Type | Description |
---|---|
double3 |
Extents
The extent of the bounds, or the vector that can run from the center of the bounds to each of the corners.
Declaration
public double3 Extents
Field Value
Type | Description |
---|---|
double3 |
Operators
Explicit(DoubleBounds to SerializableDoubleBounds)
Cast from DoubleBounds
Declaration
public static explicit operator SerializableDoubleBounds(DoubleBounds bounds)
Parameters
Type | Name | Description |
---|---|---|
DoubleBounds | bounds | The DoubleBounds to be casted from |
Returns
Type | Description |
---|---|
SerializableDoubleBounds | A new SerializableDoubleBounds instance. |
Explicit(SerializableDoubleBounds to DoubleBounds)
Cast to DoubleBounds
Declaration
public static explicit operator DoubleBounds(SerializableDoubleBounds bounds)
Parameters
Type | Name | Description |
---|---|---|
SerializableDoubleBounds | bounds | The SerializableDoubleBounds to be casted from |
Returns
Type | Description |
---|---|
DoubleBounds | A new DoubleBounds instance. |
Explicit(SerializableDoubleBounds to Bounds)
Convert a SerializableDoubleBounds instance to a new single precision Unity Bounds instance.
Declaration
public static explicit operator Bounds(SerializableDoubleBounds bounds)
Parameters
Type | Name | Description |
---|---|---|
SerializableDoubleBounds | bounds | The instance to convert. |
Returns
Type | Description |
---|---|
Bounds | A new Bounds instance. |