Extended .NET SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
OdGeMatrix2d.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 OdGeMatrix2d : 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 OdGeMatrix2d(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(OdGeMatrix2d 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 OdGeMatrix2d() : this(GlobalsPINVOKE.new_OdGeMatrix2d(), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null) {
52 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction(); // MemoryTransaction #40
53 if (null != mTr)
54 {
55 mTr.AddObject(new OdGeMatrix2d(swigCPtr.Handle, true));
56 }
58 }
59 public double this[int row, int column]
60 {
61 get { return GetItem(row, column); }
62 set
63 {
64 GlobalsPINVOKE.OdGeMatrix2d_entry_set(swigCPtr, row, column, value);
65 }
66 }
67
69 {
70 return m.Mul(d);
71 }
72 public static OdGePoint2d operator *(OdGeMatrix2d matrix, OdGePoint2d point)
73 {
74 return Globals.Mul(matrix, point);
75 }
77 {
78 return Globals.Mul(matrix, vect);
79 }
80
81 public static OdGeMatrix2d kIdentity {
82 get {
83 global::System.IntPtr cPtr = GlobalsPINVOKE.OdGeMatrix2d_kIdentity_get();
84 OdGeMatrix2d ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdGeMatrix2d(cPtr, false);
86 return ret;
87 }
88 }
89
91 OdGeMatrix2d ret = new OdGeMatrix2d();
94 for (int i = 0; i < 3; i++)
95 {
96 for (int j = 0; j < 3; j++)
97 {
98 ret[i,j] = this[i,j];
99 }
100 }
101 return ret;
102}
103
109
111 OdGeMatrix2d ret = new OdGeMatrix2d();
114 for (int i = 0; i < 3; i++)
115 {
116 for (int j = 0; j < 3; j++)
117 {
118 ret[i,j] = this[i,j];
119 }
120 }
121 return ret;
122}
123
125 OdGeMatrix2d ret = new OdGeMatrix2d();
128 for (int i = 0; i < 3; i++)
129 {
130 for (int j = 0; j < 3; j++)
131 {
132 ret[i,j] = this[i,j];
133 }
134 }
135 return ret;
136}
137
139 OdGeMatrix2d ret = new OdGeMatrix2d();
142 for (int i = 0; i < 3; i++)
143 {
144 for (int j = 0; j < 3; j++)
145 {
146 ret[i,j] = this[i,j];
147 }
148 }
149 return ret;
150}
151
153 OdGeMatrix2d ret = new OdGeMatrix2d();
156 for (int i = 0; i < 3; i++)
157 {
158 for (int j = 0; j < 3; j++)
159 {
160 ret[i,j] = this[i,j];
161 }
162 }
163 return ret;
164}
165
171
177
183
185 OdGeMatrix2d ret = new OdGeMatrix2d();
188 for (int i = 0; i < 3; i++)
189 {
190 for (int j = 0; j < 3; j++)
191 {
192 ret[i,j] = this[i,j];
193 }
194 }
195 return ret;
196}
197
203
204 public bool IsEqual(OdGeMatrix2d matrix) {
205 bool ret = GlobalsPINVOKE.OdGeMatrix2d_IsEqual(swigCPtr, OdGeMatrix2d.getCPtr(matrix));
207 return ret;
208 }
209
210 public bool IsNotEqual(OdGeMatrix2d matrix) {
211 bool ret = GlobalsPINVOKE.OdGeMatrix2d_IsNotEqual(swigCPtr, OdGeMatrix2d.getCPtr(matrix));
213 return ret;
214 }
215
221
227
233
239
245
251
252 public double scale() {
253 double ret = GlobalsPINVOKE.OdGeMatrix2d_scale(swigCPtr);
255 return ret;
256 }
257
258 public double det() {
259 double ret = GlobalsPINVOKE.OdGeMatrix2d_det(swigCPtr);
261 return ret;
262 }
263
265 OdGeMatrix2d ret = new OdGeMatrix2d();
268 for (int i = 0; i < 3; i++)
269 {
270 for (int j = 0; j < 3; j++)
271 {
272 ret[i,j] = this[i,j];
273 }
274 }
275 return ret;
276}
277
283
289
290 public bool isConformal(out double scale, out double angle, out bool isMirror, OdGeVector2d reflex) {
291 bool ret = GlobalsPINVOKE.OdGeMatrix2d_isConformal(swigCPtr, out scale, out angle, out isMirror, OdGeVector2d.getCPtr(reflex).Handle);
293 return ret;
294 }
295
297 OdGeMatrix2d ret = new OdGeMatrix2d();
300 for (int i = 0; i < 3; i++)
301 {
302 for (int j = 0; j < 3; j++)
303 {
304 ret[i,j] = this[i,j];
305 }
306 }
307 return ret;
308}
309
314
316 OdGeMatrix2d ret = new OdGeMatrix2d();
319 for (int i = 0; i < 3; i++)
320 {
321 for (int j = 0; j < 3; j++)
322 {
323 ret[i,j] = this[i,j];
324 }
325 }
326 return ret;
327}
328
329 public OdGeMatrix2d setToRotation(double angle, OdGePoint2d center) {
330 OdGeMatrix2d ret = new OdGeMatrix2d();
333 for (int i = 0; i < 3; i++)
334 {
335 for (int j = 0; j < 3; j++)
336 {
337 ret[i,j] = this[i,j];
338 }
339 }
340 return ret;
341}
342
343 public OdGeMatrix2d setToRotation(double angle) {
344 OdGeMatrix2d ret = new OdGeMatrix2d();
347 for (int i = 0; i < 3; i++)
348 {
349 for (int j = 0; j < 3; j++)
350 {
351 ret[i,j] = this[i,j];
352 }
353 }
354 return ret;
355}
356
358 OdGeMatrix2d ret = new OdGeMatrix2d();
361 for (int i = 0; i < 3; i++)
362 {
363 for (int j = 0; j < 3; j++)
364 {
365 ret[i,j] = this[i,j];
366 }
367 }
368 return ret;
369}
370
372 OdGeMatrix2d ret = new OdGeMatrix2d();
375 for (int i = 0; i < 3; i++)
376 {
377 for (int j = 0; j < 3; j++)
378 {
379 ret[i,j] = this[i,j];
380 }
381 }
382 return ret;
383}
384
386 OdGeMatrix2d ret = new OdGeMatrix2d();
389 for (int i = 0; i < 3; i++)
390 {
391 for (int j = 0; j < 3; j++)
392 {
393 ret[i,j] = this[i,j];
394 }
395 }
396 return ret;
397}
398
400 OdGeMatrix2d ret = new OdGeMatrix2d();
403 for (int i = 0; i < 3; i++)
404 {
405 for (int j = 0; j < 3; j++)
406 {
407 ret[i,j] = this[i,j];
408 }
409 }
410 return ret;
411}
412
414 OdGeMatrix2d ret = new OdGeMatrix2d();
417 for (int i = 0; i < 3; i++)
418 {
419 for (int j = 0; j < 3; j++)
420 {
421 ret[i,j] = this[i,j];
422 }
423 }
424 return ret;
425}
426
428 OdGeMatrix2d ret = new OdGeMatrix2d();
431 for (int i = 0; i < 3; i++)
432 {
433 for (int j = 0; j < 3; j++)
434 {
435 ret[i,j] = this[i,j];
436 }
437 }
438 return ret;
439}
440
441 public OdGeMatrix2d setToAlignCoordSys(OdGePoint2d fromOrigin, OdGeVector2d fromXAxis, OdGeVector2d fromYAxis, OdGePoint2d toOrigin, OdGeVector2d toXAxis, OdGeVector2d toYAxis) {
442 OdGeMatrix2d ret = new OdGeMatrix2d();
443 GlobalsPINVOKE.OdGeMatrix2d_setToAlignCoordSys(swigCPtr, OdGePoint2d.getCPtr(fromOrigin), OdGeVector2d.getCPtr(fromXAxis).Handle, OdGeVector2d.getCPtr(fromYAxis).Handle, OdGePoint2d.getCPtr(toOrigin), OdGeVector2d.getCPtr(toXAxis).Handle, OdGeVector2d.getCPtr(toYAxis).Handle);
445 for (int i = 0; i < 3; i++)
446 {
447 for (int j = 0; j < 3; j++)
448 {
449 ret[i,j] = this[i,j];
450 }
451 }
452 return ret;
453}
454
460
466
472
478
484
490
496
502
503 public static OdGeMatrix2d alignCoordSys(OdGePoint2d fromOrigin, OdGeVector2d fromXAxis, OdGeVector2d fromYAxis, OdGePoint2d toOrigin, OdGeVector2d toXAxis, OdGeVector2d toYAxis) {
504 OdGeMatrix2d ret = new OdGeMatrix2d(GlobalsPINVOKE.OdGeMatrix2d_alignCoordSys(OdGePoint2d.getCPtr(fromOrigin), OdGeVector2d.getCPtr(fromXAxis).Handle, OdGeVector2d.getCPtr(fromYAxis).Handle, OdGePoint2d.getCPtr(toOrigin), OdGeVector2d.getCPtr(toXAxis).Handle, OdGeVector2d.getCPtr(toYAxis).Handle), true);
506 return ret;
507 }
508
509 public double GetItem(int row, int column) {
510 double ret = GlobalsPINVOKE.OdGeMatrix2d_GetItem(swigCPtr, row, column);
512 return ret;
513 }
514
519 public static Teigha.Core.OdGeMatrix2d vb_rotation(double angle, Teigha.Core.OdGePoint2d center) { return rotation(angle, center); }
520
525 public static Teigha.Core.OdGeMatrix2d vb_rotation(double angle) { return rotation(angle); }
526
527}
528
529}
static OdGeVector2d Mul(OdGeMatrix2d xfm, OdGeVector2d vect)
Definition Globals.cs:764
static global::System.Exception Retrieve()
static global::System.IntPtr OdGeMatrix2d_setToProduct(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.IntPtr OdGeMatrix2d_mirroring__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_scaling__SWIG_1(double jarg1)
static global::System.IntPtr OdGeMatrix2d_setToMirroring__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdGeMatrix2d_isSingular__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_alignCoordSys(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, IntPtr jarg3, global::System.Runtime.InteropServices.HandleRef jarg4, IntPtr jarg5, IntPtr jarg6)
static global::System.IntPtr OdGeMatrix2d_preMultBy(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_transpose(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_scaling__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdGeMatrix2d_entry_set(HandleRef jarg1, int row, int column, double value)
static void OdGeMatrix2d_getCoordSystem(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, IntPtr jarg3, IntPtr jarg4)
static global::System.IntPtr OdGeMatrix2d_setToIdentity(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_translation__SWIG_1(IntPtr jarg1)
static global::System.IntPtr OdGeMatrix2d_setToRotation__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static bool OdGeMatrix2d_isSingular__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_postMultBy(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdGeMatrix2d_isConformal(global::System.Runtime.InteropServices.HandleRef jarg1, out double jarg2, out double jarg3, out bool jarg4, IntPtr jarg5)
static global::System.IntPtr OdGeMatrix2d_setToRotation__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static bool OdGeMatrix2d_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 OdGeMatrix2d_rotation__SWIG_0(double jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_mirroring__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_kIdentity_get()
static global::System.IntPtr OdGeMatrix2d_setToScaling__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static bool OdGeMatrix2d_isScaledOrtho__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_setCoordSystem(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, IntPtr jarg3, IntPtr jarg4)
static void delete_OdGeMatrix2d(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_setToScaling__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static double OdGeMatrix2d_scale(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_Mul__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdGeMatrix2d_isUniScaledOrtho__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdGeMatrix2d_isEqualTo__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_setToTranslation(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static bool OdGeMatrix2d_IsEqual(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_inverse(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_setToMirroring__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_setTranslation(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static global::System.IntPtr OdGeMatrix2d_setToScaling__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static double OdGeMatrix2d_det(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_setToScaling__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_rotation__SWIG_1(double jarg1)
static global::System.IntPtr OdGeMatrix2d_setToAlignCoordSys(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, IntPtr jarg3, IntPtr jarg4, global::System.Runtime.InteropServices.HandleRef jarg5, IntPtr jarg6, IntPtr jarg7)
static bool OdGeMatrix2d_isUniScaledOrtho__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
static double OdGeMatrix2d_GetItem(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static bool OdGeMatrix2d_isScaledOrtho__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdGeMatrix2d_IsNotEqual(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_scaling__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_translation__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_scaling__SWIG_0(double jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdGeMatrix2d_invert(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdGeMatrix2d_transposeIt(global::System.Runtime.InteropServices.HandleRef jarg1)
static HandleRef getCPtr(OdGeLine2d obj)
Definition OdGeLine2d.cs:25
virtual void Dispose(bool disposing)
bool isEqualTo(OdGeMatrix2d matrix)
static OdGeMatrix2d rotation(double angle, OdGePoint2d center)
OdGeMatrix2d Mul(OdGeMatrix2d matrix)
OdGeMatrix2d setToIdentity()
static Teigha.Core.OdGeMatrix2d vb_rotation(double angle, Teigha.Core.OdGePoint2d center)
OdGeMatrix2d setCoordSystem(OdGePoint2d origin, OdGeVector2d xAxis, OdGeVector2d yAxis)
OdGeMatrix2d setToScaling(double scale, OdGePoint2d center)
static OdGeMatrix2d scaling(OdGeScale2d scale, OdGePoint2d center)
static OdGeMatrix2d translation(OdGeVector2d vector)
OdGeMatrix2d setToMirroring(OdGeLine2d mirrorLine)
OdGeMatrix2d(IntPtr cPtr, bool cMemoryOwn)
OdGeMatrix2d setToAlignCoordSys(OdGePoint2d fromOrigin, OdGeVector2d fromXAxis, OdGeVector2d fromYAxis, OdGePoint2d toOrigin, OdGeVector2d toXAxis, OdGeVector2d toYAxis)
bool isEqualTo(OdGeMatrix2d matrix, OdGeTol tol)
OdGeMatrix2d transposeIt()
OdGeMatrix2d setToScaling(OdGeScale2d scale)
double GetItem(int row, int column)
bool isScaledOrtho(OdGeTol tol)
static OdGeMatrix2d scaling(OdGeScale2d scale)
bool isConformal(out double scale, out double angle, out bool isMirror, OdGeVector2d reflex)
OdGeMatrix2d setToScaling(OdGeScale2d scale, OdGePoint2d center)
static OdGeMatrix2d rotation(double angle)
OdGeVector2d translation()
static OdGeMatrix2d kIdentity
static OdGeMatrix2d scaling(double scale, OdGePoint2d center)
OdGeMatrix2d setToRotation(double angle)
void getCoordSystem(OdGePoint2d origin, OdGeVector2d xAxis, OdGeVector2d yAxis)
OdGeMatrix2d setTranslation(OdGeVector2d vect)
bool IsNotEqual(OdGeMatrix2d matrix)
OdGeMatrix2d setToTranslation(OdGeVector2d vect)
static OdGeMatrix2d mirroring(OdGeLine2d mirrorLine)
static OdGeMatrix2d operator*(OdGeMatrix2d m, OdGeMatrix2d d)
bool IsEqual(OdGeMatrix2d matrix)
bool isSingular(OdGeTol tol)
OdGeMatrix2d setToProduct(OdGeMatrix2d matrix1, OdGeMatrix2d matrix2)
static OdGeMatrix2d mirroring(OdGePoint2d mirrorPoint)
OdGeMatrix2d postMultBy(OdGeMatrix2d rightSide)
bool isUniScaledOrtho(OdGeTol tol)
static OdGeMatrix2d alignCoordSys(OdGePoint2d fromOrigin, OdGeVector2d fromXAxis, OdGeVector2d fromYAxis, OdGePoint2d toOrigin, OdGeVector2d toXAxis, OdGeVector2d toYAxis)
OdGeMatrix2d setToScaling(double scale)
OdGeMatrix2d setToRotation(double angle, OdGePoint2d center)
static HandleRef getCPtr(OdGeMatrix2d obj)
OdGeMatrix2d preMultBy(OdGeMatrix2d leftSide)
OdGeMatrix2d setToMirroring(OdGePoint2d mirrorPoint)
static Teigha.Core.OdGeMatrix2d vb_rotation(double angle)
static OdGeMatrix2d scaling(double scale)
static HandleRef getCPtr(OdGePoint2d obj)
static HandleRef getCPtr(OdGeScale2d obj)
static HandleRef getCPtr(OdGeTol obj)
Definition OdGeTol.cs:26
static HandleRef getCPtr(OdGeVector2d obj)