Extended .NET SDK Documentation 2024 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
94 return new OdGePoint2d(this);
95}
96
100 return new OdGePoint2d(this);
101}
102
103 public OdGePoint2d rotateBy(double angle, OdGePoint2d basePoint) {
106 return new OdGePoint2d(this);
107}
108
109 public OdGePoint2d rotateBy(double angle) {
112 return new OdGePoint2d(this);
113}
114
118 return new OdGePoint2d(this);
119}
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
146 OdGePoint2d ret = new OdGePoint2d(GlobalsPINVOKE.OdGePoint2d_Add__SWIG_0(swigCPtr, OdGeVector2d.getCPtr(vect).Handle), true);
148 return ret;
149 }
150
152 OdGePoint2d ret = new OdGePoint2d(GlobalsPINVOKE.OdGePoint2d_Sub__SWIG_0(swigCPtr, OdGeVector2d.getCPtr(vect).Handle), true);
154 return ret;
155 }
156
160 return new OdGePoint2d(this);
161}
162
166 return ret;
167 }
168
172 return ret;
173 }
174
175 public double distanceTo(OdGePoint2d point) {
176 double ret = GlobalsPINVOKE.OdGePoint2d_distanceTo(swigCPtr, OdGePoint2d.getCPtr(point));
178 return ret;
179 }
180
181 public double distanceSqrdTo(OdGePoint2d point) {
182 double ret = GlobalsPINVOKE.OdGePoint2d_distanceSqrdTo(swigCPtr, OdGePoint2d.getCPtr(point));
184 return ret;
185 }
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
199 public bool isEqualTo(OdGePoint2d point, OdGeTol tol) {
202 return ret;
203 }
204
205 public bool isEqualTo(OdGePoint2d point) {
208 return ret;
209 }
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)
Definition: OdGeMatrix2d.cs:26
OdGePoint2d(OdGePoint2d point)
Definition: OdGePoint2d.cs:68
OdGePoint2d Mul(double scale)
Definition: OdGePoint2d.cs:133
static OdGePoint2d operator-(OdGePoint2d p, OdGeVector2d v)
Definition: OdGePoint2d.cs:55
OdGePoint2d Add(OdGeVector2d vect)
Definition: OdGePoint2d.cs:145
OdGePoint2d(double xx, double yy)
Definition: OdGePoint2d.cs:78
double distanceSqrdTo(OdGePoint2d point)
Definition: OdGePoint2d.cs:181
OdGePoint2d rotateBy(double angle)
Definition: OdGePoint2d.cs:109
OdGePoint2d scaleBy(double scaleFactor)
Definition: OdGePoint2d.cs:127
bool isEqualTo(OdGePoint2d point, OdGeTol tol)
Definition: OdGePoint2d.cs:199
bool IsEqual(OdGePoint2d point)
Definition: OdGePoint2d.cs:187
static OdGePoint2d operator+(OdGePoint2d p, OdGeVector2d v)
Definition: OdGePoint2d.cs:51
OdGePoint2d(IntPtr cPtr, bool cMemoryOwn)
Definition: OdGePoint2d.cs:21
virtual void Dispose(bool disposing)
Definition: OdGePoint2d.cs:39
OdGePoint2d setToProduct(OdGeMatrix2d matrix, OdGePoint2d point)
Definition: OdGePoint2d.cs:91
OdGeVector2d Sub(OdGePoint2d point)
Definition: OdGePoint2d.cs:163
OdGePoint2d setToSum(OdGePoint2d point, OdGeVector2d vect)
Definition: OdGePoint2d.cs:157
double GetItem(uint i)
Definition: OdGePoint2d.cs:211
override string ToString()
Definition: OdGePoint2d.cs:63
static HandleRef getCPtr(OdGePoint2d obj)
Definition: OdGePoint2d.cs:26
double distanceTo(OdGePoint2d point)
Definition: OdGePoint2d.cs:175
OdGePoint2d scaleBy(double scaleFactor, OdGePoint2d basePoint)
Definition: OdGePoint2d.cs:121
bool IsNotEqual(OdGePoint2d point)
Definition: OdGePoint2d.cs:193
OdGePoint2d Sub(OdGeVector2d vect)
Definition: OdGePoint2d.cs:151
static OdGePoint2d operator*(OdGePoint2d v, double d)
Definition: OdGePoint2d.cs:59
OdGePoint2d rotateBy(double angle, OdGePoint2d basePoint)
Definition: OdGePoint2d.cs:103
static OdGePoint2d kOrigin
Definition: OdGePoint2d.cs:82
OdGePoint2d Div(double scale)
Definition: OdGePoint2d.cs:139
OdGePoint2d transformBy(OdGeMatrix2d xfm)
Definition: OdGePoint2d.cs:97
OdGeVector2d asVector()
Definition: OdGePoint2d.cs:169
bool isEqualTo(OdGePoint2d point)
Definition: OdGePoint2d.cs:205
OdGePoint2d mirror(OdGeLine2d line)
Definition: OdGePoint2d.cs:115
static HandleRef getCPtr(OdGeTol obj)
Definition: OdGeTol.cs:26
static HandleRef getCPtr(OdGeVector2d obj)
Definition: OdGeVector2d.cs:26