This repository was archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
Microsoft.Geospatial.VectorMath
Brian Kircher edited this page Apr 9, 2019
·
9 revisions
Describes and manipulates a vector in two-dimensional space using doubles.
public struct Microsoft.Geospatial.VectorMath.Vector2D
: IEquatable<Vector2D>
Fields
Type | Name | Summary |
---|---|---|
Double |
X | Represents the x component of the 2-D vector. |
Double |
Y | Represents the y component of the 2-D vector. |
Methods
Type | Name | Summary |
---|---|---|
Double |
AbsMaximal() | Get the maximal of the absolute values of the elements of this vector |
Double |
AbsMinimal() | Get the minimal of the absolute values of the elements of this vector |
Vector2D |
Add(Vector2D vec) |
Adds two 2-D vectors together and returns the result. |
void |
AddTo(Vector2D right) |
Adds a 2-D vector to the current vector. |
Double |
Dot(Vector2D vec) |
Get the dot product of the vectors. |
Boolean |
Equals(Vector2D other) |
Compares two Microsoft.Geospatial.VectorMath.Vector2D structures for equality. |
Boolean |
Equals(Vector2D& other) |
Compares two Microsoft.Geospatial.VectorMath.Vector2D structures for equality. |
Boolean |
Equals(Object obj) |
Compares two Microsoft.Geospatial.VectorMath.Vector2D structures for equality. |
Int32 |
GetHashCode() | Returns the hash code for this Microsoft.Geospatial.VectorMath.Vector2D . |
Double |
Length() | Returns the length of the current 2-D vector. |
Double |
LengthSq() | Returns the square of the length of the current 2-D vector. |
Vector2D |
Lerp(Vector2D vec, Double w) |
Linearly interpolate from this vector to the passed-in vector |
Vector2D |
Max(Vector2D vec) |
Return a new vector that, for each entry, contains the maximal corresponding element of the two vectors |
Double |
Maximal() | Get the maximal element of this vector |
void |
Maximize(Vector2D toMaximize) |
Maximize by the given vector |
Vector2D |
Min(Vector2D vec) |
Return a new vector that, for each entry, contains the minimal corresponding element of the two vectors |
Double |
Minimal() | Get the minimal element of this vector |
void |
Minimize(Vector2D toMinimize) |
Minimize by the given vector |
Vector2D |
Multiply(Double s) |
Multiplies a 2-D vector by a value. |
void |
MultiplyBy(Double value) |
Multiplies a 2-D vector by a value. |
Boolean |
NearlyEquals(Vector2D other, Double epsilon) |
Compares two Microsoft.Geospatial.VectorMath.Vector2D structures for near equality. |
Vector2D |
Negate() | Get a copy of this vector multiplied by -1 |
void |
Normalize() | Normalizes the current 2-D vector. |
Vector2D |
Subtract(Vector2D vec) |
Subtracts two 2-D vectors from one another and returns the result. |
void |
SubtractFrom(Vector2D right) |
Subtracts a 2-D vector from the current vector. |
String |
ToString() | Returns a string that represents the current object. |
Static Fields
Type | Name | Summary |
---|---|---|
Vector2D |
Empty | Retrieves an empty 2-D vector. |
Static Methods
Type | Name | Summary |
---|---|---|
Vector2D |
Add(Vector2D left, Vector2D right) |
Adds two 2-D vectors together and returns the result. |
Double |
Cross(Vector2D left, Vector2D right) |
Returns the 2D cross product of two vectors. |
Double |
Cross(Vector2D& left, Vector2D& right) |
Returns the 2D cross product of two vectors. |
Double |
Distance(Vector2D pointA, Vector2D pointB) |
Returns the distance between two vectors, assuming that those vectors represent points. Put another way, returns |
Double |
DistanceSq(Vector2D pointA, Vector2D pointB) |
Returns the square of the distance between two vectors, assuming that those vectors represent points. Put another way, returns |
Double |
DistanceToSegment(Vector2D start, Vector2D end, Vector2D point, Double& percentageBetween) |
Calculates how far along a line segment a point is. |
Double |
Dot(Vector2D left, Vector2D right) |
Get the dot product of the vectors. |
Double |
Dot(Vector2D& left, Vector2D& right) |
Get the dot product of the vectors. |
Double |
GetAngle(Vector2D a, Vector2D b) |
Calculates the angle in radians between two 2D vectors. |
Vector2D |
GetNormalVector(Vector2D v) |
Returns a vector normal to this vector. |
Double |
Length(Vector2D vector) |
Returns the length of the current 2-D vector. |
Double |
LengthSq(Vector2D vector) |
Returns the square of the length of the current 2-D vector. |
Vector2D |
Multiply(Vector2D source, Double value) |
Multiplies a 2-D vector by a value. |
Vector2D |
Normalize(Vector2D vector) |
Normalizes the current 2-D vector. |
Vector2D |
Subtract(Vector2D left, Vector2D right) |
Subtracts two 2-D vectors from one another and returns the result. |
- Configuring the map
- Attaching GameObjects
- Adding labels
- Animating the map
- Raycasting the map
- Displaying copyrights
- Customizing map data
- Displaying contour lines
- Microsoft.Geospatial
- Microsoft.Geospatial.VectorMath
-
Microsoft.Maps.Unity
- ClippingVolumeDistanceTextureResolution
- ClusterMapPin
- CoordinateClamping
- DefaultElevationTileLayer
- DefaultTextureTileLayer
- DefaultTrafficTextureTileLayer
- ElevationTile
- ElevationTileLayer
- ElevationTileLayerList
- FontStyle
- FontWeight
- HttpTextureTileLayer
- IMapSceneAnimationController
- Intersection
- IntersectionType
- IPinnable
- LanguageChangedEvent
- LatLonAltUnityEvent
- LatLonUnityEvent
- LatLonWrapper
- MapColliderType
- MapConstants
- MapContourLineLayer
- MapCopyrightAlignment
- MapCopyrightLayer
- MapDataCache
- MapDataCacheBase
- MapDeveloperKeySource
- MapImageryStyle
- MapImageryType
- MapInteractionController
- MapInteractionHandler
- MapLabel
- MapLabelLayer
- MapLayer
- MapMouseInteractionHandler
- MapPin
- MapPinLayer
- MapRenderer
- MapRendererBase
- MapRendererRaycastHit
- MapRendererTransformExtensions
- MapScaleRatioExtensions
- MapScene
- MapSceneAnimationController
- MapSceneAnimationKind
- MapSceneOfBoundingBox
- MapSceneOfLabelAndZoomLevel
- MapSceneOfLocationAndZoomLevel
- MapSession
- MapShape
- MapTerrainType
- MapTouchInteractionHandler
- ObservableList
- ObservableMapPinList
- ServiceOptions
- Style
- SystemLangaugeConverter
- TextureTile
- TextureTileLayer
- TextureTileLayerList
- TileLayer
- TileLayerList
- UnityTaskFactory
- UnityWebRequestAwaiter
- UnityWebRequestAwaiterExtensionMethods
- WaitForMapLoaded
- WaitForMapSceneAnimation
- Microsoft.Maps.Unity.Search