Point4d

References
[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 32)] [DebuggerDisplay("({m_x}, {m_y}, {m_z}, [{m_w}])")] [Serializable] public struct Point4d : ISerializable, IEquatable<Point4d>, IEpsilonComparable<Point4d>, IFormattable
Represents the four coordinates of a point in four-dimensional space.

The W (fourth) dimension is often considered the weight of the point as seen in 3D space.

Constructors

Point4d

#Since v5.0
public Point4d(double x, double y, double z, double w)
Initializes a new instance of the Point4d class based on coordinates.
x (double)The X (first) dimension.
y (double)The Y (second) dimension.
z (double)The Z (third) dimension.
w (double)The W (fourth) dimension, or weight.

Point4d

#Since v5.0
public Point4d(Point3d point)
Initializes a new instance of the Point4d class from the coordinates of a point.
point (Point3d).

Point4d

#Since v6.0
public Point4d(Point4d point)
Initializes a new point by copying coordinates from another point.
point (Point4d)A point.

Properties

IsValid

#Since v6.0
public bool IsValid { get; }
Returns an indication regarding the validity of this point.

Unset

#Since v5.0
public static Point4d Unset { get; }
Gets the value of a point with all coordinates set as RhinoMath.UnsetValue.

W

#Since v5.0
public double W { get; set; }
Gets or sets the W (fourth) coordinate -or weight- of this point.

X

#Since v5.0
public double X { get; set; }
Gets or sets the X (first) coordinate of this point.

Y

#Since v5.0
public double Y { get; set; }
Gets or sets the Y (second) coordinate of this point.

Z

#Since v5.0
public double Z { get; set; }
Gets or sets the Z (third) coordinate of this point.

Methods

Add

#Since v5.0
public static Point4d Add(Point4d point1, Point4d point2)
Sums two Point4d together.

(Provided for languages that do not support operator overloading. You can use the + operator otherwise)

point1 (Point4d)First point.
point2 (Point4d)Second point.
A new point that results from the weighted addition of point1 and point2.

EpsilonEquals

#Since v5.4
[ConstOperation] public bool EpsilonEquals(Point4d other, double epsilon)
Check that all values in other are within epsilon of the values in this
other (Point4d)
epsilon (double)
EpsilonEquals

Equals

#
[ConstOperation] public override bool Equals(object obj)
Determines whether the specified System.Object is Point4d and has same coordinates as the present point.
obj (object)The specified object.
true if obj is Point4d and has the same coordinates as this; otherwise false.
ValueType.Equals

Equals

#Since v5.0
[ConstOperation] public bool Equals(Point4d point)
Determines whether the specified point has same value as the present point.
point (Point4d)The specified point.
true if point has the same value as this; otherwise false.

GetHashCode

#
[ConstOperation] public override int GetHashCode()
Computes the hash code for the present point.
A non-unique hash code, which uses all coordinates of this object.

Multiply

#Since v5.0
public static Point4d Multiply(Point4d point, double d)
Multiplies a point by a number.

(Provided for languages that do not support operator overloading. You can use the * operator otherwise)

point (Point4d)A point.
d (double)A number.
A new point that results from the coordinate-wise multiplication of point with d.

Subtract

#Since v5.0
public static Point4d Subtract(Point4d point1, Point4d point2)
Subtracts the second point from the first point.

(Provided for languages that do not support operator overloading. You can use the - operator otherwise)

point1 (Point4d)First point.
point2 (Point4d)Second point.
A new point that results from the weighted subtraction of point2 from point1.
Explicit

ISerializable.GetObjectData

#
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
info (SerializationInfo)
context (StreamingContext)

ToString

#
[ConstOperation] public override string ToString()
Returns the fully qualified type name of this instance.
The fully qualified type name.

ToString

#Since v7.0
[ConstOperation] public string ToString(string format, IFormatProvider formatProvider)
Formats the value of the current instance using the specified format.
format (string)The format to use. -or- A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.
formatProvider (IFormatProvider)The provider to use to format the value. -or- A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.
The value of the current instance in the specified format.

Transform

#Since v6.0
public void Transform(Transform xform)
Transforms the present point in place. The transformation matrix acts on the left of the point. i.e.,

result = transformation*point

xform (Transform)Transformation to apply.

Operators

OperationResultDescription
Point4d+Point4dPoint4dSums two Point4d together.
Point4d==Point4dboolDetermines whether two Point4d have equal values.
Point4d!=Point4dboolDetermines whether two Point4d have different values.
Point4d*Point4ddoubleMultiplies two Point4d together, returning the dot (internal) product of the two. This is not the cross product.
Point4d*doublePoint4dMultiplies a point by a number.
Point4d-Point4dPoint4dSubtracts the second point from the first point.