Extended .NET SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
OdGePoint2d.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (http://www.swig.org).
5// Version 4.0.2
6//
7// Do not make changes to this file unless you know what you are doing--modify
8// the SWIG interface file instead.
9//------------------------------------------------------------------------------
10
11namespace Teigha.Core {
12
13using System;
14using System.Runtime.InteropServices;
15
16public class OdGePoint2d : global::System.IDisposable {
17 private Object locker = new Object();
18 private HandleRef swigCPtr;
19 protected bool swigCMemOwn;
20 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
21 public OdGePoint2d(IntPtr cPtr, bool cMemoryOwn) {
22 swigCMemOwn = cMemoryOwn;
23 swigCPtr = new HandleRef(this, cPtr);
24 }
25 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
26 public static HandleRef getCPtr(OdGePoint2d obj) {
27 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
28 }
29
30 ~OdGePoint2d() {
31 Dispose(false);
32 }
33
34 public void Dispose() {
35 Dispose(true);
36 global::System.GC.SuppressFinalize(this);
37 }
38
39 protected virtual void Dispose(bool disposing) {
40 lock(this) {
41 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
42 if (swigCMemOwn) {
43 swigCMemOwn = false;
45 }
46 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
47 }
48 }
49 }
50
52 {
53 return p.Add(v);
54 }
56 {
57 return p.Sub(v);
58 }
59 public static OdGePoint2d operator *(OdGePoint2d v, double d)
60 {
61 return v.Mul(d);
62 }
63 public override string ToString()
64 {
65 if (swigCPtr.Handle == IntPtr.Zero) return "Empty";
66 return string.Format("({0}, {1})", x, y);
67 }
69 : this(GlobalsPINVOKE.new_OdGePoint2d__SWIG_1(point.x, point.y), true)
70 {
72 }
73
74 public OdGePoint2d() : this(GlobalsPINVOKE.new_OdGePoint2d__SWIG_0(), true) {
76 }
77
78 public OdGePoint2d(double xx, double yy) : this(GlobalsPINVOKE.new_OdGePoint2d__SWIG_1(xx, yy), true) {
80 }
81
82 public static OdGePoint2d kOrigin {
83 get {
84 global::System.IntPtr cPtr = GlobalsPINVOKE.OdGePoint2d_kOrigin_get();
85 OdGePoint2d ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdGePoint2d(cPtr, false);
87 return ret;
88 }
89 }
90
96
102
103 public OdGePoint2d rotateBy(double angle, OdGePoint2d basePoint) {
106 return new OdGePoint2d(this);
107}
108
114
120
121 public OdGePoint2d scaleBy(double scaleFactor, OdGePoint2d basePoint) {
122 OdGePoint2d ret = new OdGePoint2d(GlobalsPINVOKE.OdGePoint2d_scaleBy__SWIG_0(swigCPtr, scaleFactor, OdGePoint2d.getCPtr(basePoint)), false);
124 return ret;
125 }
126
127 public OdGePoint2d scaleBy(double scaleFactor) {
128 OdGePoint2d ret = new OdGePoint2d(GlobalsPINVOKE.OdGePoint2d_scaleBy__SWIG_1(swigCPtr, scaleFactor), false);
130 return ret;
131 }
132
133 public OdGePoint2d Mul(double scale) {
134 OdGePoint2d ret = new OdGePoint2d(GlobalsPINVOKE.OdGePoint2d_Mul__SWIG_0(swigCPtr, scale), true);
136 return ret;
137 }
138
139 public OdGePoint2d Div(double scale) {
140 OdGePoint2d ret = new OdGePoint2d(GlobalsPINVOKE.OdGePoint2d_Div__SWIG_0(swigCPtr, scale), true);
142 return ret;
143 }
144
150
156
162
168
174
175 public double distanceTo(OdGePoint2d point) {
176 double ret = GlobalsPINVOKE.OdGePoint2d_distanceTo(swigCPtr, OdGePoint2d.getCPtr(point));
178 return ret;
179 }
180
186
187 public bool IsEqual(OdGePoint2d point) {
188 bool ret = GlobalsPINVOKE.OdGePoint2d_IsEqual(swigCPtr, OdGePoint2d.getCPtr(point));
190 return ret;
191 }
192
193 public bool IsNotEqual(OdGePoint2d point) {
194 bool ret = GlobalsPINVOKE.OdGePoint2d_IsNotEqual(swigCPtr, OdGePoint2d.getCPtr(point));
196 return ret;
197 }
198
204
210
211 public double GetItem(uint i) {
212 double ret = GlobalsPINVOKE.OdGePoint2d_GetItem(swigCPtr, i);
214 return ret;
215 }
216
217 public OdGePoint2d set(double xx, double yy) {
218 GlobalsPINVOKE.OdGePoint2d_set(swigCPtr, xx, yy);
220 return new OdGePoint2d(this);
221}
222
223 public double x {
224 set {
227 }
228 get {
229 double ret = GlobalsPINVOKE.OdGePoint2d_x_get(swigCPtr);
231 return ret;
232 }
233 }
234
235 public double y {
236 set {
239 }
240 get {
241 double ret = GlobalsPINVOKE.OdGePoint2d_y_get(swigCPtr);
243 return ret;
244 }
245 }
246
247}
248
249}
static global::System.Exception Retrieve()
static double OdGePoint2d_y_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGePoint2d_scaleBy__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.IntPtr OdGePoint2d_Div__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static bool OdGePoint2d_IsNotEqual(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGePoint2d_set(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2, double jarg3)
static bool OdGePoint2d_isEqualTo__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.IntPtr OdGePoint2d_Sub__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static global::System.IntPtr OdGePoint2d_setToSum(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, IntPtr jarg3)
static global::System.IntPtr OdGePoint2d_transformBy(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdGePoint2d_isEqualTo__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGePoint2d_setToProduct(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void OdGePoint2d_y_set(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static double OdGePoint2d_distanceSqrdTo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGePoint2d_Add__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static global::System.IntPtr OdGePoint2d_Mul__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static global::System.IntPtr OdGePoint2d_mirror(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void delete_OdGePoint2d(global::System.Runtime.InteropServices.HandleRef jarg1)
static double OdGePoint2d_GetItem(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2)
static double OdGePoint2d_x_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdGePoint2d_IsEqual(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGePoint2d_kOrigin_get()
static global::System.IntPtr OdGePoint2d_rotateBy__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static global::System.IntPtr OdGePoint2d_scaleBy__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static void OdGePoint2d_x_set(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static global::System.IntPtr OdGePoint2d_Sub__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGePoint2d_rotateBy__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static IntPtr OdGePoint2d_asVector__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static double OdGePoint2d_distanceTo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static HandleRef getCPtr(OdGeLine2d obj)
Definition OdGeLine2d.cs:25
static HandleRef getCPtr(OdGeMatrix2d obj)
OdGePoint2d(OdGePoint2d point)
OdGePoint2d Mul(double scale)
static OdGePoint2d operator-(OdGePoint2d p, OdGeVector2d v)
OdGePoint2d Add(OdGeVector2d vect)
OdGePoint2d(double xx, double yy)
double distanceSqrdTo(OdGePoint2d point)
OdGePoint2d rotateBy(double angle)
OdGePoint2d scaleBy(double scaleFactor)
bool isEqualTo(OdGePoint2d point, OdGeTol tol)
bool IsEqual(OdGePoint2d point)
static OdGePoint2d operator+(OdGePoint2d p, OdGeVector2d v)
OdGePoint2d(IntPtr cPtr, bool cMemoryOwn)
virtual void Dispose(bool disposing)
OdGePoint2d setToProduct(OdGeMatrix2d matrix, OdGePoint2d point)
OdGeVector2d Sub(OdGePoint2d point)
OdGePoint2d setToSum(OdGePoint2d point, OdGeVector2d vect)
double GetItem(uint i)
override string ToString()
static HandleRef getCPtr(OdGePoint2d obj)
double distanceTo(OdGePoint2d point)
OdGePoint2d scaleBy(double scaleFactor, OdGePoint2d basePoint)
bool IsNotEqual(OdGePoint2d point)
OdGePoint2d Sub(OdGeVector2d vect)
static OdGePoint2d operator*(OdGePoint2d v, double d)
OdGePoint2d rotateBy(double angle, OdGePoint2d basePoint)
static OdGePoint2d kOrigin
OdGePoint2d Div(double scale)
OdGePoint2d transformBy(OdGeMatrix2d xfm)
OdGeVector2d asVector()
bool isEqualTo(OdGePoint2d point)
OdGePoint2d mirror(OdGeLine2d line)
static HandleRef getCPtr(OdGeTol obj)
Definition OdGeTol.cs:26
static HandleRef getCPtr(OdGeVector2d obj)