• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Paramdigma.Core
    • Convert
    • Intersect3D
    • Intersect3D.LineLineIntersectionResult
    • Intersect3D.LineLineIntersectionStatus
    • Intersect3D.LinePlaneIntersectionStatus
    • Intersect3D.RayFacePerimeterIntersectionStatus
    • Settings
  • Paramdigma.Core.Collections
    • Interval
    • Matrix<T>
  • Paramdigma.Core.Curves
    • Geodesics
    • LevelSets
  • Paramdigma.Core.Exceptions
    • UnsetGeometryException
  • Paramdigma.Core.Extensions
    • Lists
  • Paramdigma.Core.Geometry
    • BaseCurve
    • BasePoint
    • Box
    • Circle
    • Cylinder
    • Delaunay
    • InvalidCurveException
    • Line
    • Line2d
    • Mesh
    • MeshCorner
    • MeshEdge
    • MeshFace
    • MeshGeometry
    • MeshHalfEdge
    • MeshPoint
    • MeshTopology
    • MeshVertex
    • NurbsCurve
    • NurbsSurface
    • Plane
    • Point2d
    • Point3d
    • Point4d
    • Polyline
    • Polyline2d
    • Ray
    • Ray2d
    • Rectangle2d
    • Sphere
    • Torus
    • Vector2d
    • Vector3d
    • VectorNd
  • Paramdigma.Core.Geometry.Interfaces
    • ICurve
    • ISurface
    • IVector
  • Paramdigma.Core.IO
    • CsvReader
    • CsvWritter
    • OBJMeshData
    • ObjReader
    • ObjWritter
    • OffMeshData
    • OffReader
    • OffResult
    • OffWriter
  • Paramdigma.Core.LinearAlgebra
    • Complex
    • LeastSquaresLinearFit
    • Triplet
    • TripletData
  • Paramdigma.Core.Optimization
    • GradientDescent
    • GradientDescent.FitnessFunction
    • GradientDescentOptions
    • GradientDescentResult
    • KMeansCluster
    • KMeansClustering
    • KMeansClustering.IterationCompletedEventArgs
  • Paramdigma.Core.Spatial
    • DelaunayEdge
    • DelaunayPoint
    • DelaunayTriangle
    • Octree
    • PointCloud
    • PointCloudMember
    • QuadTree

Class Point2d

2-Dimensional point.

Inheritance
System.Object
Point2d
DelaunayPoint
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class Point2d : object

Constructors

| Improve this Doc View Source

Point2d()

Initializes a new instance of the Point2d class.

Declaration
public Point2d()
| Improve this Doc View Source

Point2d(Point2d)

Initializes a new instance of the Point2d class from an existing point.

Declaration
public Point2d(Point2d pt)
Parameters
Type Name Description
Point2d pt

A 2D point.

| Improve this Doc View Source

Point2d(Double, Double)

Initializes a new instance of the Point2d class from x and y coordinates.

Declaration
public Point2d(double x, double y)
Parameters
Type Name Description
System.Double x

X coordinate of the point.

System.Double y

Y coordinate of the point.

Properties

| Improve this Doc View Source

Origin

Gets a new 2d point with all coordinates =0.

Declaration
public static Point2d Origin { get; }
Property Value
Type Description
Point2d

Origin 2d point.

| Improve this Doc View Source

X

Gets or sets the X coordinate of the point.

Declaration
public double X { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Y

Gets or sets the Y coordinate of the point.

Declaration
public double Y { get; set; }
Property Value
Type Description
System.Double

Methods

| Improve this Doc View Source

Equals(Object)

Compares a Point2d instance to the given objects.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

Object to compare to.

Returns
Type Description
System.Boolean

Returns true if object is equals, false if not.

| Improve this Doc View Source

GetHashCode()

Gets the hash code for the corresponding Point2d instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

Returns an int representing the Point2d hash code.

| Improve this Doc View Source

ToString()

String representation of a 2-dimensional point instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

Returns string representation of this Point2d instance.

Operators

| Improve this Doc View Source

Addition(Point2d, Point2d)

Add two points together.

Declaration
public static Vector2d operator +(Point2d point, Point2d point2)
Parameters
Type Name Description
Point2d point

First point.

Point2d point2

Second point.

Returns
Type Description
Vector2d

Addition result.

| Improve this Doc View Source

Addition(Point2d, Vector2d)

Divides a point by a number.

Declaration
public static Point2d operator +(Point2d point, Vector2d v)
Parameters
Type Name Description
Point2d point

Point.

Vector2d v

Vector.

Returns
Type Description
Point2d

Division result.

| Improve this Doc View Source

Division(Point2d, Double)

Divides a point by a number.

Declaration
public static Point2d operator /(Point2d point, double scalar)
Parameters
Type Name Description
Point2d point

Point.

System.Double scalar

Operand.

Returns
Type Description
Point2d

Division result.

| Improve this Doc View Source

Equality(Point2d, Point2d)

Equality comparison between points.

Declaration
public static bool operator ==(Point2d point, Point2d point2)
Parameters
Type Name Description
Point2d point

First point.

Point2d point2

Second point.

Returns
Type Description
System.Boolean

True if equal.

| Improve this Doc View Source

Explicit(Vector2d to Point2d)

Explicit conversion from 2-dimensional point to vector.

Declaration
public static explicit operator Point2d(Vector2d v)
Parameters
Type Name Description
Vector2d v

Vector to convert.

Returns
Type Description
Point2d
| Improve this Doc View Source

Implicit(Point2d to Vector2d)

Implicit conversion from 2-dimensional point to vector.

Declaration
public static implicit operator Vector2d(Point2d pt)
Parameters
Type Name Description
Point2d pt

Point to convert.

Returns
Type Description
Vector2d
| Improve this Doc View Source

Inequality(Point2d, Point2d)

Inequality comparison between points.

Declaration
public static bool operator !=(Point2d point, Point2d point2)
Parameters
Type Name Description
Point2d point

First point.

Point2d point2

Second point.

Returns
Type Description
System.Boolean

True if NOT equal.

| Improve this Doc View Source

Multiply(Point2d, Double)

Multiplies a point by a number.

Declaration
public static Point2d operator *(Point2d point, double scalar)
Parameters
Type Name Description
Point2d point

Point to multiply.

System.Double scalar

Operand.

Returns
Type Description
Point2d

Multiplication result.

| Improve this Doc View Source

Multiply(Double, Point2d)

Multiplies a point by a number.

Declaration
public static Point2d operator *(double scalar, Point2d point)
Parameters
Type Name Description
System.Double scalar

Operand.

Point2d point

Point to multiply.

Returns
Type Description
Point2d

Multiplication result.

| Improve this Doc View Source

Subtraction(Point2d, Point2d)

Substracts one point from another.

Declaration
public static Vector2d operator -(Point2d point, Point2d point2)
Parameters
Type Name Description
Point2d point

First point.

Point2d point2

Second point.

Returns
Type Description
Vector2d

Substraction result.

| Improve this Doc View Source

UnaryNegation(Point2d)

Negates a given point.

Declaration
public static Point2d operator -(Point2d point)
Parameters
Type Name Description
Point2d point

Point to negate.

Returns
Type Description
Point2d

Negation result.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX