Point2d Class
Public Class Point2d
Inherits Geometry2d
Implements IComparable, _
IPosition2d
This language is not supported or no code example is available.
public class Point2d : Geometry2d,
IComparable,
IPosition2d
This language is not supported or no code example is available.
public ref class Point2d : public Geometry2d^,
public IComparable^,
public IPosition2d^
This language is not supported or no code example is available.
public class Point2d
extends Geometry2d
implements IComparable,
IPosition2d
This language is not supported or no code example is available.
| Name | Description | |
|---|---|---|
|
Point2d() | Constructor. Creates a new point at 0,0 |
|
Point2d(Point2d) | Copy constructor. |
|
Point2d(Vector2d) | |
|
Point2d(double, double) | Constructor that creates a point at a specified position. |
| Name | Description | |
|---|---|---|
|
Extents | Gets the extents of the point. |
|
Item(int) | Indexing a point returns x for index 0, and y for index 1. This is to be more compatible with old c-style code. |
|
Origo | The point (0, 0). |
|
X | Gets the x coordinate of the point. The x member of the point is public, but this is to implement the IPosition2d interface. |
|
XAxis | The point (1, 0). |
|
Y | Gets the y coordinate of the point. The x member of the point is public, but this is to implement the IPosition2d interface. |
|
YAxis | The point (0, 1). |
| Name | Description | |
|---|---|---|
|
Angle(Point2d) | Returns an plane angle from this point to another. |
|
Clone() | |
|
ClosestPoint(IEnumerable<Point2d>) | Returns a reference to the point that is closest to this point or throws an ArgumentException if no points are given. |
|
CompareTo(object) | Implements the i comparable interface. The point with the smallest y is the smallest point. If y is same for the points, the one with smallest x is the smallest one. This is suitable for sorting points for sweep algorithms for example. |
|
CompareToX(Point2d) | |
|
Distance(Point2d) | Computes the distance from this to another point. |
|
Equals(Point2d, double) | Checks if this point is about the same as another point with a given tolerance. |
|
Mirror(Point2d, Point2d) | Mirrors the point in-place over a reflection line given by two points. |
|
Mirror(Point2d) | Mirrors the point over another point. This equals rotating it 180 degrees around the other point, although this is done much faster with this function. |
|
Polar(double, double) | Computes a new point with a specified angle and distance from this point. |
|
Rotate(double) | Rotates this point in-place around world origo. |
|
Rotate(double, Point2d) | Rotates this point in-place around another point. |
|
Scale(double) | Scales the point, using world origo as scaling center. |
|
Scale(double, Point2d) | Scales the point, using a specified scaling center. |
|
Scale(double, double, Point2d) | Scales the point diffrently in x and y, using a specified scaling center. |
|
Side(Point2d, Point2d, double) | Check the relative side of a point to a infinite line passing through two given points. |
|
SquaredDistance(Point2d) | Returns the suqared distance between this point and another. This is faster than computing the actual distance since it saves a square root calculation. |
|
ToRegion(double) | Converts this point to a region representation. A point is represented as a poly with a single point. |
|
ToString() | Creates a new string sutiable for debugging purposes. |
|
ToVector() | Create a vector (x,y) from the point (x,y). |
|
Transform(Matrix2d) | Transforms the point in-place by a matrix. |
|
Translate(double, double) | Moves the point a specified delta x and delta y. |
|
WriteAutoCADScript(StreamWriter, int) | Writes text to a stream, that can be loaded as a script into autocad. |
| Name | Description | |
|---|---|---|
|
Addition | Adds a vector to the point giving a new point. |
|
Addition | |
|
GreaterThan | Compares two points using the first points IComparable interface. |
|
GreaterThanOrEqual | Compares two points using the first points IComparable interface. |
|
LessThan | Compares two points using the first points IComparable interface. |
|
LessThanOrEqual | Compares two points using the first points IComparable interface. |
|
Multiply | Multiplies a point with a constant |
|
Multiply | |
|
Subtraction | |
|
Subtraction | Subtracts two points, giving a new vector from point 2 to point 1. |