Show / Hide Table of Contents

Struct GeoPoint

A 3-dimensional point with double components. The components are directly accesible to achieve maximum speed.

note

Keep in mind that this is a value type. Passing a value type as a (non ref) parameter and changing it's value inside the invoked method leaves the original unchanged.

Implements
System.Runtime.Serialization.ISerializable
IJsonSerialize
IExportStep
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: CADability
Assembly: CADability.dll
Syntax
[Serializable]
[JsonVersion(serializeAsStruct = true, version = 1)]
public struct GeoPoint : ISerializable, IJsonSerialize, IExportStep

Constructors

| Improve this Doc View Source

GeoPoint(GeoPoint, GeoPoint)

Constructs a new GeoPoint in the middle between two other GeoPoints

Declaration
public GeoPoint(GeoPoint p1, GeoPoint p2)
Parameters
Type Name Description
GeoPoint p1

first point

GeoPoint p2

second point

| Improve this Doc View Source

GeoPoint(GeoPoint, GeoPoint, Double)

Declaration
public GeoPoint(GeoPoint p1, GeoPoint p2, double ratio)
Parameters
Type Name Description
GeoPoint p1
GeoPoint p2
System.Double ratio
| Improve this Doc View Source

GeoPoint(GeoPoint, Double, Double, Double)

Constructs a new GeoPoint as on offset from an existing GeoPoint.

Declaration
public GeoPoint(GeoPoint StartWith, double OffsetX, double OffsetY, double OffsetZ)
Parameters
Type Name Description
GeoPoint StartWith

from here

System.Double OffsetX

x-offset

System.Double OffsetY

y-offset

System.Double OffsetZ

z-offset

| Improve this Doc View Source

GeoPoint(GeoPoint[])

Constructs a ne GeoPoint at the geometric middle of the provided points

Declaration
public GeoPoint(params GeoPoint[] p)
Parameters
Type Name Description
GeoPoint[] p
| Improve this Doc View Source

GeoPoint(GeoPoint2D)

Creates a GeoPoint with the z-coordinate 0.0 and x,y set to p.x,p.y

Declaration
public GeoPoint(GeoPoint2D p)
Parameters
Type Name Description
GeoPoint2D p

two dimensional point in the x/y Plane

| Improve this Doc View Source

GeoPoint(GeoPoint2D, Double)

Declaration
public GeoPoint(GeoPoint2D p, double z)
Parameters
Type Name Description
GeoPoint2D p
System.Double z
| Improve this Doc View Source

GeoPoint(Vector)

Declaration
public GeoPoint(Vector d)
Parameters
Type Name Description
MathNet.Numerics.LinearAlgebra.Double.Vector d
| Improve this Doc View Source

GeoPoint(Double, Double)

Constructs a new GeoPoint with given x and y components, z-component will be 0.0

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

x-component

System.Double y

y-component

| Improve this Doc View Source

GeoPoint(Double, Double, Double)

Constructs a new GeoPoint with given x, y and z components.

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

x-component

System.Double y

y-component

System.Double z

z-component

| Improve this Doc View Source

GeoPoint(SerializationInfo, StreamingContext)

Constructor for ISerializable

