Leviathan  0.8.0.0
Leviathan game engine
TypesBind.cpp
Go to the documentation of this file.
1 // ------------------------------------ //
2 #include "BindDefinitions.h"
3 
4 #include "Common/Matrix.h"
5 #include "Common/Plane.h"
6 #include "Common/Quaternion.h"
7 #include "Common/Ray.h"
8 #include "Common/Types.h"
9 
10 using namespace Leviathan;
11 // ------------------------------------ //
12 
13 // Proxies etc.
14 // ------------------------------------ //
15 
17 
19 
20 // Float2
21 void Float2ConstructorProxy(void* memory)
22 {
23  new(memory) Float2();
24 }
25 
26 void Float2ConstructorProxyAll(void* memory, float x, float y)
27 {
28  new(memory) Float2(x, y);
29 }
30 
31 void Float2ConstructorProxySingle(void* memory, float all)
32 {
33  new(memory) Float2(all);
34 }
35 
36 void Float2ConstructorProxyCopy(void* memory, const Float2& other)
37 {
38  new(memory) Float2(other);
39 }
40 
41 void Float2DestructorProxy(void* memory)
42 {
43  reinterpret_cast<Float2*>(memory)->~Float2();
44 }
45 
46 // Float3
47 void Float3ConstructorProxy(void* memory)
48 {
49  new(memory) Float3();
50 }
51 
52 void Float3ConstructorProxyAll(void* memory, float x, float y, float z)
53 {
54  new(memory) Float3(x, y, z);
55 }
56 
57 void Float3ConstructorProxySingle(void* memory, float all)
58 {
59  new(memory) Float3(all);
60 }
61 
62 void Float3ConstructorProxyCopy(void* memory, const Float3& other)
63 {
64  new(memory) Float3(other);
65 }
66 
67 void Float3ConstructorProxyFromInt3(void* memory, const Int3& values)
68 {
69  new(memory) Float3(values);
70 }
71 
72 void Float3DestructorProxy(void* memory)
73 {
74  reinterpret_cast<Float3*>(memory)->~Float3();
75 }
76 
77 // Float4
78 void Float4ConstructorProxy(void* memory)
79 {
80  new(memory) Float4();
81 }
82 
83 void Float4ConstructorProxyAll(void* memory, float x, float y, float z, float w)
84 {
85  new(memory) Float4(x, y, z, w);
86 }
87 
88 void Float4ConstructorProxySingle(void* memory, float all)
89 {
90  new(memory) Float4(all);
91 }
92 
93 void Float4ConstructorProxyCopy(void* memory, const Float4& other)
94 {
95  new(memory) Float4(other);
96 }
97 
98 void Float4DestructorProxy(void* memory)
99 {
100  reinterpret_cast<Float4*>(memory)->~Float4();
101 }
102 
103 // Quaternion
104 void QuaternionConstructorProxy(void* memory)
105 {
106  new(memory) Quaternion();
107 }
108 
109 void QuaternionConstructorProxyAll(void* memory, float x, float y, float z, float w)
110 {
111  new(memory) Quaternion(x, y, z, w);
112 }
113 
114 void QuaternionConstructorProxyCopy(void* memory, const Quaternion& other)
115 {
116  new(memory) Quaternion(other);
117 }
118 
119 void QuaternionConstructorAxisProxy(void* memory, const Float3& axis, Radian angle)
120 {
121  new(memory) Quaternion(axis, angle);
122 }
123 
124 void QuaternionConstructorFloat4Proxy(void* memory, const Float4& obj)
125 {
126  new(memory) Quaternion(obj);
127 }
128 
129 void QuaternionDestructorProxy(void* memory)
130 {
131  reinterpret_cast<Quaternion*>(memory)->~Quaternion();
132 }
133 // ------------------------------------ //
134 // Int2
135 void Int2ConstructorProxy(void* memory)
136 {
137  new(memory) Int2();
138 }
139 
140 void Int2ConstructorProxyAll(void* memory, int x, int y)
141 {
142  new(memory) Int2(x, y);
143 }
144 
145 void Int2ConstructorProxySingle(void* memory, int all)
146 {
147  new(memory) Int2(all);
148 }
149 
150 void Int2ConstructorProxyCopy(void* memory, const Int2& other)
151 {
152  new(memory) Int2(other);
153 }
154 
155 void Int2ListConstructor(void* memory, int* list)
156 {
157  new(memory) Int2(list[0], list[1]);
158 }
159 
160 void Int2DestructorProxy(void* memory)
161 {
162  reinterpret_cast<Int2*>(memory)->~Int2();
163 }
164 
165 // Int3
166 void Int3ConstructorProxy(void* memory)
167 {
168  new(memory) Int3();
169 }
170 
171 void Int3ConstructorProxyAll(void* memory, int x, int y, int z)
172 {
173  new(memory) Int3(x, y, z);
174 }
175 
176 void Int3ConstructorProxySingle(void* memory, int all)
177 {
178  new(memory) Int3(all);
179 }
180 
181 void Int3ConstructorProxyCopy(void* memory, const Int3& other)
182 {
183  new(memory) Int3(other);
184 }
185 
186 void Int3DestructorProxy(void* memory)
187 {
188  reinterpret_cast<Int3*>(memory)->~Int3();
189 }
190 // ------------------------------------ //
191 // Radian
192 void RadianConstructorProxy(void* memory)
193 {
194  new(memory) Radian();
195 }
196 
197 void RadianConstructorValueProxy(void* memory, float value)
198 {
199  new(memory) Radian(value);
200 }
201 
202 void RadianConstructorCopyProxy(void* memory, const Radian& other)
203 {
204  new(memory) Radian(other);
205 }
206 
207 void RadianConstructorDegreeProxy(void* memory, const Degree& degrees)
208 {
209  new(memory) Radian(degrees);
210 }
211 
212 void RadianDestructorProxy(void* memory)
213 {
214  reinterpret_cast<Radian*>(memory)->~Radian();
215 }
216 // ------------------------------------ //
217 // Degree
218 void DegreeConstructorProxy(void* memory)
219 {
220  new(memory) Degree();
221 }
222 
223 void DegreeConstructorValueProxy(void* memory, float value)
224 {
225  new(memory) Degree(value);
226 }
227 
228 void DegreeConstructorCopyProxy(void* memory, const Degree& other)
229 {
230  new(memory) Degree(other);
231 }
232 
233 void DegreeConstructorRadianProxy(void* memory, const Radian& radians)
234 {
235  new(memory) Degree(radians);
236 }
237 
238 void DegreeDestructorProxy(void* memory)
239 {
240  reinterpret_cast<Degree*>(memory)->~Degree();
241 }
242 
243 // ------------------------------------ //
244 // Matrix4
245 void Matrix4ConstructorProxy(void* memory)
246 {
247  new(memory) Matrix4();
248 }
249 
250 void Matrix4DestructorProxy(void* memory)
251 {
252  reinterpret_cast<Matrix4*>(memory)->~Matrix4();
253 }
254 
255 // ------------------------------------ //
256 // Ray
257 void RayConstructorProxy(void* memory)
258 {
259  new(memory) Ray();
260 }
261 
262 void RayDestructorProxy(void* memory)
263 {
264  reinterpret_cast<Ray*>(memory)->~Ray();
265 }
266 
267 // ------------------------------------ //
268 // Plane
269 void PlaneConstructorVectorProxy(void* memory, const Float3& normal, float distance)
270 {
271  new(memory) Plane(normal, distance);
272 }
273 
274 void PlaneDestructorProxy(void* memory)
275 {
276  reinterpret_cast<Plane*>(memory)->~Plane();
277 }
278 
280 
281 // ------------------------------------ //
282 // Start of the actual bind
283 namespace Leviathan {
284 
285 bool BindFloat2(asIScriptEngine* engine)
286 {
287  if(engine->RegisterObjectType("Float2", sizeof(Float2),
288  asOBJ_VALUE | asGetTypeTraits<Float2>() | asOBJ_APP_CLASS_ALLFLOATS) < 0) {
290  }
291  if(engine->RegisterObjectBehaviour("Float2", asBEHAVE_CONSTRUCT, "void f()",
292  asFUNCTION(Float2ConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
294  }
295  if(engine->RegisterObjectBehaviour("Float2", asBEHAVE_CONSTRUCT, "void f(float value)",
296  asFUNCTION(Float2ConstructorProxySingle), asCALL_CDECL_OBJFIRST) < 0) {
298  }
299  if(engine->RegisterObjectBehaviour("Float2", asBEHAVE_CONSTRUCT,
300  "void f(float x, float y)", asFUNCTION(Float2ConstructorProxyAll),
301  asCALL_CDECL_OBJFIRST) < 0) {
303  }
304  if(engine->RegisterObjectBehaviour("Float2", asBEHAVE_CONSTRUCT,
305  "void f(const Float2 &in other)", asFUNCTION(Float2ConstructorProxyCopy),
306  asCALL_CDECL_OBJFIRST) < 0) {
308  }
309  if(engine->RegisterObjectBehaviour("Float2", asBEHAVE_DESTRUCT, "void f()",
310  asFUNCTION(Float2DestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
312  }
313  // Operators //
314  if(engine->RegisterObjectMethod("Float2", "Float2& opAssign(const Float2 &in other)",
315  asMETHODPR(Float2, operator=,(const Float2&), Float2&), asCALL_THISCALL) < 0) {
317  }
318 
319  if(engine->RegisterObjectMethod("Float2", "Float2 opAdd(const Float2 &in other) const",
320  asMETHODPR(Float2, operator+,(const Float2&) const, Float2), asCALL_THISCALL) < 0) {
322  }
323 
324  if(engine->RegisterObjectMethod("Float2", "Float2 opSub(const Float2 &in other) const",
325  asMETHODPR(Float2, operator-,(const Float2&) const, Float2), asCALL_THISCALL) < 0) {
327  }
328 
329  if(engine->RegisterObjectMethod("Float2", "Float2 opMul(float multiply) const",
330  asMETHODPR(Float2, operator*,(float) const, Float2), asCALL_THISCALL) < 0) {
332  }
333 
334  if(engine->RegisterObjectMethod("Float2", "Float2 Normalize() const",
335  asMETHOD(Float2, Normalize), asCALL_THISCALL) < 0) {
337  }
338 
339  if(engine->RegisterObjectMethod(
340  "Float2", "float HAddAbs()", asMETHOD(Float2, HAddAbs), asCALL_THISCALL) < 0) {
342  }
343 
344  if(engine->RegisterObjectMethod("Float2", "bool HasInvalidValues() const",
345  asMETHOD(Float2, HasInvalidValues), asCALL_THISCALL) < 0) {
347  }
348 
349  // Direct access
350  if(engine->RegisterObjectProperty("Float2", "float X", asOFFSET(Float2, X)) < 0) {
351 
353  }
354 
355  if(engine->RegisterObjectProperty("Float2", "float Y", asOFFSET(Float2, Y)) < 0) {
356 
358  }
359 
360  return true;
361 }
362 // ------------------------------------ //
363 bool BindFloat3(asIScriptEngine* engine)
364 {
365  if(engine->RegisterObjectType("Float3", sizeof(Float3),
366  asOBJ_VALUE | asGetTypeTraits<Float3>() | asOBJ_APP_CLASS_ALLFLOATS) < 0) {
368  }
369  if(engine->RegisterObjectBehaviour("Float3", asBEHAVE_CONSTRUCT, "void f()",
370  asFUNCTION(Float3ConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
372  }
373  if(engine->RegisterObjectBehaviour("Float3", asBEHAVE_CONSTRUCT, "void f(float value)",
374  asFUNCTION(Float3ConstructorProxySingle), asCALL_CDECL_OBJFIRST) < 0) {
376  }
377  if(engine->RegisterObjectBehaviour("Float3", asBEHAVE_CONSTRUCT,
378  "void f(float x, float y, float z)", asFUNCTION(Float3ConstructorProxyAll),
379  asCALL_CDECL_OBJFIRST) < 0) {
381  }
382  if(engine->RegisterObjectBehaviour("Float3", asBEHAVE_CONSTRUCT,
383  "void f(const Float3 &in other)", asFUNCTION(Float3ConstructorProxyCopy),
384  asCALL_CDECL_OBJFIRST) < 0) {
386  }
387  if(engine->RegisterObjectBehaviour("Float3", asBEHAVE_CONSTRUCT,
388  "void f(const Int3 &in values)", asFUNCTION(Float3ConstructorProxyFromInt3),
389  asCALL_CDECL_OBJFIRST) < 0) {
391  }
392 
393  if(engine->RegisterObjectBehaviour("Float3", asBEHAVE_DESTRUCT, "void f()",
394  asFUNCTION(Float3DestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
396  }
397  // Operators //
398  if(engine->RegisterObjectMethod("Float3", "Float3& opAssign(const Float3 &in other)",
399  asMETHODPR(Float3, operator=,(const Float3&), Float3&), asCALL_THISCALL) < 0) {
401  }
402 
403  if(engine->RegisterObjectMethod("Float3", "Float3 opAdd(const Float3 &in other) const",
404  asMETHODPR(Float3, operator+,(const Float3&) const, Float3), asCALL_THISCALL) < 0) {
406  }
407 
408  if(engine->RegisterObjectMethod("Float3", "Float3 opNeg() const",
409  asMETHODPR(Float3, operator-,() const, Float3), asCALL_THISCALL) < 0) {
411  }
412 
413  if(engine->RegisterObjectMethod("Float3", "bool opEquals(const Float3 &in other) const",
414  asMETHODPR(Float3, operator==,(const Float3&) const, bool), asCALL_THISCALL) < 0) {
416  }
417 
418  if(engine->RegisterObjectMethod("Float3", "Float3& opAddAssign(const Float3 &in other)",
419  asMETHODPR(Float3, operator+=,(const Float3&), Float3&), asCALL_THISCALL) < 0) {
421  }
422 
423  if(engine->RegisterObjectMethod("Float3", "Float3& opSubAssign(const Float3 &in other)",
424  asMETHODPR(Float3, operator-=,(const Float3&), Float3&), asCALL_THISCALL) < 0) {
426  }
427 
428  if(engine->RegisterObjectMethod("Float3", "Float3& opMulAssign(float value)",
429  asMETHODPR(Float3, operator*=,(float), Float3&), asCALL_THISCALL) < 0) {
431  }
432 
433  if(engine->RegisterObjectMethod("Float3", "Float3 opSub(const Float3 &in other) const",
434  asMETHODPR(Float3, operator-,(const Float3&) const, Float3), asCALL_THISCALL) < 0) {
436  }
437 
438  if(engine->RegisterObjectMethod("Float3", "Float3 opMul(float multiply) const",
439  asMETHODPR(Float3, operator*,(float) const, Float3), asCALL_THISCALL) < 0) {
441  }
442 
443  if(engine->RegisterObjectMethod("Float3", "Float3 opMul(const Float3 &in other) const",
444  asMETHODPR(Float3, operator*,(const Float3&) const, Float3), asCALL_THISCALL) < 0) {
446  }
447 
448  if(engine->RegisterObjectMethod("Float3", "Float3& opDivAssign(float value)",
449  asMETHODPR(Float3, operator/=,(float), Float3&), asCALL_THISCALL) < 0) {
451  }
452 
453 
454  if(engine->RegisterObjectMethod("Float3", "Float3 Normalize() const",
455  asMETHOD(Float3, Normalize), asCALL_THISCALL) < 0) {
457  }
458 
459  if(engine->RegisterObjectMethod("Float3", "float HAddAbs() const",
460  asMETHOD(Float3, HAddAbs), asCALL_THISCALL) < 0) {
462  }
463 
464  if(engine->RegisterObjectMethod(
465  "Float3", "float HAdd() const", asMETHOD(Float3, HAdd), asCALL_THISCALL) < 0) {
467  }
468 
469  if(engine->RegisterObjectMethod("Float3", "float LengthSquared() const",
470  asMETHOD(Float3, LengthSquared), asCALL_THISCALL) < 0) {
472  }
473 
474  if(engine->RegisterObjectMethod("Float3", "float Dot(const Float3 &in val) const",
475  asMETHOD(Float3, Dot), asCALL_THISCALL) < 0) {
477  }
478 
479  if(engine->RegisterObjectMethod("Float3", "Float3 Cross(const Float3 &in val) const",
480  asMETHOD(Float3, Cross), asCALL_THISCALL) < 0) {
482  }
483 
484  if(engine->RegisterObjectMethod("Float3", "bool HasInvalidValues() const",
485  asMETHOD(Float3, HasInvalidValues), asCALL_THISCALL) < 0) {
487  }
488 
489  // Direct access
490  if(engine->RegisterObjectProperty("Float3", "float X", asOFFSET(Float3, X)) < 0) {
491 
493  }
494 
495  if(engine->RegisterObjectProperty("Float3", "float Y", asOFFSET(Float3, Y)) < 0) {
496 
498  }
499 
500  if(engine->RegisterObjectProperty("Float3", "float Z", asOFFSET(Float3, Z)) < 0) {
501 
503  }
504 
505 
506  // ------------------------------------ //
507  // Named ones
508  if(engine->SetDefaultNamespace("Float3") < 0) {
510  }
511 
512  if(engine->RegisterGlobalProperty("const Float3 UnitVUp", &UnitVUpProxy) < 0) {
513 
515  }
516 
517  if(engine->SetDefaultNamespace("") < 0) {
519  }
520 
521 
522 
523  return true;
524 }
525 // ------------------------------------ //
526 bool BindFloat4(asIScriptEngine* engine)
527 {
528  // Float4
529  if(engine->RegisterObjectType("Float4", sizeof(Float4),
530  asOBJ_VALUE | asGetTypeTraits<Float4>() | asOBJ_APP_CLASS_ALLFLOATS) < 0) {
532  }
533 
534  if(engine->RegisterObjectBehaviour("Float4", asBEHAVE_CONSTRUCT, "void f()",
535  asFUNCTION(Float4ConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
537  }
538 
539  if(engine->RegisterObjectBehaviour("Float4", asBEHAVE_CONSTRUCT, "void f(float value)",
540  asFUNCTION(Float4ConstructorProxySingle), asCALL_CDECL_OBJFIRST) < 0) {
542  }
543 
544  if(engine->RegisterObjectBehaviour("Float4", asBEHAVE_CONSTRUCT,
545  "void f(float x, float y, float z, float w)", asFUNCTION(Float4ConstructorProxyAll),
546  asCALL_CDECL_OBJFIRST) < 0) {
548  }
549 
550  if(engine->RegisterObjectBehaviour("Float4", asBEHAVE_CONSTRUCT,
551  "void f(const Float4 &in other)", asFUNCTION(Float4ConstructorProxyCopy),
552  asCALL_CDECL_OBJFIRST) < 0) {
554  }
555 
556  if(engine->RegisterObjectBehaviour("Float4", asBEHAVE_DESTRUCT, "void f()",
557  asFUNCTION(Float4DestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
559  }
560 
561  // Operators //
562  if(engine->RegisterObjectMethod("Float4", "Float4& opAssign(const Float4 &in other)",
563  asMETHODPR(Float4, operator=,(const Float4&), Float4&), asCALL_THISCALL) < 0) {
565  }
566 
567  if(engine->RegisterObjectMethod("Float4", "bool opEquals(const Float4 &in other) const",
568  asMETHODPR(Float4, operator==,(const Float4&) const, bool), asCALL_THISCALL) < 0) {
570  }
571 
572  if(engine->RegisterObjectMethod("Float4", "Float4 opAdd(const Float4 &in other) const",
573  asMETHODPR(Float4, operator+,(const Float4&) const, Float4), asCALL_THISCALL) < 0) {
575  }
576 
577  if(engine->RegisterObjectMethod("Float4", "Float4 opSub(const Float4 &in other) const",
578  asMETHODPR(Float4, operator-,(const Float4&) const, Float4), asCALL_THISCALL) < 0) {
580  }
581 
582  if(engine->RegisterObjectMethod("Float4", "Float4 opMul(float multiply) const",
583  asMETHODPR(Float4, operator*,(float) const, Float4), asCALL_THISCALL) < 0) {
585  }
586 
587  if(engine->RegisterObjectMethod("Float4", "Float4 opMul(const Float4 &in other) const",
588  asMETHODPR(Float4, operator*,(const Float4&) const, Float4), asCALL_THISCALL) < 0) {
590  }
591 
592  if(engine->RegisterObjectMethod("Float4", "Float4 Normalize() const",
593  asMETHOD(Float4, Normalize), asCALL_THISCALL) < 0) {
595  }
596 
597  if(engine->RegisterObjectMethod("Float4", "bool HasInvalidValues() const",
598  asMETHOD(Float4, HasInvalidValues), asCALL_THISCALL) < 0) {
600  }
601 
602  if(engine->RegisterObjectMethod("Float4",
603  "void ConvertToHSB(float &out hue, float &out saturation, float &out brightness) "
604  "const",
605  asMETHOD(Float4, ConvertToHSB), asCALL_THISCALL) < 0) {
607  }
608 
609  // Direct access
610  if(engine->RegisterObjectProperty("Float4", "float X", asOFFSET(Float4, X)) < 0) {
611 
613  }
614 
615  if(engine->RegisterObjectProperty("Float4", "float Y", asOFFSET(Float4, Y)) < 0) {
616 
618  }
619 
620  if(engine->RegisterObjectProperty("Float4", "float Z", asOFFSET(Float4, Z)) < 0) {
621 
623  }
624 
625  if(engine->RegisterObjectProperty("Float4", "float W", asOFFSET(Float4, W)) < 0) {
626 
628  }
629 
630  // ------------------------------------ //
631  // Namespace members
632  if(engine->SetDefaultNamespace("Float4") < 0) {
634  }
635 
636  if(engine->RegisterGlobalFunction(
637  "Float4 FromHSB(float hue, float saturation, float brightness)",
638  asFUNCTION(Float4::FromHSB), asCALL_CDECL) < 0) {
639 
641  }
642 
643  if(engine->SetDefaultNamespace("") < 0) {
645  }
646 
647  return true;
648 }
649 // ------------------------------------ //
650 bool BindQuaternion(asIScriptEngine* engine)
651 {
652  // Quaternion
653  if(engine->RegisterObjectType("Quaternion", sizeof(Quaternion),
654  asOBJ_VALUE | asGetTypeTraits<Quaternion>() | asOBJ_APP_CLASS_ALLFLOATS) < 0) {
656  }
657 
658  if(engine->RegisterObjectBehaviour("Quaternion", asBEHAVE_CONSTRUCT, "void f()",
659  asFUNCTION(QuaternionConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
661  }
662 
663  if(engine->RegisterObjectBehaviour("Quaternion", asBEHAVE_CONSTRUCT,
664  "void f(float x, float y, float z, float w)",
665  asFUNCTION(QuaternionConstructorProxyAll), asCALL_CDECL_OBJFIRST) < 0) {
667  }
668 
669  if(engine->RegisterObjectBehaviour("Quaternion", asBEHAVE_CONSTRUCT,
670  "void f(const Quaternion &in other)", asFUNCTION(QuaternionConstructorProxyCopy),
671  asCALL_CDECL_OBJFIRST) < 0) {
673  }
674 
675  if(engine->RegisterObjectBehaviour("Quaternion", asBEHAVE_CONSTRUCT,
676  "void f(const Float4 &in copy)", asFUNCTION(QuaternionConstructorFloat4Proxy),
677  asCALL_CDECL_OBJFIRST) < 0) {
679  }
680 
681  if(engine->RegisterObjectBehaviour("Quaternion", asBEHAVE_CONSTRUCT,
682  "void f(const Float3 &in axis, Radian angle)",
683  asFUNCTION(QuaternionConstructorAxisProxy), asCALL_CDECL_OBJFIRST) < 0) {
685  }
686 
687  if(engine->RegisterObjectBehaviour("Quaternion", asBEHAVE_DESTRUCT, "void f()",
688  asFUNCTION(QuaternionDestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
690  }
691 
692  // Operators //
693  if(engine->RegisterObjectMethod("Quaternion",
694  "Quaternion& opAssign(const Quaternion &in other)",
695  asMETHODPR(Quaternion, operator=,(const Quaternion&), Quaternion&),
696  asCALL_THISCALL) < 0) {
698  }
699 
700  if(engine->RegisterObjectMethod("Quaternion",
701  "bool opEquals(const Quaternion &in other) const",
702  asMETHODPR(Quaternion, operator==,(const Quaternion&) const, bool),
703  asCALL_THISCALL) < 0) {
705  }
706 
707  if(engine->RegisterObjectMethod("Quaternion",
708  "Quaternion opMul(const Quaternion &in other) const",
709  asMETHODPR(Quaternion, operator*,(const Quaternion&) const, Quaternion),
710  asCALL_THISCALL) < 0) {
712  }
713 
714  if(engine->RegisterObjectMethod("Quaternion",
715  "Float3 opMul(const Float3 &in vector) const",
716  asMETHODPR(Quaternion, operator*,(const Float3&) const, Float3),
717  asCALL_THISCALL) < 0) {
719  }
720 
721  if(engine->RegisterObjectMethod("Quaternion", "Quaternion Normalize() const",
722  asMETHOD(Quaternion, Normalize), asCALL_THISCALL) < 0) {
724  }
725 
726  if(engine->RegisterObjectMethod("Quaternion", "Float3 ToAxis() const",
727  asMETHOD(Quaternion, ToAxis), asCALL_THISCALL) < 0) {
729  }
730 
731  if(engine->RegisterObjectMethod("Quaternion", "float ToAngle() const",
732  asMETHOD(Quaternion, ToAngle), asCALL_THISCALL) < 0) {
734  }
735 
736  if(engine->RegisterObjectMethod("Quaternion", "Quaternion Inverse() const",
737  asMETHOD(Quaternion, Inverse), asCALL_THISCALL) < 0) {
739  }
740 
741  if(engine->RegisterObjectMethod("Quaternion",
742  "Quaternion Slerp(const Quaternion &in other, float fraction) const",
743  asMETHOD(Quaternion, Slerp), asCALL_THISCALL) < 0) {
745  }
746 
747  if(engine->RegisterObjectMethod("Quaternion", "bool HasInvalidValues() const",
748  asMETHOD(Quaternion, HasInvalidValues), asCALL_THISCALL) < 0) {
750  }
751 
752  if(engine->RegisterObjectMethod("Quaternion", "Float3 XAxis() const",
753  asMETHOD(Quaternion, XAxis), asCALL_THISCALL) < 0) {
755  }
756 
757  if(engine->RegisterObjectMethod("Quaternion", "Float3 YAxis() const",
758  asMETHOD(Quaternion, YAxis), asCALL_THISCALL) < 0) {
760  }
761 
762  if(engine->RegisterObjectMethod("Quaternion", "Float3 ZAxis() const",
763  asMETHOD(Quaternion, ZAxis), asCALL_THISCALL) < 0) {
765  }
766 
767  // Direct access
768  if(engine->RegisterObjectProperty("Quaternion", "float X", asOFFSET(Quaternion, X)) < 0) {
769 
771  }
772 
773  if(engine->RegisterObjectProperty("Quaternion", "float Y", asOFFSET(Quaternion, Y)) < 0) {
774 
776  }
777 
778  if(engine->RegisterObjectProperty("Quaternion", "float Z", asOFFSET(Quaternion, Z)) < 0) {
779 
781  }
782 
783  if(engine->RegisterObjectProperty("Quaternion", "float W", asOFFSET(Quaternion, W)) < 0) {
784 
786  }
787 
788  // ------------------------------------ //
789  // Namespace members
790  if(engine->SetDefaultNamespace("Quaternion") < 0) {
792  }
793 
794  if(engine->RegisterGlobalProperty("const Quaternion IDENTITY", IdentityQuaternion) < 0) {
796  }
797 
798  if(engine->RegisterGlobalProperty(
799  "const Quaternion IdentityQuaternion", IdentityQuaternion) < 0) {
801  }
802 
803  if(engine->RegisterGlobalFunction("Quaternion LookAt(const Float3 &in "
804  "sourcepoint, const Float3 &in target)",
805  asFUNCTION(Quaternion::LookAt), asCALL_CDECL) < 0) {
806 
808  }
809 
810  if(engine->SetDefaultNamespace("") < 0) {
812  }
813 
814  return true;
815 }
816 // ------------------------------------ //
817 bool BindInt2(asIScriptEngine* engine)
818 {
819  if(engine->RegisterObjectType("Int2", sizeof(Int2),
820  asOBJ_VALUE | asGetTypeTraits<Int2>() | asOBJ_APP_CLASS_ALLINTS) < 0) {
822  }
823  if(engine->RegisterObjectBehaviour("Int2", asBEHAVE_CONSTRUCT, "void f()",
824  asFUNCTION(Int2ConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
826  }
827  if(engine->RegisterObjectBehaviour("Int2", asBEHAVE_CONSTRUCT, "void f(int value)",
828  asFUNCTION(Int2ConstructorProxySingle), asCALL_CDECL_OBJFIRST) < 0) {
830  }
831  if(engine->RegisterObjectBehaviour("Int2", asBEHAVE_CONSTRUCT, "void f(int x, int y)",
832  asFUNCTION(Int2ConstructorProxyAll), asCALL_CDECL_OBJFIRST) < 0) {
834  }
835  if(engine->RegisterObjectBehaviour("Int2", asBEHAVE_CONSTRUCT,
836  "void f(const Int2 &in other)", asFUNCTION(Int2ConstructorProxyCopy),
837  asCALL_CDECL_OBJFIRST) < 0) {
839  }
840  if(engine->RegisterObjectBehaviour("Int2", asBEHAVE_DESTRUCT, "void f()",
841  asFUNCTION(Int2DestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
843  }
844 
845  if(engine->RegisterObjectBehaviour("Int2", asBEHAVE_LIST_CONSTRUCT,
846  "void f(const int &in) {int, int}", asFUNCTION(Int2ListConstructor),
847  asCALL_CDECL_OBJFIRST) < 0) {
849  }
850 
851  // Operators //
852  if(engine->RegisterObjectMethod("Int2", "Int2& opAssign(const Int2 &in other)",
853  asMETHODPR(Int2, operator=,(const Int2&), Int2&), asCALL_THISCALL) < 0) {
855  }
856 
857  if(engine->RegisterObjectMethod("Int2", "Int2 opAdd(const Int2 &in other) const",
858  asMETHODPR(Int2, operator+,(const Int2&) const, Int2), asCALL_THISCALL) < 0) {
860  }
861 
862  if(engine->RegisterObjectMethod("Int2", "Int2 opSub(const Int2 &in other) const",
863  asMETHODPR(Int2, operator-,(const Int2&) const, Int2), asCALL_THISCALL) < 0) {
865  }
866 
867  if(engine->RegisterObjectMethod("Int2", "Int2 opMul(int multiply) const",
868  asMETHODPR(Int2, operator*,(int) const, Int2), asCALL_THISCALL) < 0) {
870  }
871 
872  // Direct access
873  if(engine->RegisterObjectProperty("Int2", "int X", asOFFSET(Int2, X)) < 0) {
874 
876  }
877 
878  if(engine->RegisterObjectProperty("Int2", "int Y", asOFFSET(Int2, Y)) < 0) {
879 
881  }
882 
883  return true;
884 }
885 // ------------------------------------ //
886 bool BindInt3(asIScriptEngine* engine)
887 {
888  if(engine->RegisterObjectType("Int3", sizeof(Int3),
889  asOBJ_VALUE | asGetTypeTraits<Int3>() | asOBJ_APP_CLASS_ALLINTS) < 0) {
891  }
892  if(engine->RegisterObjectBehaviour("Int3", asBEHAVE_CONSTRUCT, "void f()",
893  asFUNCTION(Int3ConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
895  }
896  if(engine->RegisterObjectBehaviour("Int3", asBEHAVE_CONSTRUCT, "void f(int value)",
897  asFUNCTION(Int3ConstructorProxySingle), asCALL_CDECL_OBJFIRST) < 0) {
899  }
900  if(engine->RegisterObjectBehaviour("Int3", asBEHAVE_CONSTRUCT,
901  "void f(int x, int y, int z)", asFUNCTION(Int3ConstructorProxyAll),
902  asCALL_CDECL_OBJFIRST) < 0) {
904  }
905  if(engine->RegisterObjectBehaviour("Int3", asBEHAVE_CONSTRUCT,
906  "void f(const Int3 &in other)", asFUNCTION(Int3ConstructorProxyCopy),
907  asCALL_CDECL_OBJFIRST) < 0) {
909  }
910  if(engine->RegisterObjectBehaviour("Int3", asBEHAVE_DESTRUCT, "void f()",
911  asFUNCTION(Int3DestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
913  }
914  // Operators //
915  if(engine->RegisterObjectMethod("Int3", "Int3& opAssign(const Int3 &in other)",
916  asMETHODPR(Int3, operator=,(const Int3&), Int3&), asCALL_THISCALL) < 0) {
918  }
919 
920  if(engine->RegisterObjectMethod("Int3", "Int3 opAdd(const Int3 &in other) const",
921  asMETHODPR(Int3, operator+,(const Int3&) const, Int3), asCALL_THISCALL) < 0) {
923  }
924 
925  if(engine->RegisterObjectMethod("Int3", "Int3 opSub(const Int3 &in other) const",
926  asMETHODPR(Int3, operator-,(const Int3&) const, Int3), asCALL_THISCALL) < 0) {
928  }
929 
930  if(engine->RegisterObjectMethod("Int3", "Int3 opMul(int multiply) const",
931  asMETHODPR(Int3, operator*,(int) const, Int3), asCALL_THISCALL) < 0) {
933  }
934 
935  // Direct access
936  if(engine->RegisterObjectProperty("Int3", "int X", asOFFSET(Int3, X)) < 0) {
937 
939  }
940 
941  if(engine->RegisterObjectProperty("Int3", "int Y", asOFFSET(Int3, Y)) < 0) {
942 
944  }
945 
946  if(engine->RegisterObjectProperty("Int3", "int Z", asOFFSET(Int3, Z)) < 0) {
947 
949  }
950 
951  return true;
952 }
953 // ------------------------------------ //
954 bool BindRadian(asIScriptEngine* engine)
955 {
956  if(engine->RegisterObjectType("Radian", sizeof(Radian),
957  asOBJ_VALUE | asGetTypeTraits<Radian>() | asOBJ_APP_CLASS_ALLFLOATS) < 0) {
959  }
960  if(engine->RegisterObjectBehaviour("Radian", asBEHAVE_CONSTRUCT, "void f()",
961  asFUNCTION(RadianConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
963  }
964 
965  if(engine->RegisterObjectBehaviour("Radian", asBEHAVE_CONSTRUCT, "void f(float radians)",
966  asFUNCTION(RadianConstructorValueProxy), asCALL_CDECL_OBJFIRST) < 0) {
968  }
969 
970  if(engine->RegisterObjectBehaviour("Radian", asBEHAVE_CONSTRUCT,
971  "void f(const Radian &in other)", asFUNCTION(RadianConstructorCopyProxy),
972  asCALL_CDECL_OBJFIRST) < 0) {
974  }
975 
976  if(engine->RegisterObjectBehaviour("Radian", asBEHAVE_DESTRUCT, "void f()",
977  asFUNCTION(RadianDestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
979  }
980 
981  if(engine->RegisterObjectMethod("Radian", "Radian& opAssign(const Radian &in other)",
982  asMETHODPR(Radian, operator=,(const Radian&), Radian&), asCALL_THISCALL) < 0) {
984  }
985 
986  if(engine->RegisterObjectMethod("Radian", "float ValueInRadians() const",
987  asMETHOD(Radian, ValueInRadians), asCALL_THISCALL) < 0) {
989  }
990 
991  if(engine->RegisterObjectMethod("Radian", "float ValueInDegrees() const",
992  asMETHOD(Radian, ValueInDegrees), asCALL_THISCALL) < 0) {
994  }
995 
996  return true;
997 }
998 
999 bool BindDegree(asIScriptEngine* engine)
1000 {
1001  if(engine->RegisterObjectType("Degree", sizeof(Degree),
1002  asOBJ_VALUE | asGetTypeTraits<Degree>() | asOBJ_APP_CLASS_ALLFLOATS) < 0) {
1004  }
1005  if(engine->RegisterObjectBehaviour("Degree", asBEHAVE_CONSTRUCT, "void f()",
1006  asFUNCTION(DegreeConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
1008  }
1009 
1010  if(engine->RegisterObjectBehaviour("Degree", asBEHAVE_CONSTRUCT, "void f(float degrees)",
1011  asFUNCTION(DegreeConstructorValueProxy), asCALL_CDECL_OBJFIRST) < 0) {
1013  }
1014 
1015  if(engine->RegisterObjectBehaviour("Degree", asBEHAVE_CONSTRUCT,
1016  "void f(const Degree &in other)", asFUNCTION(DegreeConstructorCopyProxy),
1017  asCALL_CDECL_OBJFIRST) < 0) {
1019  }
1020 
1021  if(engine->RegisterObjectBehaviour("Degree", asBEHAVE_DESTRUCT, "void f()",
1022  asFUNCTION(DegreeDestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
1024  }
1025 
1026  if(engine->RegisterObjectMethod("Degree", "Degree& opAssign(const Degree &in other)",
1027  asMETHODPR(Degree, operator=,(const Degree&), Degree&), asCALL_THISCALL) < 0) {
1029  }
1030 
1031  if(engine->RegisterObjectMethod("Degree", "float ValueInRadians() const",
1032  asMETHOD(Degree, ValueInRadians), asCALL_THISCALL) < 0) {
1034  }
1035 
1036  if(engine->RegisterObjectMethod("Degree", "float ValueInDegrees() const",
1037  asMETHOD(Degree, ValueInDegrees), asCALL_THISCALL) < 0) {
1039  }
1040 
1041  // ------------------------------------ //
1042  // Bind things needing both degree and radian
1043  if(engine->RegisterObjectBehaviour("Radian", asBEHAVE_CONSTRUCT,
1044  "void f(const Degree &in degrees)", asFUNCTION(RadianConstructorDegreeProxy),
1045  asCALL_CDECL_OBJFIRST) < 0) {
1047  }
1048 
1049  if(engine->RegisterObjectBehaviour("Degree", asBEHAVE_CONSTRUCT,
1050  "void f(const Degree &in degrees)", asFUNCTION(DegreeConstructorRadianProxy),
1051  asCALL_CDECL_OBJFIRST) < 0) {
1053  }
1054 
1055  if(engine->RegisterObjectMethod("Radian", "Radian& opAssign(const Degree &in degrees)",
1056  asMETHODPR(Radian, operator=,(const Degree&), Radian&), asCALL_THISCALL) < 0) {
1058  }
1059 
1060  if(engine->RegisterObjectMethod("Degree", "Degree& opAssign(const Radian &in radians)",
1061  asMETHODPR(Degree, operator=,(const Radian&), Degree&), asCALL_THISCALL) < 0) {
1063  }
1064 
1065 
1066  if(engine->RegisterObjectMethod("Degree", "Radian opImplCast() const",
1067  asMETHODPR(Degree, operator Radian,() const, Radian), asCALL_THISCALL) < 0) {
1069  }
1070 
1071  if(engine->RegisterObjectMethod("Radian", "Degree opImplCast() const",
1072  asMETHODPR(Radian, operator Degree,() const, Degree), asCALL_THISCALL) < 0) {
1074  }
1075 
1076  return true;
1077 }
1078 // ------------------------------------ //
1079 bool BindMatrix4(asIScriptEngine* engine)
1080 {
1081  if(engine->RegisterObjectType("Matrix4", sizeof(Matrix4),
1082  asOBJ_VALUE | asGetTypeTraits<Matrix4>() | asOBJ_APP_CLASS_ALLFLOATS) < 0) {
1084  }
1085  if(engine->RegisterObjectBehaviour("Matrix4", asBEHAVE_CONSTRUCT, "void f()",
1086  asFUNCTION(Matrix4ConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
1088  }
1089  if(engine->RegisterObjectBehaviour("Matrix4", asBEHAVE_DESTRUCT, "void f()",
1090  asFUNCTION(Matrix4DestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
1092  }
1093 
1094  return true;
1095 }
1096 // ------------------------------------ //
1097 bool BindRay(asIScriptEngine* engine)
1098 {
1099  if(engine->RegisterObjectType("Ray", sizeof(Ray),
1100  asOBJ_VALUE | asGetTypeTraits<Ray>() | asOBJ_APP_CLASS_ALLFLOATS) < 0) {
1102  }
1103  if(engine->RegisterObjectBehaviour("Ray", asBEHAVE_CONSTRUCT, "void f()",
1104  asFUNCTION(RayConstructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
1106  }
1107  if(engine->RegisterObjectBehaviour("Ray", asBEHAVE_DESTRUCT, "void f()",
1108  asFUNCTION(RayDestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
1110  }
1111 
1112  return true;
1113 }
1114 // ------------------------------------ //
1115 bool BindPlane(asIScriptEngine* engine)
1116 {
1117  if(engine->RegisterObjectType("Plane", sizeof(Plane),
1118  asOBJ_VALUE | asGetTypeTraits<Plane>() | asOBJ_APP_CLASS_ALLFLOATS) < 0) {
1120  }
1121  if(engine->RegisterObjectBehaviour("Plane", asBEHAVE_CONSTRUCT,
1122  "void f(const Float3 &in normal, float distance)",
1123  asFUNCTION(PlaneConstructorVectorProxy), asCALL_CDECL_OBJFIRST) < 0) {
1125  }
1126  if(engine->RegisterObjectBehaviour("Plane", asBEHAVE_DESTRUCT, "void f()",
1127  asFUNCTION(PlaneDestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
1129  }
1130 
1131  return true;
1132 }
1133 // ------------------------------------ //
1134 bool BindTypeDefs(asIScriptEngine* engine)
1135 {
1136  if(engine->RegisterTypedef("ObjectID", "int32") < 0) {
1137 
1139  }
1140 
1141  if(engine->RegisterGlobalProperty("const ObjectID NULL_OBJECT", &NULL_OBJECT_WRAPPER) <
1142  0) {
1144  }
1145 
1146  return true;
1147 }
1148 } // namespace Leviathan
1149 
1150 // ------------------------------------ //
1151 // Main bind function
1152 bool Leviathan::BindTypes(asIScriptEngine* engine)
1153 {
1154  if(!BindInt2(engine))
1155  return false;
1156 
1157  if(!BindInt3(engine))
1158  return false;
1159 
1160  if(!BindRadian(engine))
1161  return false;
1162 
1163  if(!BindDegree(engine))
1164  return false;
1165 
1166  // Register common float types //
1167  if(!BindFloat2(engine))
1168  return false;
1169 
1170  if(!BindFloat3(engine))
1171  return false;
1172 
1173  if(!BindFloat4(engine))
1174  return false;
1175 
1176  if(!BindQuaternion(engine))
1177  return false;
1178 
1179  if(!BindMatrix4(engine))
1180  return false;
1181 
1182  if(!BindRay(engine))
1183  return false;
1184 
1185  if(!BindPlane(engine))
1186  return false;
1187 
1188  if(!BindTypeDefs(engine))
1189  return false;
1190 
1191  return true;
1192 }
void QuaternionConstructorAxisProxy(void *memory, const Float3 &axis, Radian angle)
Definition: TypesBind.cpp:119
void Float3ConstructorProxy(void *memory)
Definition: TypesBind.cpp:47
bool BindMatrix4(asIScriptEngine *engine)
Definition: TypesBind.cpp:1079
void DegreeConstructorProxy(void *memory)
Definition: TypesBind.cpp:218
static Quaternion LookAt(const Float3 &sourcepoint, const Float3 &target)
Definition: Quaternion.h:292
void RayConstructorProxy(void *memory)
Definition: TypesBind.cpp:257
void RadianConstructorValueProxy(void *memory, float value)
Definition: TypesBind.cpp:197
void RadianConstructorProxy(void *memory)
Definition: TypesBind.cpp:192
static DLLEXPORT const Float3 UnitVUp
Definition: Types.h:1334
constexpr ObjectID NULL_OBJECT
Definition: EntityCommon.h:14
int32_t ObjectID
Definition: EntityCommon.h:11
Ray starting from an origin with a direction.
Definition: Ray.h:14
bool BindQuaternion(asIScriptEngine *engine)
Definition: TypesBind.cpp:650
ObjectID NULL_OBJECT_WRAPPER
Definition: TypesBind.cpp:16
void DegreeConstructorRadianProxy(void *memory, const Radian &radians)
Definition: TypesBind.cpp:233
void QuaternionDestructorProxy(void *memory)
Definition: TypesBind.cpp:129
static DLLEXPORT Float4 FromHSB(float hue, float saturation, float brightness)
Definition: Types.cpp:83
void Int2DestructorProxy(void *memory)
Definition: TypesBind.cpp:160
void Float3ConstructorProxyFromInt3(void *memory, const Int3 &values)
Definition: TypesBind.cpp:67
void QuaternionConstructorFloat4Proxy(void *memory, const Float4 &obj)
Definition: TypesBind.cpp:124
void RadianConstructorDegreeProxy(void *memory, const Degree &degrees)
Definition: TypesBind.cpp:207
bool BindRay(asIScriptEngine *engine)
Definition: TypesBind.cpp:1097
bool BindInt3(asIScriptEngine *engine)
Definition: TypesBind.cpp:886
void Float4ConstructorProxyAll(void *memory, float x, float y, float z, float w)
Definition: TypesBind.cpp:83
void Matrix4DestructorProxy(void *memory)
Definition: TypesBind.cpp:250
void PlaneConstructorVectorProxy(void *memory, const Float3 &normal, float distance)
Definition: TypesBind.cpp:269
void Float2ConstructorProxyAll(void *memory, float x, float y)
Definition: TypesBind.cpp:26
void Float4ConstructorProxyCopy(void *memory, const Float4 &other)
Definition: TypesBind.cpp:93
void Float2ConstructorProxy(void *memory)
Definition: TypesBind.cpp:21
void Float3ConstructorProxyAll(void *memory, float x, float y, float z)
Definition: TypesBind.cpp:52
void DegreeConstructorValueProxy(void *memory, float value)
Definition: TypesBind.cpp:223
static auto UnitVUpProxy
Definition: TypesBind.cpp:279
bool BindFloat3(asIScriptEngine *engine)
Definition: TypesBind.cpp:363
void Float4ConstructorProxy(void *memory)
Definition: TypesBind.cpp:78
void Int3ConstructorProxy(void *memory)
Definition: TypesBind.cpp:166
void Float2ConstructorProxyCopy(void *memory, const Float2 &other)
Definition: TypesBind.cpp:36
bool BindDegree(asIScriptEngine *engine)
Definition: TypesBind.cpp:999
Represents an angle in radians.
Definition: Types.h:129
bool BindTypes(asIScriptEngine *engine)
Definition: TypesBind.cpp:1152
A plane represented by a normal and a distance.
Definition: Plane.h:12
void DegreeDestructorProxy(void *memory)
Definition: TypesBind.cpp:238
bool BindTypeDefs(asIScriptEngine *engine)
Definition: TypesBind.cpp:1134
void RadianConstructorCopyProxy(void *memory, const Radian &other)
Definition: TypesBind.cpp:202
void QuaternionConstructorProxy(void *memory)
Definition: TypesBind.cpp:104
void Float3DestructorProxy(void *memory)
Definition: TypesBind.cpp:72
Represents an angle in degrees.
Definition: Types.h:174
void QuaternionConstructorProxyCopy(void *memory, const Quaternion &other)
Definition: TypesBind.cpp:114
void Float3ConstructorProxySingle(void *memory, float all)
Definition: TypesBind.cpp:57
bool BindInt2(asIScriptEngine *engine)
Definition: TypesBind.cpp:817
std::iterator_traits< octet_iterator >::difference_type distance(octet_iterator first, octet_iterator last)
Definition: checked.h:198
void Int3DestructorProxy(void *memory)
Definition: TypesBind.cpp:186
void Float4ConstructorProxySingle(void *memory, float all)
Definition: TypesBind.cpp:88
void Int2ConstructorProxySingle(void *memory, int all)
Definition: TypesBind.cpp:145
void Int2ConstructorProxyAll(void *memory, int x, int y)
Definition: TypesBind.cpp:140
void Int3ConstructorProxyAll(void *memory, int x, int y, int z)
Definition: TypesBind.cpp:171
bool BindFloat4(asIScriptEngine *engine)
Definition: TypesBind.cpp:526
void RadianDestructorProxy(void *memory)
Definition: TypesBind.cpp:212
void Int3ConstructorProxySingle(void *memory, int all)
Definition: TypesBind.cpp:176
Quaternion IdentityQuaternion
Definition: TypesBind.cpp:18
A Quaternion type to make quaternion specific operations easier to access.
Definition: Quaternion.h:14
void Float3ConstructorProxyCopy(void *memory, const Float3 &other)
Definition: TypesBind.cpp:62
void PlaneDestructorProxy(void *memory)
Definition: TypesBind.cpp:274
#define ANGELSCRIPT_REGISTERFAIL
Definition: BindHelpers.h:12
void Float4DestructorProxy(void *memory)
Definition: TypesBind.cpp:98
void Int3ConstructorProxyCopy(void *memory, const Int3 &other)
Definition: TypesBind.cpp:181
void Int2ListConstructor(void *memory, int *list)
Definition: TypesBind.cpp:155
void QuaternionConstructorProxyAll(void *memory, float x, float y, float z, float w)
Definition: TypesBind.cpp:109
void Float2DestructorProxy(void *memory)
Definition: TypesBind.cpp:41
static const Quaternion IDENTITY
Definition: Quaternion.h:322
void DegreeConstructorCopyProxy(void *memory, const Degree &other)
Definition: TypesBind.cpp:228
The access mask controls which registered functions and classes a script sees.
Definition: GameModule.h:12
void RayDestructorProxy(void *memory)
Definition: TypesBind.cpp:262
bool BindFloat2(asIScriptEngine *engine)
Definition: TypesBind.cpp:285
void Int2ConstructorProxy(void *memory)
Definition: TypesBind.cpp:135
void Int2ConstructorProxyCopy(void *memory, const Int2 &other)
Definition: TypesBind.cpp:150
void Matrix4ConstructorProxy(void *memory)
Definition: TypesBind.cpp:245
bool BindPlane(asIScriptEngine *engine)
Definition: TypesBind.cpp:1115
bool BindRadian(asIScriptEngine *engine)
Definition: TypesBind.cpp:954
A 4x4 matrix type.
Definition: Matrix.h:379
void Float2ConstructorProxySingle(void *memory, float all)
Definition: TypesBind.cpp:31