Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OdGeVector2d.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 OdGeVector2d : 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 OdGeVector2d(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(OdGeVector2d obj) {
27 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
28 }
29
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
51 public static OdGeVector2d operator *(OdGeVector2d v, double d)
52 {
53 return v.Mul(d);
54 }
56 {
57 return v.Sub(d);
58 }
60 {
61 return v.Add(d);
62 }
64 {
65 return v.Sub();
66 }
67 public static OdGeVector2d operator /(OdGeVector2d v, double scale)
68 {
69 return v.Div(scale);
70 }
71 public override string ToString()
72 {
73 if (swigCPtr.Handle == IntPtr.Zero) return "Empty";
74 return string.Format("({0},{1})", x, y);
75 }
77 : this(GlobalsPINVOKE.new_OdGeVector2d__SWIG_1(vect.x, vect.y), true)
78 {
80 }
81
82 public OdGeVector2d() : this(GlobalsPINVOKE.new_OdGeVector2d__SWIG_0(), true) {
84 }
85
86 public OdGeVector2d(double xx, double yy) : this(GlobalsPINVOKE.new_OdGeVector2d__SWIG_1(xx, yy), true) {
88 }
89
90 public static OdGeVector2d kIdentity {
91 get {
92 global::System.IntPtr cPtr = GlobalsPINVOKE.OdGeVector2d_kIdentity_get();
93 OdGeVector2d ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdGeVector2d(cPtr, false);
95 return ret;
96 }
97 }
98
99 public static OdGeVector2d kXAxis {
100 get {
101 global::System.IntPtr cPtr = GlobalsPINVOKE.OdGeVector2d_kXAxis_get();
102 OdGeVector2d ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdGeVector2d(cPtr, false);
104 return ret;
105 }
106 }
107
108 public static OdGeVector2d kYAxis {
109 get {
110 global::System.IntPtr cPtr = GlobalsPINVOKE.OdGeVector2d_kYAxis_get();
111 OdGeVector2d ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdGeVector2d(cPtr, false);
113 return ret;
114 }
115 }
116
120 return new OdGeVector2d(this);
121}
122
123 public OdGeVector2d setToProduct(OdGeVector2d vect, double scale) {
126 return new OdGeVector2d(this);
127}
128
132 return new OdGeVector2d(this);
133}
134
135 public OdGeVector2d rotateBy(double angle) {
138 return new OdGeVector2d(this);
139}
140
144 return new OdGeVector2d(this);
145}
146
147 public OdGeVector2d Mul(double scale) {
148 OdGeVector2d ret = new OdGeVector2d(GlobalsPINVOKE.OdGeVector2d_Mul__SWIG_0(swigCPtr, scale), true);
150 return ret;
151 }
152
153 public OdGeVector2d Div(double scale) {
154 OdGeVector2d ret = new OdGeVector2d(GlobalsPINVOKE.OdGeVector2d_Div__SWIG_0(swigCPtr, scale), true);
156 return ret;
157 }
158
162 return ret;
163 }
164
168 return ret;
169 }
170
174 return ret;
175 }
176
178 GlobalsPINVOKE.OdGeVector2d_setToSum(swigCPtr, OdGeVector2d.getCPtr(vector1).Handle, OdGeVector2d.getCPtr(vector2).Handle);
180 return new OdGeVector2d(this);
181}
182
183 public OdGeVector2d Sub() {
186 return ret;
187 }
188
192 return new OdGeVector2d(this);
193}
194
198 return ret;
199 }
200
201 public double angle() {
202 double ret = GlobalsPINVOKE.OdGeVector2d_angle(swigCPtr);
204 return ret;
205 }
206
207 public double angleTo(OdGeVector2d vect) {
208 double ret = GlobalsPINVOKE.OdGeVector2d_angleTo(swigCPtr, OdGeVector2d.getCPtr(vect).Handle);
210 return ret;
211 }
212
213 public double angleToCCW(OdGeVector2d vect) {
214 double ret = GlobalsPINVOKE.OdGeVector2d_angleToCCW(swigCPtr, OdGeVector2d.getCPtr(vect).Handle);
216 return ret;
217 }
218
222 return ret;
223 }
224
228 return ret;
229 }
230
234 return new OdGeVector2d(this);
235}
236
240 return new OdGeVector2d(this);
241}
242
246 return new OdGeVector2d(this);
247}
248
249 public double normalizeGetLength(double tol) {
252 return ret;
253 }
254
255 public double normalizeGetLength() {
258 return ret;
259 }
260
261 public double length() {
262 double ret = GlobalsPINVOKE.OdGeVector2d_length(swigCPtr);
264 return ret;
265 }
266
267 public double lengthSqrd() {
268 double ret = GlobalsPINVOKE.OdGeVector2d_lengthSqrd(swigCPtr);
270 return ret;
271 }
272
273 public bool isUnitLength(OdGeTol tol) {
276 return ret;
277 }
278
279 public bool isUnitLength() {
282 return ret;
283 }
284
285 public bool isZeroLength(OdGeTol tol) {
288 return ret;
289 }
290
291 public bool isZeroLength() {
294 return ret;
295 }
296
297 public bool isParallelTo(OdGeVector2d vect, OdGeTol tol) {
300 return ret;
301 }
302
303 public bool isParallelTo(OdGeVector2d vect) {
304 bool ret = GlobalsPINVOKE.OdGeVector2d_isParallelTo__SWIG_1(swigCPtr, OdGeVector2d.getCPtr(vect).Handle);
306 return ret;
307 }
308
309 public bool isParallelTo(OdGeVector2d vect, OdGeTol tol, out OdGe.ErrorCondition status) {
310 bool ret = GlobalsPINVOKE.OdGeVector2d_isParallelTo__SWIG_2(swigCPtr, OdGeVector2d.getCPtr(vect).Handle, OdGeTol.getCPtr(tol), out status);
312 return ret;
313 }
314
315 public bool isCodirectionalTo(OdGeVector2d vect, OdGeTol tol) {
318 return ret;
319 }
320
321 public bool isCodirectionalTo(OdGeVector2d vect) {
324 return ret;
325 }
326
327 public bool isCodirectionalTo(OdGeVector2d vect, OdGeTol tol, out OdGe.ErrorCondition status) {
328 bool ret = GlobalsPINVOKE.OdGeVector2d_isCodirectionalTo__SWIG_2(swigCPtr, OdGeVector2d.getCPtr(vect).Handle, OdGeTol.getCPtr(tol), out status);
330 return ret;
331 }
332
333 public bool isPerpendicularTo(OdGeVector2d vect, OdGeTol tol) {
336 return ret;
337 }
338
339 public bool isPerpendicularTo(OdGeVector2d vect) {
342 return ret;
343 }
344
345 public bool isPerpendicularTo(OdGeVector2d vect, OdGeTol tol, out OdGe.ErrorCondition status) {
346 bool ret = GlobalsPINVOKE.OdGeVector2d_isPerpendicularTo__SWIG_2(swigCPtr, OdGeVector2d.getCPtr(vect).Handle, OdGeTol.getCPtr(tol), out status);
348 return ret;
349 }
350
351 public double dotProduct(OdGeVector2d vect) {
352 double ret = GlobalsPINVOKE.OdGeVector2d_dotProduct(swigCPtr, OdGeVector2d.getCPtr(vect).Handle);
354 return ret;
355 }
356
357 public double crossProduct(OdGeVector2d vect) {
358 double ret = GlobalsPINVOKE.OdGeVector2d_crossProduct(swigCPtr, OdGeVector2d.getCPtr(vect).Handle);
360 return ret;
361 }
362
363 public bool IsEqual(OdGeVector2d vect) {
364 bool ret = GlobalsPINVOKE.OdGeVector2d_IsEqual(swigCPtr, OdGeVector2d.getCPtr(vect).Handle);
366 return ret;
367 }
368
369 public bool IsNotEqual(OdGeVector2d vect) {
370 bool ret = GlobalsPINVOKE.OdGeVector2d_IsNotEqual(swigCPtr, OdGeVector2d.getCPtr(vect).Handle);
372 return ret;
373 }
374
375 public bool isEqualTo(OdGeVector2d vect, OdGeTol tol) {
376 bool ret = GlobalsPINVOKE.OdGeVector2d_isEqualTo__SWIG_0(swigCPtr, OdGeVector2d.getCPtr(vect).Handle, OdGeTol.getCPtr(tol));
378 return ret;
379 }
380
381 public bool isEqualTo(OdGeVector2d vect) {
382 bool ret = GlobalsPINVOKE.OdGeVector2d_isEqualTo__SWIG_1(swigCPtr, OdGeVector2d.getCPtr(vect).Handle);
384 return ret;
385 }
386
387 public double GetItem(uint i) {
388 double ret = GlobalsPINVOKE.OdGeVector2d_GetItem__SWIG_0(swigCPtr, i);
390 return ret;
391 }
392
393 public uint largestElement() {
394 uint ret = GlobalsPINVOKE.OdGeVector2d_largestElement(swigCPtr);
396 return ret;
397 }
398
399 public OdGeVector2d set(double xx, double yy) {
400 GlobalsPINVOKE.OdGeVector2d_set(swigCPtr, xx, yy);
402 return new OdGeVector2d(this);
403}
404
405 public double x {
406 set {
409 }
410 get {
411 double ret = GlobalsPINVOKE.OdGeVector2d_x_get(swigCPtr);
413 return ret;
414 }
415 }
416
417 public double y {
418 set {
421 }
422 get {
423 double ret = GlobalsPINVOKE.OdGeVector2d_y_get(swigCPtr);
425 return ret;
426 }
427 }
428
429}
430
431}
static global::System.Exception Retrieve()
static IntPtr OdGeVector2d_setToProduct__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, double jarg3)
static uint OdGeVector2d_largestElement(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdGeVector2d_isPerpendicularTo__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, out OdGe.ErrorCondition jarg4)
static IntPtr OdGeVector2d_mirror(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static IntPtr OdGeVector2d_set(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2, double jarg3)
static bool OdGeVector2d_isPerpendicularTo__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.IntPtr OdGeVector2d_normal__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
static double OdGeVector2d_dotProduct(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static double OdGeVector2d_x_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeVector2d_perpVector(global::System.Runtime.InteropServices.HandleRef jarg1)
static double OdGeVector2d_normalizeGetLength__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdGeVector2d_normalize__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeVector2d_asPoint__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeVector2d_kIdentity_get()
static double OdGeVector2d_y_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdGeVector2d_isZeroLength__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeVector2d_kYAxis_get()
static global::System.IntPtr OdGeVector2d_Div__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static bool OdGeVector2d_IsNotEqual(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static IntPtr OdGeVector2d_negate(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdGeVector2d_isParallelTo__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static bool OdGeVector2d_isUnitLength__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdGeVector2d_IsEqual(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static global::System.IntPtr OdGeVector2d_Add__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static IntPtr OdGeVector2d_setToSum(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, IntPtr jarg3)
static global::System.IntPtr OdGeVector2d_kXAxis_get()
static bool OdGeVector2d_isUnitLength__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
static double OdGeVector2d_angleTo(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static bool OdGeVector2d_isParallelTo__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static void delete_OdGeVector2d(global::System.Runtime.InteropServices.HandleRef jarg1)
static double OdGeVector2d_angle(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdGeVector2d_isCodirectionalTo__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static IntPtr OdGeVector2d_setToProduct__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, IntPtr jarg3)
static bool OdGeVector2d_isPerpendicularTo__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static global::System.IntPtr OdGeVector2d_normal__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static double OdGeVector2d_GetItem__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2)
static void OdGeVector2d_y_set(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static IntPtr OdGeVector2d_transformBy(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static double OdGeVector2d_normalizeGetLength__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static bool OdGeVector2d_isParallelTo__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, out OdGe.ErrorCondition jarg4)
static bool OdGeVector2d_isEqualTo__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static void OdGeVector2d_x_set(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static bool OdGeVector2d_isCodirectionalTo__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static double OdGeVector2d_lengthSqrd(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeVector2d_Sub__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static IntPtr OdGeVector2d_rotateBy(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static global::System.IntPtr OdGeVector2d_Mul__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static global::System.IntPtr OdGeVector2d_Sub__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1)
static double OdGeVector2d_crossProduct(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static bool OdGeVector2d_isEqualTo__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static bool OdGeVector2d_isCodirectionalTo__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, out OdGe.ErrorCondition jarg4)
static IntPtr OdGeVector2d_normalize__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static double OdGeVector2d_length(global::System.Runtime.InteropServices.HandleRef jarg1)
static double OdGeVector2d_angleToCCW(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static bool OdGeVector2d_isZeroLength__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdGeVector2d_normalize__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, out OdGe.ErrorCondition jarg3)
static HandleRef getCPtr(OdGeMatrix2d obj)
Definition: OdGeMatrix2d.cs:26
static HandleRef getCPtr(OdGeTol obj)
Definition: OdGeTol.cs:26
OdGeVector2d setToSum(OdGeVector2d vector1, OdGeVector2d vector2)
OdGeVector2d(IntPtr cPtr, bool cMemoryOwn)
Definition: OdGeVector2d.cs:21
virtual void Dispose(bool disposing)
Definition: OdGeVector2d.cs:39
double angleTo(OdGeVector2d vect)
double GetItem(uint i)
double dotProduct(OdGeVector2d vect)
OdGeVector2d rotateBy(double angle)
static OdGeVector2d operator/(OdGeVector2d v, double scale)
Definition: OdGeVector2d.cs:67
double crossProduct(OdGeVector2d vect)
OdGeVector2d Add(OdGeVector2d vect)
bool isUnitLength(OdGeTol tol)
OdGeVector2d setToProduct(OdGeVector2d vect, double scale)
OdGeVector2d(double xx, double yy)
Definition: OdGeVector2d.cs:86
bool isPerpendicularTo(OdGeVector2d vect, OdGeTol tol)
static HandleRef getCPtr(OdGeVector2d obj)
Definition: OdGeVector2d.cs:26
bool isEqualTo(OdGeVector2d vect, OdGeTol tol)
static OdGeVector2d operator+(OdGeVector2d v, OdGeVector2d d)
Definition: OdGeVector2d.cs:59
bool isPerpendicularTo(OdGeVector2d vect, OdGeTol tol, out OdGe.ErrorCondition status)
static OdGeVector2d kYAxis
bool isParallelTo(OdGeVector2d vect, OdGeTol tol)
OdGeVector2d normal(OdGeTol tol)
OdGeVector2d(OdGeVector2d vect)
Definition: OdGeVector2d.cs:76
bool isCodirectionalTo(OdGeVector2d vect, OdGeTol tol, out OdGe.ErrorCondition status)
OdGeVector2d transformBy(OdGeMatrix2d xfm)
OdGeVector2d Div(double scale)
bool isParallelTo(OdGeVector2d vect)
OdGeVector2d setToProduct(OdGeMatrix2d matrix, OdGeVector2d vect)
bool isEqualTo(OdGeVector2d vect)
OdGeVector2d normalize()
bool isCodirectionalTo(OdGeVector2d vect, OdGeTol tol)
override string ToString()
Definition: OdGeVector2d.cs:71
OdGeVector2d perpVector()
bool isPerpendicularTo(OdGeVector2d vect)
OdGeVector2d Sub(OdGeVector2d vect)
bool isZeroLength(OdGeTol tol)
OdGeVector2d normalize(OdGeTol tol)
static OdGeVector2d operator-(OdGeVector2d v, OdGeVector2d d)
Definition: OdGeVector2d.cs:55
OdGeVector2d normalize(OdGeTol tol, out OdGe.ErrorCondition status)
OdGeVector2d Mul(double scale)
static OdGeVector2d kIdentity
Definition: OdGeVector2d.cs:90
OdGeVector2d mirror(OdGeVector2d line)
static OdGeVector2d operator*(OdGeVector2d v, double d)
Definition: OdGeVector2d.cs:51
bool isParallelTo(OdGeVector2d vect, OdGeTol tol, out OdGe.ErrorCondition status)
double angleToCCW(OdGeVector2d vect)
static OdGeVector2d kXAxis
Definition: OdGeVector2d.cs:99
double normalizeGetLength(double tol)
bool IsNotEqual(OdGeVector2d vect)
bool isCodirectionalTo(OdGeVector2d vect)
bool IsEqual(OdGeVector2d vect)