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
Initializes a new instance of the Point4d class based on coordinates.
public Point4d(
x,
The X (first) dimension.
y,
The Y (second) dimension.
z,
The Z (third) dimension.
w
The W (fourth) dimension, or weight.
)

Point4d

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

Point4d

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

Properties

IsValid

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

Unset

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

W

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

X

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

Y

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

Z

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

Methods

Add

#Since v5.0
Sums two Point4d together.

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

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

EpsilonEquals

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

Equals

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

Equals

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

GetHashCode

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

Multiply

#Since v5.0
Multiplies a point by a number.

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

public static Point4d Multiply(
point,
A point.
d
A number.
)
A new point that results from the coordinate-wise multiplication of point with d.

Subtract

#Since v5.0
Subtracts the second point from the first point.

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

public static Point4d Subtract(
point1,
First point.
point2
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()

ToString

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

ToString

#Since v7.0
Formats the value of the current instance using the specified format.
[ConstOperation] public string ToString(
format,
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
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
Transforms the present point in place. The transformation matrix acts on the left of the point. i.e.,

result = transformation*point

public void Transform(
Transform
xform
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.