bool3.gen.cs 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. //
  5. // Changes to this file may cause incorrect behavior and will be lost if
  6. // the code is regenerated.
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. using System;
  10. using System.Runtime.CompilerServices;
  11. using System.Runtime.InteropServices;
  12. using System.Diagnostics;
  13. #pragma warning disable 0660, 0661
  14. namespace Unity.Mathematics
  15. {
  16. [DebuggerTypeProxy(typeof(bool3.DebuggerProxy))]
  17. [System.Serializable]
  18. public partial struct bool3 : System.IEquatable<bool3>
  19. {
  20. [MarshalAs(UnmanagedType.U1)]
  21. public bool x;
  22. [MarshalAs(UnmanagedType.U1)]
  23. public bool y;
  24. [MarshalAs(UnmanagedType.U1)]
  25. public bool z;
  26. /// <summary>Constructs a bool3 vector from three bool values.</summary>
  27. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  28. public bool3(bool x, bool y, bool z)
  29. {
  30. this.x = x;
  31. this.y = y;
  32. this.z = z;
  33. }
  34. /// <summary>Constructs a bool3 vector from a bool value and a bool2 vector.</summary>
  35. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  36. public bool3(bool x, bool2 yz)
  37. {
  38. this.x = x;
  39. this.y = yz.x;
  40. this.z = yz.y;
  41. }
  42. /// <summary>Constructs a bool3 vector from a bool2 vector and a bool value.</summary>
  43. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  44. public bool3(bool2 xy, bool z)
  45. {
  46. this.x = xy.x;
  47. this.y = xy.y;
  48. this.z = z;
  49. }
  50. /// <summary>Constructs a bool3 vector from a bool3 vector.</summary>
  51. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  52. public bool3(bool3 xyz)
  53. {
  54. this.x = xyz.x;
  55. this.y = xyz.y;
  56. this.z = xyz.z;
  57. }
  58. /// <summary>Constructs a bool3 vector from a single bool value by assigning it to every component.</summary>
  59. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  60. public bool3(bool v)
  61. {
  62. this.x = v;
  63. this.y = v;
  64. this.z = v;
  65. }
  66. /// <summary>Implicitly converts a single bool value to a bool3 vector by assigning it to every component.</summary>
  67. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  68. public static implicit operator bool3(bool v) { return new bool3(v); }
  69. /// <summary>Returns the result of a componentwise equality operation on two bool3 vectors.</summary>
  70. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  71. public static bool3 operator == (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); }
  72. /// <summary>Returns the result of a componentwise equality operation on a bool3 vector and a bool value.</summary>
  73. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  74. public static bool3 operator == (bool3 lhs, bool rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); }
  75. /// <summary>Returns the result of a componentwise equality operation on a bool value and a bool3 vector.</summary>
  76. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  77. public static bool3 operator == (bool lhs, bool3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); }
  78. /// <summary>Returns the result of a componentwise not equal operation on two bool3 vectors.</summary>
  79. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  80. public static bool3 operator != (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); }
  81. /// <summary>Returns the result of a componentwise not equal operation on a bool3 vector and a bool value.</summary>
  82. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  83. public static bool3 operator != (bool3 lhs, bool rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); }
  84. /// <summary>Returns the result of a componentwise not equal operation on a bool value and a bool3 vector.</summary>
  85. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  86. public static bool3 operator != (bool lhs, bool3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); }
  87. /// <summary>Returns the result of a componentwise not operation on a bool3 vector.</summary>
  88. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  89. public static bool3 operator ! (bool3 val) { return new bool3 (!val.x, !val.y, !val.z); }
  90. /// <summary>Returns the result of a componentwise bitwise and operation on two bool3 vectors.</summary>
  91. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  92. public static bool3 operator & (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x & rhs.x, lhs.y & rhs.y, lhs.z & rhs.z); }
  93. /// <summary>Returns the result of a componentwise bitwise and operation on a bool3 vector and a bool value.</summary>
  94. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  95. public static bool3 operator & (bool3 lhs, bool rhs) { return new bool3 (lhs.x & rhs, lhs.y & rhs, lhs.z & rhs); }
  96. /// <summary>Returns the result of a componentwise bitwise and operation on a bool value and a bool3 vector.</summary>
  97. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  98. public static bool3 operator & (bool lhs, bool3 rhs) { return new bool3 (lhs & rhs.x, lhs & rhs.y, lhs & rhs.z); }
  99. /// <summary>Returns the result of a componentwise bitwise or operation on two bool3 vectors.</summary>
  100. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  101. public static bool3 operator | (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x | rhs.x, lhs.y | rhs.y, lhs.z | rhs.z); }
  102. /// <summary>Returns the result of a componentwise bitwise or operation on a bool3 vector and a bool value.</summary>
  103. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  104. public static bool3 operator | (bool3 lhs, bool rhs) { return new bool3 (lhs.x | rhs, lhs.y | rhs, lhs.z | rhs); }
  105. /// <summary>Returns the result of a componentwise bitwise or operation on a bool value and a bool3 vector.</summary>
  106. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  107. public static bool3 operator | (bool lhs, bool3 rhs) { return new bool3 (lhs | rhs.x, lhs | rhs.y, lhs | rhs.z); }
  108. /// <summary>Returns the result of a componentwise bitwise exclusive or operation on two bool3 vectors.</summary>
  109. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  110. public static bool3 operator ^ (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x ^ rhs.x, lhs.y ^ rhs.y, lhs.z ^ rhs.z); }
  111. /// <summary>Returns the result of a componentwise bitwise exclusive or operation on a bool3 vector and a bool value.</summary>
  112. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  113. public static bool3 operator ^ (bool3 lhs, bool rhs) { return new bool3 (lhs.x ^ rhs, lhs.y ^ rhs, lhs.z ^ rhs); }
  114. /// <summary>Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool3 vector.</summary>
  115. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  116. public static bool3 operator ^ (bool lhs, bool3 rhs) { return new bool3 (lhs ^ rhs.x, lhs ^ rhs.y, lhs ^ rhs.z); }
  117. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  118. public bool4 xxxx
  119. {
  120. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  121. get { return new bool4(x, x, x, x); }
  122. }
  123. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  124. public bool4 xxxy
  125. {
  126. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  127. get { return new bool4(x, x, x, y); }
  128. }
  129. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  130. public bool4 xxxz
  131. {
  132. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  133. get { return new bool4(x, x, x, z); }
  134. }
  135. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  136. public bool4 xxyx
  137. {
  138. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  139. get { return new bool4(x, x, y, x); }
  140. }
  141. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  142. public bool4 xxyy
  143. {
  144. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  145. get { return new bool4(x, x, y, y); }
  146. }
  147. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  148. public bool4 xxyz
  149. {
  150. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  151. get { return new bool4(x, x, y, z); }
  152. }
  153. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  154. public bool4 xxzx
  155. {
  156. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  157. get { return new bool4(x, x, z, x); }
  158. }
  159. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  160. public bool4 xxzy
  161. {
  162. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  163. get { return new bool4(x, x, z, y); }
  164. }
  165. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  166. public bool4 xxzz
  167. {
  168. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  169. get { return new bool4(x, x, z, z); }
  170. }
  171. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  172. public bool4 xyxx
  173. {
  174. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  175. get { return new bool4(x, y, x, x); }
  176. }
  177. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  178. public bool4 xyxy
  179. {
  180. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  181. get { return new bool4(x, y, x, y); }
  182. }
  183. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  184. public bool4 xyxz
  185. {
  186. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  187. get { return new bool4(x, y, x, z); }
  188. }
  189. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  190. public bool4 xyyx
  191. {
  192. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  193. get { return new bool4(x, y, y, x); }
  194. }
  195. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  196. public bool4 xyyy
  197. {
  198. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  199. get { return new bool4(x, y, y, y); }
  200. }
  201. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  202. public bool4 xyyz
  203. {
  204. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  205. get { return new bool4(x, y, y, z); }
  206. }
  207. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  208. public bool4 xyzx
  209. {
  210. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  211. get { return new bool4(x, y, z, x); }
  212. }
  213. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  214. public bool4 xyzy
  215. {
  216. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  217. get { return new bool4(x, y, z, y); }
  218. }
  219. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  220. public bool4 xyzz
  221. {
  222. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  223. get { return new bool4(x, y, z, z); }
  224. }
  225. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  226. public bool4 xzxx
  227. {
  228. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  229. get { return new bool4(x, z, x, x); }
  230. }
  231. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  232. public bool4 xzxy
  233. {
  234. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  235. get { return new bool4(x, z, x, y); }
  236. }
  237. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  238. public bool4 xzxz
  239. {
  240. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  241. get { return new bool4(x, z, x, z); }
  242. }
  243. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  244. public bool4 xzyx
  245. {
  246. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  247. get { return new bool4(x, z, y, x); }
  248. }
  249. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  250. public bool4 xzyy
  251. {
  252. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  253. get { return new bool4(x, z, y, y); }
  254. }
  255. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  256. public bool4 xzyz
  257. {
  258. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  259. get { return new bool4(x, z, y, z); }
  260. }
  261. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  262. public bool4 xzzx
  263. {
  264. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  265. get { return new bool4(x, z, z, x); }
  266. }
  267. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  268. public bool4 xzzy
  269. {
  270. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  271. get { return new bool4(x, z, z, y); }
  272. }
  273. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  274. public bool4 xzzz
  275. {
  276. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  277. get { return new bool4(x, z, z, z); }
  278. }
  279. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  280. public bool4 yxxx
  281. {
  282. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  283. get { return new bool4(y, x, x, x); }
  284. }
  285. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  286. public bool4 yxxy
  287. {
  288. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  289. get { return new bool4(y, x, x, y); }
  290. }
  291. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  292. public bool4 yxxz
  293. {
  294. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  295. get { return new bool4(y, x, x, z); }
  296. }
  297. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  298. public bool4 yxyx
  299. {
  300. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  301. get { return new bool4(y, x, y, x); }
  302. }
  303. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  304. public bool4 yxyy
  305. {
  306. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  307. get { return new bool4(y, x, y, y); }
  308. }
  309. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  310. public bool4 yxyz
  311. {
  312. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  313. get { return new bool4(y, x, y, z); }
  314. }
  315. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  316. public bool4 yxzx
  317. {
  318. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  319. get { return new bool4(y, x, z, x); }
  320. }
  321. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  322. public bool4 yxzy
  323. {
  324. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  325. get { return new bool4(y, x, z, y); }
  326. }
  327. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  328. public bool4 yxzz
  329. {
  330. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  331. get { return new bool4(y, x, z, z); }
  332. }
  333. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  334. public bool4 yyxx
  335. {
  336. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  337. get { return new bool4(y, y, x, x); }
  338. }
  339. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  340. public bool4 yyxy
  341. {
  342. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  343. get { return new bool4(y, y, x, y); }
  344. }
  345. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  346. public bool4 yyxz
  347. {
  348. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  349. get { return new bool4(y, y, x, z); }
  350. }
  351. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  352. public bool4 yyyx
  353. {
  354. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  355. get { return new bool4(y, y, y, x); }
  356. }
  357. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  358. public bool4 yyyy
  359. {
  360. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  361. get { return new bool4(y, y, y, y); }
  362. }
  363. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  364. public bool4 yyyz
  365. {
  366. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  367. get { return new bool4(y, y, y, z); }
  368. }
  369. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  370. public bool4 yyzx
  371. {
  372. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  373. get { return new bool4(y, y, z, x); }
  374. }
  375. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  376. public bool4 yyzy
  377. {
  378. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  379. get { return new bool4(y, y, z, y); }
  380. }
  381. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  382. public bool4 yyzz
  383. {
  384. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  385. get { return new bool4(y, y, z, z); }
  386. }
  387. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  388. public bool4 yzxx
  389. {
  390. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  391. get { return new bool4(y, z, x, x); }
  392. }
  393. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  394. public bool4 yzxy
  395. {
  396. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  397. get { return new bool4(y, z, x, y); }
  398. }
  399. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  400. public bool4 yzxz
  401. {
  402. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  403. get { return new bool4(y, z, x, z); }
  404. }
  405. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  406. public bool4 yzyx
  407. {
  408. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  409. get { return new bool4(y, z, y, x); }
  410. }
  411. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  412. public bool4 yzyy
  413. {
  414. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  415. get { return new bool4(y, z, y, y); }
  416. }
  417. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  418. public bool4 yzyz
  419. {
  420. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  421. get { return new bool4(y, z, y, z); }
  422. }
  423. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  424. public bool4 yzzx
  425. {
  426. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  427. get { return new bool4(y, z, z, x); }
  428. }
  429. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  430. public bool4 yzzy
  431. {
  432. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  433. get { return new bool4(y, z, z, y); }
  434. }
  435. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  436. public bool4 yzzz
  437. {
  438. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  439. get { return new bool4(y, z, z, z); }
  440. }
  441. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  442. public bool4 zxxx
  443. {
  444. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  445. get { return new bool4(z, x, x, x); }
  446. }
  447. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  448. public bool4 zxxy
  449. {
  450. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  451. get { return new bool4(z, x, x, y); }
  452. }
  453. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  454. public bool4 zxxz
  455. {
  456. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  457. get { return new bool4(z, x, x, z); }
  458. }
  459. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  460. public bool4 zxyx
  461. {
  462. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  463. get { return new bool4(z, x, y, x); }
  464. }
  465. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  466. public bool4 zxyy
  467. {
  468. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  469. get { return new bool4(z, x, y, y); }
  470. }
  471. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  472. public bool4 zxyz
  473. {
  474. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  475. get { return new bool4(z, x, y, z); }
  476. }
  477. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  478. public bool4 zxzx
  479. {
  480. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  481. get { return new bool4(z, x, z, x); }
  482. }
  483. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  484. public bool4 zxzy
  485. {
  486. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  487. get { return new bool4(z, x, z, y); }
  488. }
  489. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  490. public bool4 zxzz
  491. {
  492. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  493. get { return new bool4(z, x, z, z); }
  494. }
  495. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  496. public bool4 zyxx
  497. {
  498. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  499. get { return new bool4(z, y, x, x); }
  500. }
  501. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  502. public bool4 zyxy
  503. {
  504. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  505. get { return new bool4(z, y, x, y); }
  506. }
  507. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  508. public bool4 zyxz
  509. {
  510. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  511. get { return new bool4(z, y, x, z); }
  512. }
  513. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  514. public bool4 zyyx
  515. {
  516. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  517. get { return new bool4(z, y, y, x); }
  518. }
  519. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  520. public bool4 zyyy
  521. {
  522. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  523. get { return new bool4(z, y, y, y); }
  524. }
  525. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  526. public bool4 zyyz
  527. {
  528. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  529. get { return new bool4(z, y, y, z); }
  530. }
  531. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  532. public bool4 zyzx
  533. {
  534. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  535. get { return new bool4(z, y, z, x); }
  536. }
  537. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  538. public bool4 zyzy
  539. {
  540. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  541. get { return new bool4(z, y, z, y); }
  542. }
  543. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  544. public bool4 zyzz
  545. {
  546. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  547. get { return new bool4(z, y, z, z); }
  548. }
  549. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  550. public bool4 zzxx
  551. {
  552. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  553. get { return new bool4(z, z, x, x); }
  554. }
  555. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  556. public bool4 zzxy
  557. {
  558. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  559. get { return new bool4(z, z, x, y); }
  560. }
  561. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  562. public bool4 zzxz
  563. {
  564. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  565. get { return new bool4(z, z, x, z); }
  566. }
  567. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  568. public bool4 zzyx
  569. {
  570. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  571. get { return new bool4(z, z, y, x); }
  572. }
  573. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  574. public bool4 zzyy
  575. {
  576. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  577. get { return new bool4(z, z, y, y); }
  578. }
  579. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  580. public bool4 zzyz
  581. {
  582. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  583. get { return new bool4(z, z, y, z); }
  584. }
  585. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  586. public bool4 zzzx
  587. {
  588. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  589. get { return new bool4(z, z, z, x); }
  590. }
  591. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  592. public bool4 zzzy
  593. {
  594. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  595. get { return new bool4(z, z, z, y); }
  596. }
  597. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  598. public bool4 zzzz
  599. {
  600. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  601. get { return new bool4(z, z, z, z); }
  602. }
  603. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  604. public bool3 xxx
  605. {
  606. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  607. get { return new bool3(x, x, x); }
  608. }
  609. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  610. public bool3 xxy
  611. {
  612. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  613. get { return new bool3(x, x, y); }
  614. }
  615. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  616. public bool3 xxz
  617. {
  618. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  619. get { return new bool3(x, x, z); }
  620. }
  621. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  622. public bool3 xyx
  623. {
  624. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  625. get { return new bool3(x, y, x); }
  626. }
  627. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  628. public bool3 xyy
  629. {
  630. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  631. get { return new bool3(x, y, y); }
  632. }
  633. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  634. public bool3 xyz
  635. {
  636. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  637. get { return new bool3(x, y, z); }
  638. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  639. set { x = value.x; y = value.y; z = value.z; }
  640. }
  641. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  642. public bool3 xzx
  643. {
  644. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  645. get { return new bool3(x, z, x); }
  646. }
  647. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  648. public bool3 xzy
  649. {
  650. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  651. get { return new bool3(x, z, y); }
  652. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  653. set { x = value.x; z = value.y; y = value.z; }
  654. }
  655. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  656. public bool3 xzz
  657. {
  658. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  659. get { return new bool3(x, z, z); }
  660. }
  661. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  662. public bool3 yxx
  663. {
  664. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  665. get { return new bool3(y, x, x); }
  666. }
  667. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  668. public bool3 yxy
  669. {
  670. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  671. get { return new bool3(y, x, y); }
  672. }
  673. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  674. public bool3 yxz
  675. {
  676. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  677. get { return new bool3(y, x, z); }
  678. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  679. set { y = value.x; x = value.y; z = value.z; }
  680. }
  681. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  682. public bool3 yyx
  683. {
  684. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  685. get { return new bool3(y, y, x); }
  686. }
  687. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  688. public bool3 yyy
  689. {
  690. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  691. get { return new bool3(y, y, y); }
  692. }
  693. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  694. public bool3 yyz
  695. {
  696. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  697. get { return new bool3(y, y, z); }
  698. }
  699. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  700. public bool3 yzx
  701. {
  702. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  703. get { return new bool3(y, z, x); }
  704. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  705. set { y = value.x; z = value.y; x = value.z; }
  706. }
  707. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  708. public bool3 yzy
  709. {
  710. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  711. get { return new bool3(y, z, y); }
  712. }
  713. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  714. public bool3 yzz
  715. {
  716. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  717. get { return new bool3(y, z, z); }
  718. }
  719. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  720. public bool3 zxx
  721. {
  722. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  723. get { return new bool3(z, x, x); }
  724. }
  725. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  726. public bool3 zxy
  727. {
  728. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  729. get { return new bool3(z, x, y); }
  730. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  731. set { z = value.x; x = value.y; y = value.z; }
  732. }
  733. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  734. public bool3 zxz
  735. {
  736. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  737. get { return new bool3(z, x, z); }
  738. }
  739. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  740. public bool3 zyx
  741. {
  742. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  743. get { return new bool3(z, y, x); }
  744. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  745. set { z = value.x; y = value.y; x = value.z; }
  746. }
  747. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  748. public bool3 zyy
  749. {
  750. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  751. get { return new bool3(z, y, y); }
  752. }
  753. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  754. public bool3 zyz
  755. {
  756. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  757. get { return new bool3(z, y, z); }
  758. }
  759. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  760. public bool3 zzx
  761. {
  762. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  763. get { return new bool3(z, z, x); }
  764. }
  765. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  766. public bool3 zzy
  767. {
  768. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  769. get { return new bool3(z, z, y); }
  770. }
  771. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  772. public bool3 zzz
  773. {
  774. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  775. get { return new bool3(z, z, z); }
  776. }
  777. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  778. public bool2 xx
  779. {
  780. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  781. get { return new bool2(x, x); }
  782. }
  783. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  784. public bool2 xy
  785. {
  786. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  787. get { return new bool2(x, y); }
  788. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  789. set { x = value.x; y = value.y; }
  790. }
  791. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  792. public bool2 xz
  793. {
  794. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  795. get { return new bool2(x, z); }
  796. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  797. set { x = value.x; z = value.y; }
  798. }
  799. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  800. public bool2 yx
  801. {
  802. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  803. get { return new bool2(y, x); }
  804. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  805. set { y = value.x; x = value.y; }
  806. }
  807. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  808. public bool2 yy
  809. {
  810. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  811. get { return new bool2(y, y); }
  812. }
  813. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  814. public bool2 yz
  815. {
  816. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  817. get { return new bool2(y, z); }
  818. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  819. set { y = value.x; z = value.y; }
  820. }
  821. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  822. public bool2 zx
  823. {
  824. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  825. get { return new bool2(z, x); }
  826. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  827. set { z = value.x; x = value.y; }
  828. }
  829. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  830. public bool2 zy
  831. {
  832. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  833. get { return new bool2(z, y); }
  834. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  835. set { z = value.x; y = value.y; }
  836. }
  837. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  838. public bool2 zz
  839. {
  840. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  841. get { return new bool2(z, z); }
  842. }
  843. /// <summary>Returns the bool element at a specified index.</summary>
  844. unsafe public bool this[int index]
  845. {
  846. get
  847. {
  848. #if ENABLE_UNITY_COLLECTIONS_CHECKS
  849. if ((uint)index >= 3)
  850. throw new System.ArgumentException("index must be between[0...2]");
  851. #endif
  852. fixed (bool3* array = &this) { return ((bool*)array)[index]; }
  853. }
  854. set
  855. {
  856. #if ENABLE_UNITY_COLLECTIONS_CHECKS
  857. if ((uint)index >= 3)
  858. throw new System.ArgumentException("index must be between[0...2]");
  859. #endif
  860. fixed (bool* array = &x) { array[index] = value; }
  861. }
  862. }
  863. /// <summary>Returns true if the bool3 is equal to a given bool3, false otherwise.</summary>
  864. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  865. public bool Equals(bool3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; }
  866. /// <summary>Returns true if the bool3 is equal to a given bool3, false otherwise.</summary>
  867. public override bool Equals(object o) { return Equals((bool3)o); }
  868. /// <summary>Returns a hash code for the bool3.</summary>
  869. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  870. public override int GetHashCode() { return (int)math.hash(this); }
  871. /// <summary>Returns a string representation of the bool3.</summary>
  872. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  873. public override string ToString()
  874. {
  875. return string.Format("bool3({0}, {1}, {2})", x, y, z);
  876. }
  877. internal sealed class DebuggerProxy
  878. {
  879. public bool x;
  880. public bool y;
  881. public bool z;
  882. public DebuggerProxy(bool3 v)
  883. {
  884. x = v.x;
  885. y = v.y;
  886. z = v.z;
  887. }
  888. }
  889. }
  890. public static partial class math
  891. {
  892. /// <summary>Returns a bool3 vector constructed from three bool values.</summary>
  893. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  894. public static bool3 bool3(bool x, bool y, bool z) { return new bool3(x, y, z); }
  895. /// <summary>Returns a bool3 vector constructed from a bool value and a bool2 vector.</summary>
  896. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  897. public static bool3 bool3(bool x, bool2 yz) { return new bool3(x, yz); }
  898. /// <summary>Returns a bool3 vector constructed from a bool2 vector and a bool value.</summary>
  899. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  900. public static bool3 bool3(bool2 xy, bool z) { return new bool3(xy, z); }
  901. /// <summary>Returns a bool3 vector constructed from a bool3 vector.</summary>
  902. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  903. public static bool3 bool3(bool3 xyz) { return new bool3(xyz); }
  904. /// <summary>Returns a bool3 vector constructed from a single bool value by assigning it to every component.</summary>
  905. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  906. public static bool3 bool3(bool v) { return new bool3(v); }
  907. /// <summary>Returns a uint hash code of a bool3 vector.</summary>
  908. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  909. public static uint hash(bool3 v)
  910. {
  911. return csum(select(uint3(0xA1E92D39u, 0x4583C801u, 0x9536A0F5u), uint3(0xAF816615u, 0x9AF8D62Du, 0xE3600729u), v));
  912. }
  913. /// <summary>
  914. /// Returns a uint3 vector hash code of a bool3 vector.
  915. /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash
  916. /// that are only reduced to a narrow uint hash at the very end instead of at every step.
  917. /// </summary>
  918. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  919. public static uint3 hashwide(bool3 v)
  920. {
  921. return (select(uint3(0x5F17300Du, 0x670D6809u, 0x7AF32C49u), uint3(0xAE131389u, 0x5D1B165Bu, 0x87096CD7u), v));
  922. }
  923. /// <summary>Returns the result of specified shuffling of the components from two bool3 vectors into a bool value.</summary>
  924. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  925. public static bool shuffle(bool3 a, bool3 b, ShuffleComponent x)
  926. {
  927. return select_shuffle_component(a, b, x);
  928. }
  929. /// <summary>Returns the result of specified shuffling of the components from two bool3 vectors into a bool2 vector.</summary>
  930. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  931. public static bool2 shuffle(bool3 a, bool3 b, ShuffleComponent x, ShuffleComponent y)
  932. {
  933. return bool2(
  934. select_shuffle_component(a, b, x),
  935. select_shuffle_component(a, b, y));
  936. }
  937. /// <summary>Returns the result of specified shuffling of the components from two bool3 vectors into a bool3 vector.</summary>
  938. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  939. public static bool3 shuffle(bool3 a, bool3 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z)
  940. {
  941. return bool3(
  942. select_shuffle_component(a, b, x),
  943. select_shuffle_component(a, b, y),
  944. select_shuffle_component(a, b, z));
  945. }
  946. /// <summary>Returns the result of specified shuffling of the components from two bool3 vectors into a bool4 vector.</summary>
  947. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  948. public static bool4 shuffle(bool3 a, bool3 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w)
  949. {
  950. return bool4(
  951. select_shuffle_component(a, b, x),
  952. select_shuffle_component(a, b, y),
  953. select_shuffle_component(a, b, z),
  954. select_shuffle_component(a, b, w));
  955. }
  956. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  957. internal static bool select_shuffle_component(bool3 a, bool3 b, ShuffleComponent component)
  958. {
  959. switch(component)
  960. {
  961. case ShuffleComponent.LeftX:
  962. return a.x;
  963. case ShuffleComponent.LeftY:
  964. return a.y;
  965. case ShuffleComponent.LeftZ:
  966. return a.z;
  967. case ShuffleComponent.RightX:
  968. return b.x;
  969. case ShuffleComponent.RightY:
  970. return b.y;
  971. case ShuffleComponent.RightZ:
  972. return b.z;
  973. default:
  974. throw new System.ArgumentException("Invalid shuffle component: " + component);
  975. }
  976. }
  977. }
  978. }