Struct Point
Structure defining a point in three-dimensional projective space.
Namespace: BRIDGES.Geometry.Projective3D
Assembly: BRIDGES.dll
Syntax
public struct Point : IAddable<Point>, IGroupAction<Point, double>
Constructors
| Improve this Doc View SourcePoint(Point)
Declaration
public Point(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point | Point to deep copy. |
Point(Double, Double, Double, Double)
Initialises a new instance of the Point structure by defining its four coordinates.
Declaration
public Point(double x0, double x1, double x2, double x3)
Parameters
Type | Name | Description |
---|---|---|
Double | x0 | Value of the first coordinate. |
Double | x1 | Value of the second coordinate. |
Double | x2 | Value of the third coordinate. |
Double | x3 | Value of the fourth coordinate. |
Point(Double[])
Initialises a new instance of Point structure by defining its coordinates.
Declaration
public Point(double[] coordinates)
Parameters
Type | Name | Description |
---|---|---|
Double[] | coordinates | Value of the coordinates. |
Properties
| Improve this Doc View SourceDimension
Gets the dimension of this Point's projective space.
Declaration
public readonly int Dimension { get; }
Property Value
Type | Description |
---|---|
Int32 |
Item[Int32]
Gets or sets the value of the coordinate at the given index.
Declaration
public double this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of the coordinate to get or set. |
Property Value
Type | Description |
---|---|
Double | The value of the coordinate at the given index. |
Zero
Gets a new Point with coordinates (0.0, 0.0, 0.0, 0.0)
.
Declaration
public static readonly Point Zero { get; }
Property Value
Type | Description |
---|---|
Point |
Methods
| Improve this Doc View SourceAdd(Point, Point)
Computes the addition of two Point.
Declaration
public static Point Add(Point left, Point right)
Parameters
Type | Name | Description |
---|---|---|
Point | left | Point for the addition. |
Point | right | Point for the addition. |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the addition. |
Divide(Point, Double)
Computes the scalar division of a Point with a
Declaration
public static Point Divide(Point operand, double divisor)
Parameters
Type | Name | Description |
---|---|---|
Point | operand | Point to divide. |
Double | divisor |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the scalar division. |
Equals(Point)
Declaration
public bool Equals(Point other)
Parameters
Type | Name | Description |
---|---|---|
Point | other | Point to compare with. |
Returns
Type | Description |
---|---|
Boolean | true if the two Point are equal, false otherwise. |
Remarks
Two Point are equal if their coordinates are equal.
Equals(Object)
Structure defining a point in three-dimensional projective space.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
GetCoordinates()
Gets the coordinates of the current Point.
Declaration
public double[] GetCoordinates()
Returns
Type | Description |
---|---|
Double[] | The array representation of the Point's coordinates. |
GetHashCode()
Structure defining a point in three-dimensional projective space.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Multiply(Point, Double)
Computes the scalar multiplication of a Point with a
Declaration
public static Point Multiply(Point operand, double factor)
Parameters
Type | Name | Description |
---|---|---|
Point | operand | Point to multiply. |
Double | factor |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the scalar multiplication. |
Multiply(Double, Point)
Computes the scalar multiplication of a Point with a
Declaration
public static Point Multiply(double factor, Point operand)
Parameters
Type | Name | Description |
---|---|---|
Double | factor | |
Point | operand | Point to multiply. |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the scalar multiplication. |
Subtract(Point, Point)
Computes the subtraction of two Point.
Declaration
public static Point Subtract(Point left, Point right)
Parameters
Type | Name | Description |
---|---|---|
Point | left | Point to subtract. |
Point | right | Point to subtract with. |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the subtraction. |
ToString()
Structure defining a point in three-dimensional projective space.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Operators
| Improve this Doc View SourceAddition(Point, Point)
Computes the addition of two Point.
Declaration
public static Point operator +(Point left, Point right)
Parameters
Type | Name | Description |
---|---|---|
Point | left | Point for the addition. |
Point | right | Point for the addition. |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the addition. |
Division(Point, Double)
Computes the scalar division of a Point with a
Declaration
public static Point operator /(Point operand, double divisor)
Parameters
Type | Name | Description |
---|---|---|
Point | operand | Point to divide. |
Double | divisor |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the scalar division. |
Explicit(Point to Point)
Declaration
public static explicit operator Point(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point | Point to convert. |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the conversion. |
Multiply(Point, Double)
Computes the scalar multiplication of a Point with a
Declaration
public static Point operator *(Point operand, double factor)
Parameters
Type | Name | Description |
---|---|---|
Point | operand | Point to multiply. |
Double | factor |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the scalar multiplication. |
Multiply(Double, Point)
Computes the scalar multiplication of a Point with a
Declaration
public static Point operator *(double factor, Point operand)
Parameters
Type | Name | Description |
---|---|---|
Double | factor | |
Point | operand | Point to multiply. |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the scalar multiplication. |
Subtraction(Point, Point)
Computes the subtraction of two Point.
Declaration
public static Point operator -(Point left, Point right)
Parameters
Type | Name | Description |
---|---|---|
Point | left | Point to subtract. |
Point | right | Point to subtract with. |
Returns
Type | Description |
---|---|
Point | The new Point resulting from the subtraction. |
UnaryNegation(Point)
Computes the opposite of the given Point.
Declaration
public static Point operator -(Point operand)
Parameters
Type | Name | Description |
---|---|---|
Point | operand | Point to be opposed. |
Returns
Type | Description |
---|---|
Point | The new Point, opposite of the initial one. |
Explicit Interface Implementations
| Improve this Doc View SourceIAddable<Point>.Add(Point)
Computes the addition of the current element with another element on the right.
Declaration
Point IAddable<Point>.Add(Point right)
Parameters
Type | Name | Description |
---|---|---|
Point | right |
Returns
Type | Description |
---|---|
Point | The new element resulting from the addition. |
IGroupAction<Point, Double>.Divide(Double)
Computes the right scalar division of the current element.
Declaration
Point IGroupAction<Point, double>.Divide(double divisor)
Parameters
Type | Name | Description |
---|---|---|
Double | divisor |
Returns
Type | Description |
---|---|
Point | The new element resulting from the scalar dividion. |
IGroupAction<Point, Double>.Multiply(Double)
Computes the right scalar multiplication of the current element.
Declaration
Point IGroupAction<Point, double>.Multiply(double factor)
Parameters
Type | Name | Description |
---|---|---|
Double | factor |
Returns
Type | Description |
---|---|
Point | The new element resulting from the scalar multiplication. |