Class Point4d
Represents a 4-dimensional point.
Inherited Members
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class Point4d : BasePoint
Constructors
| Improve this Doc View SourcePoint4d()
Initializes a new instance of the Point4d class.
Declaration
public Point4d()
Point4d(Point3d)
Initializes a new instance of the Point4d class from a 3-dimensional point and a weight.
Declaration
public Point4d(Point3d pt)
Parameters
Type | Name | Description |
---|---|---|
Point3d | pt | Point. |
Point4d(Point3d, Double)
Initializes a new instance of the Point4d class from a 3-dimensional point and a weight.
Declaration
public Point4d(Point3d pt, double w)
Parameters
Type | Name | Description |
---|---|---|
Point3d | pt | Point. |
System.Double | w | Weight. |
Point4d(Double, Double, Double, Double)
Initializes a new instance of the Point4d class by cartesian coordinates and weight.
Declaration
public Point4d(double x, double y, double z, double w)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | X Coordinate. |
System.Double | y | Y Coordinate. |
System.Double | z | Z Coordinate. |
System.Double | w | Weight. |
Properties
| Improve this Doc View SourcePosition
Gets the raw position of the point4d (without taking into account weight).
Declaration
public Point3d Position { get; }
Property Value
Type | Description |
---|---|
Point3d |
Weight
Gets or sets the weight of this point.
Declaration
public double Weight { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceEquals(Object)
Performs a deep clone of the point.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Object to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a copy of this BasePoint instance. |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Operators
| Improve this Doc View SourceAddition(Point4d, Point4d)
Adds to points together.
Declaration
public static Point4d operator +(Point4d point, Point4d point2)
Parameters
Type | Name | Description |
---|---|---|
Point4d | point | First point to add. |
Point4d | point2 | Second point to add. |
Returns
Type | Description |
---|---|
Point4d | A new Point4d instance. |
Addition(Point4d, Vector3d)
Adds a vector and a point.
Declaration
public static Point4d operator +(Point4d point, Vector3d v)
Parameters
Type | Name | Description |
---|---|---|
Point4d | point | A 4d point |
Vector3d | v | A 3d vector |
Returns
Type | Description |
---|---|
Point4d | A new Point4d instance with the resulting coordinates. |
Division(Point4d, Double)
Divides a point by a scalar value.
Declaration
public static Point4d operator /(Point4d point, double scalar)
Parameters
Type | Name | Description |
---|---|---|
Point4d | point | Point to divide. |
System.Double | scalar | Number to divide point with. |
Returns
Type | Description |
---|---|
Point4d | A new Point4d instance. |
Equality(Point4d, Point4d)
Equality check between two Point4d instances.
Declaration
public static bool operator ==(Point4d point, Point4d point2)
Parameters
Type | Name | Description |
---|---|---|
Point4d | point | Point to check equality from. |
Point4d | point2 | Point to check equality to. |
Returns
Type | Description |
---|---|
System.Boolean | True if points are equal. |
Inequality(Point4d, Point4d)
Inequality check between two Point4d instances.
Declaration
public static bool operator !=(Point4d point, Point4d point2)
Parameters
Type | Name | Description |
---|---|---|
Point4d | point | Point to check inequality from. |
Point4d | point2 | Point to check inequality to. |
Returns
Type | Description |
---|---|
System.Boolean | True if points are NOT equal. |
Multiply(Point4d, Double)
Multiply a point by a scalar.
Declaration
public static Point4d operator *(Point4d point, double scalar)
Parameters
Type | Name | Description |
---|---|---|
Point4d | point | Point to be multiplied. |
System.Double | scalar | Number to multiply point with. |
Returns
Type | Description |
---|---|
Point4d | A new Point4d instance. |
Multiply(Double, Point4d)
Multiply a point by a scalar.
Declaration
public static Point4d operator *(double scalar, Point4d point)
Parameters
Type | Name | Description |
---|---|---|
System.Double | scalar | Number to multiply point with. |
Point4d | point | Point to be multiplied. |
Returns
Type | Description |
---|---|
Point4d | A new Point4d instance. |
Subtraction(Point4d, Point4d)
Subtracts one point from another.
Declaration
public static Point4d operator -(Point4d point, Point4d point2)
Parameters
Type | Name | Description |
---|---|---|
Point4d | point | Point to subtract from. |
Point4d | point2 | Point to be subtracted. |
Returns
Type | Description |
---|---|
Point4d | A new Point4d instance. |
UnaryNegation(Point4d)
Negates a point.
Declaration
public static Point4d operator -(Point4d point)
Parameters
Type | Name | Description |
---|---|---|
Point4d | point | Point to be negated. |
Returns
Type | Description |
---|---|
Point4d | A new Point4d instance. |