Point Structure
A 2D or 3D point.
NuGet/Assembly: Carmenta.Engine.5.17.0.nupkg (in the CECore assembly)
Syntax
public struct Point :
System.IEquatable<Point>Remarks
An immutable point with x, y and z-coordinates. In 2D the x-axis is directed to the right and the y-axis upwards. In 3D the x and y-axis are directed in the x and y-direction of the projection and the z-axis is directed upwards.
Some of the methods treat points as a vectors.
Platforms
Windows, Linux, Android
Point Members
The Point type has the following members.
Constructors
| Name | Description |
|---|---|
| Point | Initializes a new instance of the Point class. |
Properties
| Name | Description |
|---|---|
| Angle | Gets the angle in radians around the z-axis. |
| Bearing | Gets the direction of the 2D vector the Point represents. |
| IsUndefined | Gets a value that tells whether the Point is undefined. |
| Length | Gets the length of the 2D vector the Point represents. |
| Length3D | Gets the length of the 3D vector the Point represents. |
| Pitch | Gets the pitch of the 3D vector the Point represents. |
| Gets an Point instance representing an undefined point. | |
| X | Gets the x-coordinate of the Point. |
| Y | Gets the y-coordinate of the Point. |
| Z | Gets the z-coordinate of the Point. |
Methods
| Name | Description |
|---|---|
| Add | Returns the Point that results from adding the current Point to the specified Point. |
| Cross | Calculates the cross product of two Point instances. |
| Dot | Calculates the dot product also known as the scalar product. |
| Equals | Overloaded. Determines whether two Point objects have the same value. |
| Creates a new instance of the Point class with coordinates calculated from the specified polar coordinates. | |
| GetHashCode | Returns the hash code for this Point. |
| Multiply | Returns the Point where each coordinate of the current Point has been multiplied with a scalar value. |
| Normalize | Returns the Point that results from normalizing the x and y-coordinates of the current Point. |
| Normalize3D | Returns the Point that results from normalizing the x, y and z-coordinates of the current Point. |
| Determines whether two specified Point objects have the same value. | |
| Determines whether two specified Point objects have different values. | |
| Operator - | Returns the Point that results from subtracting a Point from the current Point. |
| Operator * | Returns the Point where each coordinate of the current Point has been multiplied with a scalar value. |
| Operator + | Returns the Point that results from adding the current Point to the specified Point. |
| Rotate | Returns the point that results from rotating the current Point around an axis. |
| Subtract | Returns the Point that results from subtracting a Point from the current Point. |
| ToString | Converts this Point to a human readable string. |