Declaration
public GeoPoint(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
System.Runtime.Serialization.StreamingContext context

Fields

| Improve this Doc View Source

x

x-component

Declaration
public double x
Field Value
Type Description
System.Double
| Improve this Doc View Source

y

y-component

Declaration
public double y
Field Value
Type Description
System.Double
| Improve this Doc View Source

z

z-component

Declaration
public double z
Field Value
Type Description
System.Double

Properties

| Improve this Doc View Source

Invalid

returns new GeoPoint(NaN, NaN, NaN);

Declaration
public static GeoPoint Invalid { get; }
Property Value
Type Description
GeoPoint
| Improve this Doc View Source

Item[Int32]

Declaration
public double this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
System.Double
| Improve this Doc View Source

Origin

returns the origin, same as new GeoPoint(0.0,0.0,0.0);

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

Methods

| Improve this Doc View Source

Center(GeoPoint[])

Creates a new GeoPoint at the center of the points provided in the parameter list.

Declaration
public static GeoPoint Center(params GeoPoint[] p)
Parameters
Type Name Description
GeoPoint[] p

List of points

Returns
Type Description
GeoPoint

The geometric center of p

| Improve this Doc View Source

Distance(GeoPoint)

Returns the distance from this point to the given point.

Declaration
public double Distance(GeoPoint To)
Parameters
Type Name Description
GeoPoint To

target point

Returns
Type Description
System.Double

distance

| Improve this Doc View Source

Equals(Object)

Overrides object.Equals

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

object to compare with

Returns
Type Description
System.Boolean

true if equal

Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Overrides object.GetHashCode()

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

hashcode

Overrides
System.ValueType.GetHashCode()
| Improve this Doc View Source

Project(Plane, GeoPoint)

Declaration
public GeoPoint2D Project(Plane plane, GeoPoint center)
Parameters
Type Name Description
Plane plane
GeoPoint center
Returns
Type Description
GeoPoint2D
| Improve this Doc View Source

To2D()

returns a 2-dimensional point by ommiting the z-component.

Declaration
public GeoPoint2D To2D()
Returns
Type Description
GeoPoint2D
| Improve this Doc View Source

ToPointF(ModOp)

Returns this point modified by ModOp m as a System.Drawing.PointF

Declaration
public PointF ToPointF(ModOp m)
Parameters
Type Name Description
ModOp m

modify by

Returns
Type Description
System.Drawing.PointF

modified point

| Improve this Doc View Source

ToString()

Overrides object.ToString()

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

x.ToString()+", "+y.ToString()+", "+z.ToString()

Overrides
System.ValueType.ToString()
| Improve this Doc View Source

ToVector()

Returns the vector that points from the origin to this point

Declaration
public GeoVector ToVector()
Returns
Type Description
GeoVector

Operators

| Improve this Doc View Source

Addition(GeoPoint, GeoVector)

Adds a vector (offset) to a GeoPoint

Declaration
public static GeoPoint operator +(GeoPoint p, GeoVector v)
Parameters
Type Name Description
GeoPoint p

the point

GeoVector v

the vector

Returns
Type Description
GeoPoint

offset point

| Improve this Doc View Source

BitwiseAnd(GeoPoint, GeoPoint)

Declaration
public static double operator &(GeoPoint p1, GeoPoint p2)
Parameters
Type Name Description
GeoPoint p1
GeoPoint p2
Returns
Type Description
System.Double
| Improve this Doc View Source

BitwiseOr(GeoPoint, GeoPoint)

Returns the distance of the two points

Declaration
public static double operator |(GeoPoint p1, GeoPoint p2)
Parameters
Type Name Description
GeoPoint p1

first point

GeoPoint p2

second point

Returns
Type Description
System.Double

the distance

| Improve this Doc View Source

Equality(GeoPoint, GeoPoint)

Determins whether two GeoPoints are exactly equal. Use IsEqual(GeoPoint, GeoPoint) if you need more control over precision.

Declaration
public static bool operator ==(GeoPoint p1, GeoPoint p2)
Parameters
Type Name Description
GeoPoint p1

first point

GeoPoint p2

secont point

Returns
Type Description
System.Boolean

true if equal

| Improve this Doc View Source

Implicit(GeoPoint to Double[])

Declaration
public static implicit operator double[](GeoPoint p)
Parameters
Type Name Description
GeoPoint p
Returns
Type Description
System.Double[]
| Improve this Doc View Source

Inequality(GeoPoint, GeoPoint)

Determins whether two GeoPoints are not equal. Use IsEqual(GeoPoint, GeoPoint) if you need more control over precision.

Declaration
public static bool operator !=(GeoPoint p1, GeoPoint p2)
Parameters
Type Name Description
GeoPoint p1

first point

GeoPoint p2

secont point

Returns
Type Description
System.Boolean

true if not equal

| Improve this Doc View Source

Multiply(Matrix, GeoPoint)

Declaration
public static GeoPoint operator *(Matrix m, GeoPoint p)
Parameters
Type Name Description
MathNet.Numerics.LinearAlgebra.Double.Matrix m
GeoPoint p
Returns
Type Description
GeoPoint
| Improve this Doc View Source

Subtraction(GeoPoint, GeoPoint)

Returns the vector that points from p1 to p2.

Declaration
public static GeoVector operator -(GeoPoint p1, GeoPoint p2)
Parameters
Type Name Description
GeoPoint p1

first point

GeoPoint p2

secont point

Returns
Type Description
GeoVector

the vector

| Improve this Doc View Source

Subtraction(GeoPoint, GeoVector)

Subtracts a vector (offset) from a GeoPoint

Declaration
public static GeoPoint operator -(GeoPoint p, GeoVector v)
Parameters
Type Name Description
GeoPoint p

the point

GeoVector v

the vector

Returns
Type Description
GeoPoint

offset point

| Improve this Doc View Source

UnaryNegation(GeoPoint)

Declaration
public static GeoPoint operator -(GeoPoint p)
Parameters
Type Name Description
GeoPoint p
Returns
Type Description
GeoPoint

Explicit Interface Implementations

| Improve this Doc View Source

IExportStep.Export(ExportStep, Boolean)

Declaration
int IExportStep.Export(ExportStep export, bool topLevel)
Parameters
Type Name Description
ExportStep export
System.Boolean topLevel
Returns
Type Description
System.Int32
| Improve this Doc View Source

IJsonSerialize.GetObjectData(IJsonWriteData)

Declaration
void IJsonSerialize.GetObjectData(IJsonWriteData data)
Parameters
Type Name Description
IJsonWriteData data
| Improve this Doc View Source

IJsonSerialize.SetObjectData(IJsonReadData)

Declaration
void IJsonSerialize.SetObjectData(IJsonReadData data)
Parameters
Type Name Description
IJsonReadData data
| Improve this Doc View Source

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
System.Runtime.Serialization.StreamingContext context

Implements

System.Runtime.Serialization.ISerializable
IJsonSerialize
IExportStep
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX