3DCoat Core API
The 3DCoat API documentation.
Loading...
Searching...
No Matches
cVec2.h
1#pragma once
2
3template<class Type, int Dim>
4struct cVec;
5
9class APICALL COMMS_ALIASING cVec2 {
10public:
11 float x;
12 float y;
13
14 cVec2();
15 explicit cVec2(const float S);
16 cVec2(const float X, const float Y);
17 cVec2(const cVec2& v) :x(v.x), y(v.y) {}
18
19 void Copy(const float *Src);
20 void SetZero();
21 void SetOne();
22 void Set(const float S);
23 void Set(const float X, const float Y);
24
25 float operator [] (const int index) const;
26 float & operator [] (const int index);
27
28 const cVec2 operator - () const;
29
30 cVec2& operator += (const cVec2 &);
31 cVec2& operator -= (const cVec2 &);
32 cVec2& operator *= (const cVec2 &);
33 cVec2& operator *= (const float);
34 cVec2& operator /= (const cVec2 &);
35 cVec2& operator /= (const float);
36
37 void Transform(const cMat3 &); // (x, y, 0)
38 void operator *= (const cMat3 &);
39
40 void TransformCoordinate(const cMat4 &); // (x, y, 0, 1), projects the result back into w = 1
41 void TransformNormal(const cMat4 &); // (x, y, 0)
42
43 const cVec2 operator + (const cVec2 &) const;
44 const cVec2 operator - (const cVec2 &) const;
45 const cVec2 operator * (const cVec2 &) const;
46 const cVec2 operator * (const float) const;
47 friend const cVec2 operator * (const float, const cVec2 &);
48 const cVec2 operator / (const cVec2 &) const;
49 const cVec2 operator / (const float) const;
50 friend const cVec2 operator / (const float, const cVec2 &);
51
52 static const cVec2 Transform(const cVec2 &, const cMat3 &); // (x, y, 0)
53 const cVec2 operator * (const cMat3 &) const;
54
55 static const cVec4 Transform(const cVec2 &, const cMat4 &); // (x, y, 0, 1)
56 static const cVec2 TransformCoordinate(const cVec2 &, const cMat4 &); // (x, y, 0, 1), projects the result back into w = 1
57 static const cVec2 TransformNormal(const cVec2 &, const cMat4 &); // (x, y, 0, 0)
58
59 bool operator == (const cVec2 &) const;
60 bool operator != (const cVec2 &) const;
61 static bool Equals(const cVec2 &, const cVec2 &, const float Eps = cMath::Epsilon);
62
63 float Length() const;
64 float LengthSq() const;
65 float Normalize();
66 float NormalizeSafe(const cVec2 &Fallback);
67 bool IsValid() const;
68 bool IsNormalized(const float Eps = cMath::Epsilon) const;
69 bool IsZero(const float Eps = cMath::Epsilon) const;
70
71 static const cVec2 Round(const cVec2 &);
72 const cVec2 ToRound() const;
73 void Round();
74
75 static const cVec2 Abs(const cVec2&);
76 static const cVec2 Fract(const cVec2&);
77 static float Angle(const cVec2&, const cVec2&);
78 static float AreaSigned(const cVec2 &t0, const cVec2 &t1, const cVec2 &t2);
79 static float Ccw(const cVec2 &, const cVec2 &);
80 static const cVec2 Clamp(const cVec2 &Value, const cVec2 &Lo, const cVec2 &Hi);
81 static float Distance(const cVec2 &, const cVec2 &);
82 static float DistanceSq(const cVec2 &, const cVec2 &);
83 static float Dot(const cVec2 &, const cVec2 &);
84 static float Length(const cVec2 &);
85 static float LengthSq(const cVec2 &);
86 static const cVec2 Lerp(const cVec2 &, const cVec2 &, const float);
87 static const cVec2 Lerp05(const cVec2 &, const cVec2 &);
88 static const cVec2 Max(const cVec2 &, const cVec2 &);
89 static const cVec2 Min(const cVec2 &, const cVec2 &);
90 static const cVec2 Normalize(const cVec2 &);
91 static const cVec2 NormalizeSafe(const cVec2 &Src, const cVec2 &Fallback);
92 static const cVec2 PerpCw(const cVec2 &);
93 static const cVec2 PerpCcw(const cVec2 &);
94 static const cVec2 Reflect(const cVec2 &RayDir, const cVec2 &Normal);
95 static const cVec2 Refract(const cVec2 &RayDir, const cVec2 &Normal, const float Eta);
96 static const cVec2 Truncate(const cVec2 &u, const float MaxLength);
97 void Truncate(const float MaxLength);
98 static const cVec2 RandRange1();
99 static const cVec2 RandNormal();
100 static const cVec2 Rand(const cVec2 &Lo, const cVec2 &Hi);
101 __inline float distance2(const cVec2&);
102 __inline float distance(const cVec2&);
103
104 float DistanceToLineSegSq(const cVec2 &A, const cVec2 &B, float *pScale = nullptr) const;
105 static bool SegIntersection(const cVec2 &L0, const cVec2 &L1, const cVec2 &R0, const cVec2 &R1, float *l = nullptr, float *r = nullptr);
106
107 static const cVec2 FromBaryCentric(const cVec2 &t0, const cVec2 &t1, const cVec2 &t2, const float u, const float v);
108 static const cVec2 FromPolar(const float Radius, const float Angle);
109
110 std::tuple<float, float> __getstate__();
111 void __setstate__(const std::tuple<float, float>& state);
112 const std::string __repr__() const;
113
114 static const cVec2 Zero;
115 static const cVec2 One;
116 static const cVec2 Infinity;
117 static const cVec2 AxisX;
118 static const cVec2 AxisY;
119 static const cVec2 AxisNegX;
120 static const cVec2 AxisNegY;
121
122 int GetDimension() const;
123
124 const float * ToFloatPtr() const;
125 float * ToFloatPtr();
126
127 template<class Type>
128 operator cVec<Type, 2> () const;
129
130 void ToPolar(float *Radius, float *Angle) const;
131 float ToBaryCentric(const cVec2 &t0, const cVec2 &t1, const cVec2 &t2, float &u, float &v) const;
132 bool IsInsideTri(const cVec2 &t0, const cVec2 &t1, const cVec2 &t2) const;
133
134 const cStr ToString(const int Prec = 2) const;
135 friend cStr & operator << (cStr &, const cVec2 &);
136
137 const cVec2 ToNormal() const;
138
139 const cVec2 ToPerpCw() const;
140 const cVec2 ToPerpCcw() const;
141
143 // for compatibility with OpenSubdiv ////
144 inline void Clear(void* = 0) {
145 x = y = 0.0f;
146 }
147 inline void AddWithWeight(cVec2 const& src, float weight) {
148 x += weight * src.x;
149 y += weight * src.y;
150 }
151 inline void SetPosition(float aX, float aY) {
152 x = aX;
153 y = aY;
154 }
155 inline const float* GetPosition() const {
156 return &x;
157 }
158 // for compatibility with OpenSubdiv //
160
161};
162
163// cVec2.ctor : ()
164inline cVec2::cVec2() {
165}
166
167// cVec2.ctor : (const float)
168inline cVec2::cVec2(const float S)
169: x(S), y(S) {}
170
171// cVec2.ctor : (const float, const float)
172inline cVec2::cVec2(const float X, const float Y)
173: x(X), y(Y) {}
174
175// cVec2::Copy
176inline void cVec2::Copy(const float *Src) {
177 cAssert(Src != nullptr);
178 x = Src[0];
179 y = Src[1];
180}
181
182// cVec2::SetZero
183inline void cVec2::SetZero() {
184 x = y = 0.0f;
185}
186
187// cVec2::SetOne
188inline void cVec2::SetOne() {
189 x = y = 1.0f;
190}
191
192// cVec2::Set : void (const float)
193inline void cVec2::Set(const float S) {
194 x = y = S;
195}
196
197// cVec2::Set : void (const float, const float)
198inline void cVec2::Set(const float X, const float Y) {
199 x = X;
200 y = Y;
201}
202
203// cVec2::operator [] : float(const int) const
204inline float cVec2::operator [] (const int index) const {
205 cAssert(index >= 0 && index < 2);
206 return (&x)[index];
207}
208
209// cVec2::operator [] : float & (const int)
210inline float & cVec2::operator [] (const int index) {
211 cAssert(index >= 0 && index < 2);
212 return (&x)[index];
213}
214
215// cVec2::operator - : const cVec2 () const
216inline const cVec2 cVec2::operator - () const {
217 return cVec2(-x, -y);
218}
219
220// cVec2::operator += : void (const cVec2 &)
221inline cVec2& cVec2::operator += (const cVec2 &u) {
222 x += u.x;
223 y += u.y;
224 return *this;
225}
226
227// cVec2::operator -= : void (const cVec2 &)
228inline cVec2& cVec2::operator -= (const cVec2 &u) {
229 x -= u.x;
230 y -= u.y;
231 return *this;
232}
233
234// cVec2::operator *= : void (const cVec2 &)
235inline cVec2& cVec2::operator *= (const cVec2 &u) {
236 x *= u.x;
237 y *= u.y;
238 return *this;
239}
240
241// cVec2::operator *= : void (const float)
242inline cVec2& cVec2::operator *= (const float s) {
243 x *= s;
244 y *= s;
245 return *this;
246}
247
248// cVec2::operator /= : void (const cVec2 &)
249inline cVec2& cVec2::operator /= (const cVec2 &u) {
250 x /= u.x;
251 y /= u.y;
252 return *this;
253}
254
255// cVec2::operator /= : void (const float)
256inline cVec2& cVec2::operator /= (const float s) {
257 float is = 1.0f / s;
258 x *= is;
259 y *= is;
260 return *this;
261}
262
263// cVec2::operator + : const cVec2 (const cVec2 &) const
264inline const cVec2 cVec2::operator + (const cVec2 &u) const {
265 return cVec2(x + u.x, y + u.y);
266}
267
268// cVec2::operator - : const cVec2 (const cVec2 &) const
269inline const cVec2 cVec2::operator - (const cVec2 &u) const {
270 return cVec2(x - u.x, y - u.y);
271}
272
273// cVec2::operator * : const cVec2 (const cVec2 &) const
274inline const cVec2 cVec2::operator * (const cVec2 &u) const {
275 return cVec2(x * u.x, y * u.y);
276}
277
278// cVec2::operator * : const cVec2 (const float) const
279inline const cVec2 cVec2::operator * (const float s) const {
280 return cVec2(x * s, y * s);
281}
282
283// cVec2::friend operator * : const cVec2 (const float, const cVec2 &)
284inline const cVec2 operator * (const float s, const cVec2 &u) {
285 return cVec2(s * u.x, s * u.y);
286}
287
288// cVec2::operator / : const cVec2 (const cVec2 &) const
289inline const cVec2 cVec2::operator / (const cVec2 &u) const {
290 return cVec2(x / u.x, y / u.y);
291}
292
293// cVec2::operator / : const cVec2 (const float) const
294inline const cVec2 cVec2::operator / (const float s) const {
295 float is = 1.0f / s;
296 return cVec2(x * is, y * is);
297}
298
299// cVec2::friend operator / : const cVec2 (const float, const cVec2 &)
300inline const cVec2 operator / (const float s, const cVec2 &u) {
301 return cVec2(s / u.x, s / u.y);
302}
303
304// cVec2::operator == : bool(const cVec2 &) const
305inline bool cVec2::operator == (const cVec2 &u) const {
306 return x == u.x && y == u.y;
307}
308
309// cVec2::operator != : bool(const cVec2 &) const
310inline bool cVec2::operator != (const cVec2 &u) const {
311 return x != u.x || y != u.y;
312}
313
314// cVec2::Equals : bool(const cVec2 &, const cVec2 &, const float)
315inline bool cVec2::Equals(const cVec2 &u, const cVec2 &v, const float Eps) {
316 if(cMath::Abs(u.x - v.x) > Eps) return false;
317 if(cMath::Abs(u.y - v.y) > Eps) return false;
318 return true;
319}
320
321// cVec2::Length : float() const
322inline float cVec2::Length() const {
323 return cMath::Sqrt(x * x + y * y);
324}
325
326// cVec2::LengthSq : float() const
327inline float cVec2::LengthSq() const {
328 return x * x + y * y;
329}
330
331// cVec2::Normalize : ()
332inline float cVec2::Normalize() {
333 const float l = Length();
334 if(l > 0.0f) {
335 const float il = 1.0f / l;
336 x *= il;
337 y *= il;
338 }
339 return l;
340}
341
342// cVec2::NormalizeSafe
343inline float cVec2::NormalizeSafe(const cVec2 &Fallback) {
344 const float l = Length();
345 if(l > 0.0f) {
346 const float il = 1.0f / l;
347 x *= il;
348 y *= il;
349 cAssert(IsNormalized());
350 return l;
351 }
352 *this = Fallback;
353 cAssert(IsNormalized());
354 return 0.0f;
355}
356
357// cVec2::IsValid : bool () const
358inline bool cVec2::IsValid() const {
359 return cMath::IsValid(x) && cMath::IsValid(y);
360}
361
362// cVec2::IsNormalized : bool(const float) const
363inline bool cVec2::IsNormalized(const float Eps) const {
364 return cMath::IsOne(LengthSq(), Eps);
365}
366
367// cVec2::IsZero : bool(const float) const
368inline bool cVec2::IsZero(const float Eps) const {
369 if(!cMath::IsZero(x, Eps)) return false;
370 if(!cMath::IsZero(y, Eps)) return false;
371 return true;
372}
373
374// cVec2::Normalize : const cVec2(const cVec2 &)
375inline const cVec2 cVec2::Normalize(const cVec2 &u) {
376 cVec2 t = u;
377 t.Normalize();
378 return t;
379}
380
381// cVec2::NormalizeSafe : (const cVec2 &, const cVec2 &)
382inline const cVec2 cVec2::NormalizeSafe(const cVec2 &Src, const cVec2 &Fallback) {
383 cVec2 t = Src;
384 t.NormalizeSafe(Fallback);
385 return t;
386}
387
388// cVec2::FromPolar
389inline const cVec2 cVec2::FromPolar(const float Radius, const float Angle) {
390 float A = cMath::Rad(Angle);
391 return cVec2(Radius * cMath::Cos(A), Radius * cMath::Sin(A));
392}
393
394inline std::tuple<float, float> cVec2::__getstate__() {
395 return std::make_tuple(x, y);
396}
397
398inline void cVec2::__setstate__(const std::tuple<float, float>& state) {
399 x = std::get<0>(state);
400 y = std::get<1>(state);
401}
402
403// cVec2::FromBaryCentric : cVec2(const cVec2 &, const cVec2 &, const cVec2 &, const float, const float)
404inline const cVec2 cVec2::FromBaryCentric(const cVec2 &t0, const cVec2 &t1, const cVec2 &t2, const float u, const float v) {
405 return t0 + u * (t1 - t0) + v * (t2 - t0);
406}
407
408// cVec2::Abs : const cVec2(const cVec2 &)
409inline const cVec2 cVec2::Abs(const cVec2& u) {
410 return cVec2(cMath::Abs(u.x), cMath::Abs(u.y));
411}
412
413// cVec2::Fract : const cVec2(const cVec2 &)
414inline const cVec2 cVec2::Fract(const cVec2& u) {
415 return cVec2(u.x-floorf(u.x), u.y-floorf(u.y));
416}
417
418// cVec2::Round
419inline const cVec2 cVec2::Round(const cVec2 &u) {
420 return cVec2(cMath::Round(u.x), cMath::Round(u.y));
421}
422
423// cVec2::ToRound
424inline const cVec2 cVec2::ToRound() const {
425 return cVec2(cMath::Round(x), cMath::Round(y));
426}
427
428// cVec2::Round
429inline void cVec2::Round() {
430 x = cMath::Round(x);
431 y = cMath::Round(y);
432}
433
434// cVec2::Angle : float(const cVec2 &, const cVec2 &)
435inline float cVec2::Angle(const cVec2 &u, const cVec2 &v) {
436 const float d = u.x * v.y - v.x * u.y;
437 const float s = d != 0.0f ? cMath::Sign(d) : 1.0f;
438 const float D = cVec2::Dot(u, v);
439 const float ll = u.Length() * v.Length();
440 return s * cMath::Deg(cMath::ACos(D / ll));
441}
442
443// cVec2::AreaSigned : float(const cVec2 &, const cVec2 &, const cVec2 &)
444inline float cVec2::AreaSigned(const cVec2 &t0, const cVec2 &t1, const cVec2 &t2) {
445 const cVec2 e1 = t1 - t0;
446 const cVec2 e2 = t2 - t0;
447 return Ccw(e1, e2) * 0.5f;
448}
449
450// cVec2::ToBaryCentric : void(const cVec2 &, const cVec2 &, const cVec2 &, float &, float &) const
451inline float cVec2::ToBaryCentric(const cVec2 &t0, const cVec2 &t1, const cVec2 &t2, float &u, float &v) const {
452 const float A = AreaSigned(t0, t1, t2);
453 if(A != 0) {
454 const float iA = 1.0f / A;
455 u = AreaSigned(t0, *this, t2) * iA;
456 v = AreaSigned(t0, t1, *this) * iA;
457 } else {
458 u = v = 0.0f;
459 }
460 return A;
461}
462
463// cVec2::IsInsideTri : bool(const cVec2 &, const cVec2 &, const cVec2 &) const
464inline bool cVec2::IsInsideTri(const cVec2 &t0, const cVec2 &t1, const cVec2 &t2) const {
465 float u, v;
466 ToBaryCentric(t0, t1, t2, u, v);
467 return u >= 0.0f && v >= 0.0f && 1.0f - u - v >= 0.0f;
468}
469
470// cVec2::ToPolar
471inline void cVec2::ToPolar(float *Radius, float *Angle) const {
472 float R = Length(), A = 0.0f;
473 if(cMath::IsZero(R)) {
474 R = 0.0f;
475 } else {
476 A = cMath::ACos(x / R);
477 if(y < 0.0f) {
478 A = -A;
479 }
480 A = cMath::Deg(cMath::AngleNormalizeTwoPi(A));
481 }
482 if(Radius != nullptr) {
483 *Radius = R;
484 }
485 if(Angle != nullptr) {
486 *Angle = A;
487 }
488}
489
490// cVec2::Reflect
491inline const cVec2 cVec2::Reflect(const cVec2 &RayDir, const cVec2 &Normal) {
492 return RayDir - 2.0f * Dot(RayDir, Normal) * Normal;
493}
494
495// cVec2::Refract
496inline const cVec2 cVec2::Refract(const cVec2 &RayDir, const cVec2 &Normal, const float Eta) {
497 float k = 1.0f - Eta * Eta * (1.0f - cMath::Square(Dot(Normal, RayDir)));
498 if(k < 0.0f) {
499 return cVec2::Zero;
500 }
501 return Eta * RayDir - (Eta * Dot(Normal, RayDir) + cMath::Sqrt(k)) * Normal;
502}
503
504// cVec2::Truncate : (const float)
505inline void cVec2::Truncate(const float MaxLen) {
506 if(MaxLen <= 0) {
507 SetZero();
508 return;
509 }
510 float l = Length();
511 if(l > MaxLen) {
512 float il = MaxLen / l;
513 x *= il;
514 y *= il;
515 }
516}
517
518// cVec2::Truncate : (const cVec2 &, ...)
519inline const cVec2 cVec2::Truncate(const cVec2 &u, const float MaxLen) {
520 if(MaxLen <= 0) {
521 return cVec2::Zero;
522 }
523 float l = u.Length();
524 if(l > MaxLen) {
525 float il = MaxLen / l;
526 return cVec2(u.x * il, u.y * il);
527 }
528 return u;
529}
530
531// cVec2::GetDimension : int() const
532inline int cVec2::GetDimension() const {
533 return 2;
534}
535
536// cVec2::ToFloatPtr : const float * () const
537inline const float * cVec2::ToFloatPtr() const {
538 return (const float *)&x;
539}
540
541// cVec2::ToFloatPtr : float * ()
542inline float * cVec2::ToFloatPtr() {
543 return (float *)&x;
544}
545
546// cVec2::operator cVec<Type, 2>
547template<class Type>
548cVec2::operator cVec<Type, 2> () const {
549 return cVec<Type, 2>( (Type)x, (Type)y );
550}
551
552// cVec2::Max : const cVec2(const cVec2 &, const cVec2 &)
553inline const cVec2 cVec2::Max(const cVec2 &u, const cVec2 &v) {
554 cVec2 r;
555 r.x = u.x > v.x ? u.x : v.x;
556 r.y = u.y > v.y ? u.y : v.y;
557 return r;
558}
559
560// cVec2::Min : const cVec2(const cVec2 &, const cVec2 &)
561inline const cVec2 cVec2::Min(const cVec2 &u, const cVec2 &v) {
562 cVec2 r;
563 r.x = u.x < v.x ? u.x : v.x;
564 r.y = u.y < v.y ? u.y : v.y;
565 return r;
566}
567
568// cVec2::Ccw : float(const cVec2 &, const cVec2 &)
569inline float cVec2::Ccw(const cVec2 &u, const cVec2 &v) {
570 return u.x * v.y - u.y * v.x;
571}
572
573// cVec2::Clamp : const cVec2(const cVec2 &, const cVec2 &, const cVec2 &)
574inline const cVec2 cVec2::Clamp(const cVec2 &Value, const cVec2 &Lo, const cVec2 &Hi) {
575 cVec2 r;
576 r.x = Value.x < Lo.x ? Lo.x : (Value.x > Hi.x ? Hi.x : Value.x);
577 r.y = Value.y < Lo.y ? Lo.y : (Value.y > Hi.y ? Hi.y : Value.y);
578 return r;
579}
580
581// cVec2::Distance : float(const cVec2 &, const cVec2 &)
582inline float cVec2::Distance(const cVec2 &p0, const cVec2 &p1) {
583 float dx = p0.x - p1.x;
584 float dy = p0.y - p1.y;
585 return cMath::Sqrt(dx * dx + dy * dy);
586}
587float cVec2::distance2(const cVec2& pt) {
588 return DistanceSq(*this, pt);
589}
590float cVec2::distance(const cVec2& pt) {
591 return Distance(*this, pt);
592}
593// cVec2::DistanceSq : float(const cVec2 &, const cVec2 &)
594inline float cVec2::DistanceSq(const cVec2 &p0, const cVec2 &p1) {
595 float dx = p0.x - p1.x;
596 float dy = p0.y - p1.y;
597 return dx * dx + dy * dy;
598}
599
600// cVec2::Dot : float(const cVec2 &, const cVec2 &)
601inline float cVec2::Dot(const cVec2 &u, const cVec2 &v) {
602 return u.x * v.x + u.y * v.y;
603}
604
605// cVec2::Length : float(const cVec2 &)
606inline float cVec2::Length(const cVec2 &u) {
607 return cMath::Sqrt(u.x * u.x + u.y * u.y);
608}
609
610// cVec2::LengthSq : float(const cVec2 &)
611inline float cVec2::LengthSq(const cVec2 &u) {
612 return u.x * u.x + u.y * u.y;
613}
614
615// cVec2::Lerp : const cVec2(const cVec2 &, const cVec2 &, const float)
616inline const cVec2 cVec2::Lerp(const cVec2 &u, const cVec2 &v, const float s) {
617 cVec2 r;
618 r.x = u.x + s * (v.x - u.x);
619 r.y = u.y + s * (v.y - u.y);
620 return r;
621}
622
623// cVec2::Lerp05 : const cVec2(const cVec2 &, const cVec2 &)
624inline const cVec2 cVec2::Lerp05(const cVec2 &u, const cVec2 &v) {
625 cVec2 r;
626 r.x = (u.x + v.x) * 0.5f;
627 r.y = (u.y + v.y) * 0.5f;
628 return r;
629}
630
631// cVec2::PerpCw : const cVec2(const cVec2 &)
632inline const cVec2 cVec2::PerpCw(const cVec2 &u) {
633 return cVec2(u.y, -u.x);
634}
635
636// cVec2::ToPerpCw : () const
637inline const cVec2 cVec2::ToPerpCw() const {
638 return cVec2(y, -x);
639}
640
641// cVec2::PerpCcw : const cVec2(const cVec2 &)
642inline const cVec2 cVec2::PerpCcw(const cVec2 &u) {
643 return cVec2(-u.y, u.x);
644}
645
646// cVec2::PerpCcw : () const
647inline const cVec2 cVec2::ToPerpCcw() const {
648 return cVec2(-y, x);
649}
650
651// cVec2::ToNormal : const cVec2 () const
652inline const cVec2 cVec2::ToNormal() const {
653 cVec2 u(*this);
654 u.Normalize();
655 return u;
656}
657
658// cVec2::Rand
659inline const cVec2 cVec2::Rand(const cVec2 &Lo, const cVec2 &Hi) {
660 return cVec2(cMath::Rand(Lo.x, Hi.x), cMath::Rand(Lo.y, Hi.y));
661}
The 3D-matrix, refer it as coat::mat3 in the Core API.
Definition cMat3.h:6
The 4D-matrix, refer it as coat::mat4 in the Core API.
Definition cMat4.h:6
Definition cStr.h:6
The 2D-vector, refer it as coat::vec2 in the Core API.
Definition cVec2.h:9
The 4D-vector, refer it as coat::vec4 in the Core API.
Definition cVec4.h:9