Click or drag to resize

Point2d Structure

Represents the two coordinates of a point in two-dimensional space, using Double-precision floating point numbers.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
[SerializableAttribute]
public struct Point2d : ISerializable, IEquatable<Point2d>, 
	IComparable<Point2d>, IComparable, IEpsilonComparable<Point2d>, 
	IFormattable

The Point2d type exposes the following members.

Constructors
  NameDescription
Public methodPoint2d(Point2d)
Initializes a new instance of Point2d by copying another Point2d.
Public methodPoint2d(Point3d)
Initializes a new instance of Point3d by copying the first two coordinates of a Point3d.
Public methodPoint2d(Vector2d)
Initializes a new instance of Point2d by converting a vector.
Public methodPoint2d(Double, Double)
Initializes a new instance of Point2d from coordinates.
Top
Properties
  NameDescription
Public propertyIsValid
If any coordinate of a point is UnsetValue, then the point is not valid.
Public propertyItem
Accesses the coordinates of this point.
Public propertyMaximumCoordinate
Gets the largest valid coordinate, or RhinoMath.UnsetValue if no coordinate is valid.
Public propertyMinimumCoordinate
Gets the smallest (both positive and negative) valid coordinate, or RhinoMath.UnsetValue if no coordinate is valid.
Public propertyStatic memberOrigin
Gets a point at 0,0.
Public propertyStatic memberUnset
Gets a point at RhinoMath.UnsetValue,RhinoMath.UnsetValue.
Public propertyX
Gets or sets the X (first) coordinate of the point.
Public propertyY
Gets or sets the Y (second) coordinate of the point.
Top
Methods
  NameDescription
Public methodStatic memberAdd(Point2d, Point2d)
Adds a point with a point.

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

Public methodStatic memberAdd(Point2d, Vector2d)
Adds a point with a vector.

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

Public methodStatic memberAdd(Vector2d, Point2d)
Adds a vector with a point.

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

Public methodCompareTo
Compares this Point2d with another Point2d.

Coordinates evaluation priority is first X, then Y.

Public methodCode exampleDistanceTo
Computes the distance between two points.
Public methodDistanceToSquared
Computes the square of the distance between two 2d points.

This method is usually largely faster than DistanceTo().

Public methodStatic memberDivide
Divides a Point2d by a number.

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

Public methodEpsilonEquals
Check that all values in other are within epsilon of the values in this
Public methodEquals(Object)
Determines whether the specified System.Object is a Point2d and has the same values as the present point.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Point2d)
Determines whether the specified Point2d has the same values as the present point.
Public methodGetHashCode
Computes a hash number that represents the current point.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberMultiply(Double, Point2d)
Multiplies a Point2d by a number.

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

Public methodStatic memberMultiply(Point2d, Double)
Multiplies a Point2d by a number.

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

Public methodStatic memberSubtract(Point2d, Point2d)
Subtracts the second point from the first point.

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

Public methodStatic memberSubtract(Point2d, Vector2d)
Subtracts a vector from a point.

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

Public methodToString
Constructs the string representation for the current point.
(Overrides ValueTypeToString.)
Public methodToString(String, IFormatProvider)
Formats the value of the current instance using the specified format.
Public methodTransform
Transforms the present point in place. The transformation matrix acts on the left of the point. i.e.,

result = transformation*point

Top
Operators
  NameDescription
Public operatorStatic memberAddition(Point2d, Point2d)
Adds a point with a point.
Public operatorStatic memberAddition(Point2d, Vector2d)
Adds a point with a vector.
Public operatorStatic memberAddition(Vector2d, Point2d)
Adds a vector with a point.
Public operatorStatic memberDivision
Divides a Point2d by a number.
Public operatorStatic memberEquality
Determines whether two Point2d have equal values.
Public operatorStatic memberGreaterThan
Determines whether the first specified Point2d comes after (has superior sorting value than) the second point.

Coordinates evaluation priority is first X, then Y.

Public operatorStatic memberGreaterThanOrEqual
Determines whether the first specified Point2d comes after (has superior sorting value than) the second point, or it is equal to it.

Coordinates evaluation priority is first X, then Y.

Public operatorStatic memberInequality
Determines whether two Point2d have different values.
Public operatorStatic memberLessThan
Determines whether the first specified point comes before (has inferior sorting value than) the second point.

Coordinates evaluation priority is first X, then Y.

Public operatorStatic memberLessThanOrEqual
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.

Public operatorStatic memberMultiply(Double, Point2d)
Multiplies a Point2d by a number.
Public operatorStatic memberMultiply(Point2d, Double)
Multiplies a Point2d by a number.
Public operatorStatic memberSubtraction(Point2d, Point2d)
Subtracts point2 from point1.
Public operatorStatic memberSubtraction(Point2d, Vector2d)
Subtracts a vector from a point.
Top
See Also