Point3d
Represents the three coordinates of a point in three-dimensional space, using Double-precision floating point values.
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
[SerializableAttribute]public struct Point3d : ISerializable, IEquatable<Point3d>, IComparable<Point3d>, IComparable, IEpsilonComparable<Point3d>, ICloneable, IFormattable
The Point3d type exposes the following members.
Constructors
Name
Description
Public Method
Point3d(Point3d)
Initializes a new point by copying coordinates from another point.
Public Method
Point3d(Point3f)
Initializes a new point by copying coordinates from a single-precision point.
Public Method
Point3d(Point4d)
Initializes a new point by copying coordinates from a four-dimensional point. The first three coordinates are divided by the last one. If the W (fourth) dimension of the input point is zero, then it will be just discarded.
Public Method
Point3d(Vector3d)
Initializes a new point by copying coordinates from the components of a vector.
Public Method
Code Example
Point3d(Double, Double, Double)
Initializes a new point by defining the X, Y and Z coordinates.
Properties
Name
Description
Public Property
IsValid
Each coordinate of the point must pass the
IsValidDouble(Double)
test.Public Property
Item
Gets or sets an indexed coordinate of this point.
Public Property
MaximumCoordinate
Gets the largest (both positive and negative) valid coordinate in this point, or RhinoMath.UnsetValue if no coordinate is valid, as an absolute value.
Public Property
MinimumCoordinate
Gets the smallest (both positive and negative) coordinate value in this point.
Public Property
Static Member
Origin
Gets the value of a point at location 0,0,0.
Public Property
Static Member
Unset
Gets the value of a point at location RhinoMath.UnsetValue,RhinoMath.UnsetValue,RhinoMath.UnsetValue.
Public Property
X
Gets or sets the X (first) coordinate of this point.
Public Property
Y
Gets or sets the Y (second) coordinate of this point.
Public Property
Z
Gets or sets the Z (third) coordinate of this point.
Methods
Name
Description
Public Method
Static Member
Add(Point3d, Point3d)
Sums two Point3d instances.
(Provided for languages that do not support operator overloading. You can use the + operator otherwise)
Public Method
Static Member
Add(Point3d, Vector3d)
Sums up a point and a vector, and returns a new point.
(Provided for languages that do not support operator overloading. You can use the + operator otherwise)
Public Method
Static Member
Add(Point3d, Vector3f)
Sums up a point and a vector, and returns a new point.
(Provided for languages that do not support operator overloading. You can use the + operator otherwise)
Public Method
Static Member
Add(Vector3d, Point3d)
Sums up a point and a vector, and returns a new point.
(Provided for languages that do not support operator overloading. You can use the + operator otherwise)
Public Method
Static Member
ArePointsCoplanar
Determines whether a set of points is coplanar within a given tolerance.
Public Method
CompareTo
Compares this Point3d with another Point3d.
Component evaluation priority is first X, then Y, then Z.
Public Method
Static Member
CullDuplicates
Removes duplicates in the supplied set of points.
Public Method
Code Example
DistanceTo
Computes the distance between two points.
Public Method
DistanceToSquared
Computes the square of the distance between two points.
This method is usually largely faster than DistanceTo().
Public Method
Static Member
Divide
Divides a Point3d by a number.
(Provided for languages that do not support operator overloading. You can use the / operator otherwise)
Public Method
EpsilonEquals
Check that all values in other are within epsilon of the values in this
Public Method
Equals(Object)
Determines whether the specified Object is a Point3d and has the same values as the present point.
(Overrides ValueType.Equals(Object).)
Public Method
Equals(Point3d)
Determines whether the specified Point3d has the same values as the present point.
Public Method
Static Member
FromPoint3f
Converts a single-precision point in a double-precision point.
Public Method
GetHashCode
Computes a hash code for the present point.
(Overrides ValueType.GetHashCode..)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public Method
Interpolate
Interpolate between two points.
Public Method
Static Member
Multiply(Double, Point3d)
Multiplies a Point3d by a number.
(Provided for languages that do not support operator overloading. You can use the * operator otherwise)
Public Method
Static Member
Multiply(Point3d, Double)
Multiplies a Point3d by a number.
(Provided for languages that do not support operator overloading. You can use the * operator otherwise)
Public Method
Static Member
SortAndCullPointList
Orders a set of points so they will be connected in a “reasonable polyline” order.
Also, removes points from the list if their common distance exceeds a specified threshold.
Public Method
Static Member
Subtract(Point3d, Point3d)
Subtracts a point from another point.
(Provided for languages that do not support operator overloading. You can use the - operator otherwise)
Public Method
Static Member
Subtract(Point3d, Vector3d)
Subtracts a vector from a point.
(Provided for languages that do not support operator overloading. You can use the - operator otherwise)
Public Method
ToString.
Constructs the string representation for the current point.
(Overrides ValueType.ToString..)
Public Method
ToString(String, IFormatProvider)
Formats the value of the current instance using the specified format.
Public Method
Code Example
Transform
Transforms the present point in place. The transformation matrix acts on the left of the point. i.e.,
result = transformation*point
Public Method
Static Member
TryParse
Converts the string representation of a point to the equivalent Point3d structure.
Operators
Name
Description
Public Operator
Static Member
Addition(Point3d, Point3d)
Sums two Point3d instances.
Public Operator
Static Member
Addition(Point3d, Vector3d)
Sums up a point and a vector, and returns a new point.
Public Operator
Static Member
Addition(Point3d, Vector3f)
Sums up a point and a vector, and returns a new point.
Public Operator
Static Member
Addition(Vector3d, Point3d)
Sums up a point and a vector, and returns a new point.
Public Operator
Static Member
Division
Divides a Point3d by a number.
Public Operator
Static Member
Equality
Determines whether two Point3d have equal values.
Public Operator
Static Member
.(Point3d to Vector3d)
Converts a point in a vector, needing casting.
Public Operator
Static Member
.(Vector3d to Point3d)
Converts a vector in a point, needing casting.
Public Operator
Static Member
GreaterThan
Determines whether the first specified point comes after (has superior sorting value than) the second point.
Coordinates evaluation priority is first X, then Y, then Z.
Public Operator
Static Member
GreaterThanOrEqual
Determines whether the first specified point comes after (has superior sorting value than) the second point, or it is equal to it.
Coordinates evaluation priority is first X, then Y, then Z.
Public Operator
Static Member
.(Point3d to ControlPoint)
Converts a point in a control point, without needing casting.
Public Operator
Static Member
.(Point3f to Point3d)
Converts a single-precision point in a double-precision point, without needing casting.
Public Operator
Static Member
Inequality
Determines whether two Point3d have different values.
Public Operator
Static Member
LessThan
Determines whether the first specified point comes before (has inferior sorting value than) the second point.
Coordinates evaluation priority is first X, then Y, then Z.
Public Operator
Static Member
LessThanOrEqual
Determines whether the first specified point comes before (has inferior sorting value than) the second point, or it is equal to it.
Coordinates evaluation priority is first X, then Y, then Z.
Public Operator
Static Member
Multiply(Double, Point3d)
Multiplies a Point3d by a number.
Public Operator
Static Member
Multiply(Point3d, Double)
Multiplies a Point3d by a number.
Public Operator
Static Member
Subtraction(Point3d, Point3d)
Subtracts a point from another point.
Public Operator
Static Member
Subtraction(Point3d, Vector3d)
Subtracts a vector from a point.
Public Operator
Static Member
UnaryNegation
Computes the additive inverse of all coordinates in the point, and returns the new point.