Extended .NET SDK Documentation 2025 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
122
128
134
140
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
164
170
176
182
188
194
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
224
230
236
242
248
249 public double normalizeGetLength(double tol) {
252 return ret;
253 }
254
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
278
284
290
296
302
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
320
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
338
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
380
386
387 public double GetItem(uint i) {
388 double ret = GlobalsPINVOKE.OdGeVector2d_GetItem__SWIG_0(swigCPtr, i);
390 return ret;
391 }
392
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)
static HandleRef getCPtr(OdGeTol obj)
Definition OdGeTol.cs:26
OdGeVector2d setToSum(OdGeVector2d vector1, OdGeVector2d vector2)
OdGeVector2d(IntPtr cPtr, bool cMemoryOwn)
virtual void Dispose(bool disposing)
double angleTo(OdGeVector2d vect)
double dotProduct(OdGeVector2d vect)
OdGeVector2d rotateBy(double angle)
static OdGeVector2d operator/(OdGeVector2d v, double scale)
double crossProduct(OdGeVector2d vect)
OdGeVector2d Add(OdGeVector2d vect)
bool isUnitLength(OdGeTol tol)
OdGeVector2d setToProduct(OdGeVector2d vect, double scale)
OdGeVector2d(double xx, double yy)
bool isPerpendicularTo(OdGeVector2d vect, OdGeTol tol)
static HandleRef getCPtr(OdGeVector2d obj)
bool isEqualTo(OdGeVector2d vect, OdGeTol tol)
static OdGeVector2d operator+(OdGeVector2d v, OdGeVector2d d)
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)
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)
bool isCodirectionalTo(OdGeVector2d vect, OdGeTol tol)
override string ToString()
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)
OdGeVector2d normalize(OdGeTol tol, out OdGe.ErrorCondition status)
OdGeVector2d Mul(double scale)
static OdGeVector2d kIdentity
OdGeVector2d mirror(OdGeVector2d line)
static OdGeVector2d operator*(OdGeVector2d v, double d)
bool isParallelTo(OdGeVector2d vect, OdGeTol tol, out OdGe.ErrorCondition status)
double angleToCCW(OdGeVector2d vect)
static OdGeVector2d kXAxis
double normalizeGetLength(double tol)
bool IsNotEqual(OdGeVector2d vect)
bool isCodirectionalTo(OdGeVector2d vect)
bool IsEqual(OdGeVector2d vect)