mirror of
https://github.com/GTNewHorizons/lwjgl3ify.git
synced 2026-11-28 07:56:06 +00:00
[ci skip] Update the spotless config
This commit is contained in:
1 parent
8a0d12a428
commit
16fae70244
180 files changed
+4552
-4781
No files matched your search
@@ -147,29 +147,29 @@ public class BufferChecks {
|
||||
*/
|
||||
private static void throwBufferSizeException(Buffer buf, int size) {
|
||||
throw new IllegalArgumentException(
|
||||
"Number of remaining buffer elements is " + buf.remaining()
|
||||
+ ", must be at least "
|
||||
+ size
|
||||
+ ". Because at most "
|
||||
+ size
|
||||
+ " elements can be returned, a buffer with at least "
|
||||
+ size
|
||||
+ " elements is required, regardless of actual returned element count");
|
||||
"Number of remaining buffer elements is " + buf.remaining()
|
||||
+ ", must be at least "
|
||||
+ size
|
||||
+ ". Because at most "
|
||||
+ size
|
||||
+ " elements can be returned, a buffer with at least "
|
||||
+ size
|
||||
+ " elements is required, regardless of actual returned element count");
|
||||
}
|
||||
|
||||
private static void throwBufferSizeException(PointerBuffer buf, int size) {
|
||||
throw new IllegalArgumentException(
|
||||
"Number of remaining pointer buffer elements is " + buf.remaining() + ", must be at least " + size);
|
||||
"Number of remaining pointer buffer elements is " + buf.remaining() + ", must be at least " + size);
|
||||
}
|
||||
|
||||
private static void throwArraySizeException(Object[] array, int size) {
|
||||
throw new IllegalArgumentException(
|
||||
"Number of array elements is " + array.length + ", must be at least " + size);
|
||||
"Number of array elements is " + array.length + ", must be at least " + size);
|
||||
}
|
||||
|
||||
private static void throwArraySizeException(long[] array, int size) {
|
||||
throw new IllegalArgumentException(
|
||||
"Number of array elements is " + array.length + ", must be at least " + size);
|
||||
"Number of array elements is " + array.length + ", must be at least " + size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,7 +40,8 @@ public final class BufferUtils {
|
||||
* @return a ByteBuffer
|
||||
*/
|
||||
public static ByteBuffer createByteBuffer(int size) {
|
||||
return ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder());
|
||||
return ByteBuffer.allocateDirect(size)
|
||||
.order(ByteOrder.nativeOrder());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,198 +52,198 @@ public class LWJGLUtil {
|
||||
public static final String PLATFORM_WINDOWS_NAME = "windows";
|
||||
|
||||
private static final String LWJGL_ICON_DATA_16x16 = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\376\377\377\377\302\327\350\377"
|
||||
+ "\164\244\313\377\120\213\275\377\124\216\277\377\206\257\322\377"
|
||||
+ "\347\357\366\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\365\365\365\377\215\217\221\377\166\202\215\377"
|
||||
+ "\175\215\233\377\204\231\252\377\224\267\325\377\072\175\265\377"
|
||||
+ "\110\206\272\377\332\347\361\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\364\370\373\377\234\236\240\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\344\344\344\377\204\255\320\377"
|
||||
+ "\072\175\265\377\133\222\301\377\374\375\376\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\221\266\325\377\137\137\137\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\042\042\042\377\377\377\377\377\350\360\366\377"
|
||||
+ "\071\174\265\377\072\175\265\377\304\330\351\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\306\331\351\377"
|
||||
+ "\201\253\316\377\035\035\035\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\146\146\146\377\377\377\377\377\320\340\355\377"
|
||||
+ "\072\175\265\377\072\175\265\377\215\264\324\377\377\377\377\377"
|
||||
+ "\362\362\362\377\245\245\245\377\337\337\337\377\242\301\334\377"
|
||||
+ "\260\305\326\377\012\012\012\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\250\250\250\377\377\377\377\377\227\272\330\377"
|
||||
+ "\072\175\265\377\072\175\265\377\161\241\312\377\377\377\377\377"
|
||||
+ "\241\241\241\377\000\000\000\377\001\001\001\377\043\043\043\377"
|
||||
+ "\314\314\314\377\320\320\320\377\245\245\245\377\204\204\204\377"
|
||||
+ "\134\134\134\377\357\357\357\377\377\377\377\377\140\226\303\377"
|
||||
+ "\072\175\265\377\072\175\265\377\155\236\310\377\377\377\377\377"
|
||||
+ "\136\136\136\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\317\317\317\377\037\037\037\377\003\003\003\377\053\053\053\377"
|
||||
+ "\154\154\154\377\306\306\306\377\372\374\375\377\236\277\332\377"
|
||||
+ "\167\245\314\377\114\211\274\377\174\250\316\377\377\377\377\377"
|
||||
+ "\033\033\033\377\000\000\000\377\000\000\000\377\027\027\027\377"
|
||||
+ "\326\326\326\377\001\001\001\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\122\122\122\377\345\345\345\377\075\075\075\377"
|
||||
+ "\150\150\150\377\246\246\247\377\332\336\341\377\377\377\377\377"
|
||||
+ "\164\164\164\377\016\016\016\377\000\000\000\377\131\131\131\377"
|
||||
+ "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\221\221\221\377\233\233\233\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\002\002\002\377\103\103\103\377"
|
||||
+ "\377\377\377\377\356\356\356\377\214\214\214\377\277\277\277\377"
|
||||
+ "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\323\323\323\377\130\130\130\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\063\063\063\377"
|
||||
+ "\377\377\377\377\377\377\377\377\374\375\376\377\377\377\377\377"
|
||||
+ "\300\300\300\377\100\100\100\377\002\002\002\377\000\000\000\377"
|
||||
+ "\033\033\033\377\373\373\373\377\027\027\027\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\170\170\170\377"
|
||||
+ "\377\377\377\377\377\377\377\377\322\341\356\377\176\251\316\377"
|
||||
+ "\340\352\363\377\377\377\377\377\324\324\324\377\155\155\155\377"
|
||||
+ "\204\204\204\377\323\323\323\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\275\275\275\377"
|
||||
+ "\377\377\377\377\377\377\377\377\376\376\376\377\146\232\305\377"
|
||||
+ "\075\177\266\377\202\254\320\377\344\355\365\377\377\377\377\377"
|
||||
+ "\377\377\377\377\345\345\345\377\055\055\055\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\014\014\014\377\366\366\366\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377"
|
||||
+ "\115\211\274\377\072\175\265\377\076\200\266\377\207\260\322\377"
|
||||
+ "\347\357\366\377\377\377\377\377\376\376\376\377\274\274\274\377"
|
||||
+ "\117\117\117\377\003\003\003\377\112\112\112\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\353\362\370\377\214\263\324\377\126\220\300\377\120\214\275\377"
|
||||
+ "\167\245\314\377\355\363\370\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\337\337\337\377\346\346\346\377\377\377\377\377";
|
||||
+ "\377\377\377\377\377\377\377\377\376\377\377\377\302\327\350\377"
|
||||
+ "\164\244\313\377\120\213\275\377\124\216\277\377\206\257\322\377"
|
||||
+ "\347\357\366\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\365\365\365\377\215\217\221\377\166\202\215\377"
|
||||
+ "\175\215\233\377\204\231\252\377\224\267\325\377\072\175\265\377"
|
||||
+ "\110\206\272\377\332\347\361\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\364\370\373\377\234\236\240\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\344\344\344\377\204\255\320\377"
|
||||
+ "\072\175\265\377\133\222\301\377\374\375\376\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\221\266\325\377\137\137\137\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\042\042\042\377\377\377\377\377\350\360\366\377"
|
||||
+ "\071\174\265\377\072\175\265\377\304\330\351\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\306\331\351\377"
|
||||
+ "\201\253\316\377\035\035\035\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\146\146\146\377\377\377\377\377\320\340\355\377"
|
||||
+ "\072\175\265\377\072\175\265\377\215\264\324\377\377\377\377\377"
|
||||
+ "\362\362\362\377\245\245\245\377\337\337\337\377\242\301\334\377"
|
||||
+ "\260\305\326\377\012\012\012\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\250\250\250\377\377\377\377\377\227\272\330\377"
|
||||
+ "\072\175\265\377\072\175\265\377\161\241\312\377\377\377\377\377"
|
||||
+ "\241\241\241\377\000\000\000\377\001\001\001\377\043\043\043\377"
|
||||
+ "\314\314\314\377\320\320\320\377\245\245\245\377\204\204\204\377"
|
||||
+ "\134\134\134\377\357\357\357\377\377\377\377\377\140\226\303\377"
|
||||
+ "\072\175\265\377\072\175\265\377\155\236\310\377\377\377\377\377"
|
||||
+ "\136\136\136\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\317\317\317\377\037\037\037\377\003\003\003\377\053\053\053\377"
|
||||
+ "\154\154\154\377\306\306\306\377\372\374\375\377\236\277\332\377"
|
||||
+ "\167\245\314\377\114\211\274\377\174\250\316\377\377\377\377\377"
|
||||
+ "\033\033\033\377\000\000\000\377\000\000\000\377\027\027\027\377"
|
||||
+ "\326\326\326\377\001\001\001\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\122\122\122\377\345\345\345\377\075\075\075\377"
|
||||
+ "\150\150\150\377\246\246\247\377\332\336\341\377\377\377\377\377"
|
||||
+ "\164\164\164\377\016\016\016\377\000\000\000\377\131\131\131\377"
|
||||
+ "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\221\221\221\377\233\233\233\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\002\002\002\377\103\103\103\377"
|
||||
+ "\377\377\377\377\356\356\356\377\214\214\214\377\277\277\277\377"
|
||||
+ "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\323\323\323\377\130\130\130\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\063\063\063\377"
|
||||
+ "\377\377\377\377\377\377\377\377\374\375\376\377\377\377\377\377"
|
||||
+ "\300\300\300\377\100\100\100\377\002\002\002\377\000\000\000\377"
|
||||
+ "\033\033\033\377\373\373\373\377\027\027\027\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\170\170\170\377"
|
||||
+ "\377\377\377\377\377\377\377\377\322\341\356\377\176\251\316\377"
|
||||
+ "\340\352\363\377\377\377\377\377\324\324\324\377\155\155\155\377"
|
||||
+ "\204\204\204\377\323\323\323\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\275\275\275\377"
|
||||
+ "\377\377\377\377\377\377\377\377\376\376\376\377\146\232\305\377"
|
||||
+ "\075\177\266\377\202\254\320\377\344\355\365\377\377\377\377\377"
|
||||
+ "\377\377\377\377\345\345\345\377\055\055\055\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\014\014\014\377\366\366\366\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377"
|
||||
+ "\115\211\274\377\072\175\265\377\076\200\266\377\207\260\322\377"
|
||||
+ "\347\357\366\377\377\377\377\377\376\376\376\377\274\274\274\377"
|
||||
+ "\117\117\117\377\003\003\003\377\112\112\112\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\353\362\370\377\214\263\324\377\126\220\300\377\120\214\275\377"
|
||||
+ "\167\245\314\377\355\363\370\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\337\337\337\377\346\346\346\377\377\377\377\377";
|
||||
|
||||
private static final String LWJGL_ICON_DATA_32x32 = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377"
|
||||
+ "\313\335\354\377\223\267\326\377\157\240\311\377\134\223\302\377\140\226\303\377\172\247\315\377\254\310\340\377\355\363\370\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377\265\316\343\377\132\222\301\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\105\205\271\377"
|
||||
+ "\241\301\334\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\374\374\377\342\352\361\377\270\317\343\377\256\311\340\377"
|
||||
+ "\243\302\334\377\230\272\330\377\214\263\323\377\201\254\317\377\156\237\310\377\075\177\266\377\072\175\265\377\072\175\265\377"
|
||||
+ "\072\175\265\377\162\242\312\377\365\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\330\330\330\377\061\061\061\377\044\044\044\377\061\061\061\377\100\100\100\377"
|
||||
+ "\122\122\122\377\145\145\145\377\164\164\164\377\217\217\217\377\367\370\370\377\254\310\337\377\073\175\265\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\171\247\315\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\376\376\376\377\150\150\150\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\266\266\266\377\376\376\376\377\206\256\321\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\256\312\341\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\323\342\356\377\341\352\362\377\050\050\050\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\002\002\002\377\336\336\336\377\377\377\377\377\365\370\373\377\133\222\301\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\364\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\354\363\370\377\144\231\305\377\327\331\333\377\005\005\005\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\044\044\044\377\376\376\376\377\377\377\377\377\377\377\377\377\300\325\347\377"
|
||||
+ "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\253\310\340\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377"
|
||||
+ "\170\246\314\377\173\247\315\377\236\236\236\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\145\145\145\377\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377"
|
||||
+ "\067\173\264\377\072\175\265\377\072\175\265\377\072\175\265\377\146\232\305\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\327\350\377"
|
||||
+ "\071\175\265\377\262\314\341\377\130\130\130\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\251\251\251\377\377\377\377\377\377\377\377\377\377\377\377\377\274\322\345\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\100\201\267\377\356\364\371\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377\132\222\301\377"
|
||||
+ "\075\177\266\377\335\345\355\377\034\034\034\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\007\007\007\377\347\347\347\377\377\377\377\377\377\377\377\377\377\377\377\377\205\256\321\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\314\336\354\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\272\322\345\377\072\175\265\377"
|
||||
+ "\127\220\277\377\320\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\063\063\063\377\375\375\375\377\377\377\377\377\377\377\377\377\373\374\375\377\120\213\275\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\261\314\342\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\312\312\312\377\067\067\067\377\141\141\141\377\242\242\242\377\335\335\335\377\344\354\363\377\261\313\341\377"
|
||||
+ "\264\315\342\377\346\346\346\377\043\043\043\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\162\162\162\377\377\377\377\377\377\377\377\377\377\377\377\377\330\345\360\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\240\300\333\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\146\146\146\377\000\000\000\377\000\000\000\377\000\000\000\377\006\006\006\377\047\047\047\377\146\146\146\377"
|
||||
+ "\324\324\324\377\377\377\377\377\366\366\366\377\320\320\320\377\227\227\227\377\136\136\136\377\047\047\047\377\004\004\004\377"
|
||||
+ "\000\000\000\377\003\003\003\377\300\300\300\377\377\377\377\377\377\377\377\377\377\377\377\377\242\301\333\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\236\277\332\377\377\377\377\377\377\377\377\377"
|
||||
+ "\373\373\373\377\045\045\045\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\134\134\134\377\377\377\377\377\352\352\352\377\217\217\217\377\265\265\265\377\351\351\351\377\375\375\375\377\347\347\347\377"
|
||||
+ "\262\262\262\377\275\275\275\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\153\235\307\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\241\301\334\377\377\377\377\377\377\377\377\377"
|
||||
+ "\333\333\333\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\203\203\203\377\377\377\377\377\137\137\137\377\000\000\000\377\000\000\000\377\013\013\013\377\067\067\067\377\166\166\166\377"
|
||||
+ "\267\267\267\377\360\360\360\377\377\377\377\377\377\377\377\377\377\377\377\377\360\365\371\377\113\210\273\377\075\177\266\377"
|
||||
+ "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\262\314\342\377\377\377\377\377\377\377\377\377"
|
||||
+ "\232\232\232\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\305\305\305\377\367\367\367\377\035\035\035\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\007\007\007\377\074\074\074\377\337\337\337\377\377\377\377\377\373\374\375\377\374\375\376\377\363\367\372\377"
|
||||
+ "\314\335\353\377\236\276\332\377\162\241\311\377\114\211\273\377\072\175\265\377\311\334\353\377\377\377\377\377\377\377\377\377"
|
||||
+ "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\017\017\017\377"
|
||||
+ "\371\371\371\377\321\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\216\216\216\377\377\377\377\377\371\371\371\377\204\204\204\377\160\160\160\377"
|
||||
+ "\260\260\260\377\352\352\352\377\377\377\377\377\371\373\374\377\334\350\362\377\366\371\374\377\377\377\377\377\377\377\377\377"
|
||||
+ "\025\025\025\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\116\116\116\377"
|
||||
+ "\377\377\377\377\221\221\221\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\273\273\273\377\377\377\377\377\236\236\236\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\004\004\004\377\057\057\057\377\160\160\160\377\260\260\260\377\346\346\346\377\376\376\376\377\377\377\377\377"
|
||||
+ "\071\071\071\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\220\220\220\377"
|
||||
+ "\377\377\377\377\115\115\115\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\020\020\020\377\360\360\360\377\377\377\377\377\132\132\132\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\011\011\011\377\062\062\062\377\261\261\261\377"
|
||||
+ "\366\366\366\377\241\241\241\377\065\065\065\377\002\002\002\377\000\000\000\377\000\000\000\377\002\002\002\377\321\321\321\377"
|
||||
+ "\365\365\365\377\023\023\023\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\105\105\105\377\376\376\376\377\370\370\370\377\035\035\035\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\053\053\053\377"
|
||||
+ "\377\377\377\377\377\377\377\377\374\374\374\377\276\276\276\377\120\120\120\377\005\005\005\377\045\045\045\377\371\371\371\377"
|
||||
+ "\302\302\302\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\206\206\206\377\377\377\377\377\322\322\322\377\001\001\001\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\103\103\103\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377\334\334\334\377\340\340\340\377\377\377\377\377"
|
||||
+ "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\001\001\001\377\310\310\310\377\377\377\377\377\216\216\216\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\210\210\210\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\337\337\337\377\051\051\051\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\030\030\030\377\365\365\365\377\377\377\377\377\112\112\112\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\317\317\317\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\361\366\372\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\371\371\371\377\265\265\265\377\113\113\113\377\006\006\006\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\122\122\122\377\377\377\377\377\370\370\370\377\020\020\020\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\034\034\034\377\370\370\370\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\206\257\321\377\220\265\325\377\352\361\367\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\333\333\333\377\170\170\170\377\033\033\033\377\000\000\000\377"
|
||||
+ "\000\000\000\377\226\226\226\377\377\377\377\377\306\306\306\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\132\132\132\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\330\351\377\072\175\265\377\103\203\270\377"
|
||||
+ "\224\270\326\377\355\363\370\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\364\364\364\377\247\247\247\377"
|
||||
+ "\205\205\205\377\364\364\364\377\377\377\377\377\206\206\206\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\235\235\235\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\373\375\377\135\224\302\377\072\175\265\377"
|
||||
+ "\072\175\265\377\106\205\271\377\230\273\330\377\357\364\371\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\233\233\233\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\005\005\005\377\335\335\335\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\305\331\351\377\073\176\266\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\236\276\332\377\362\366\372\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\373\373\373\377\216\216\216\377\045\045\045\377\001\001\001\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\054\054\054\377\374\374\374\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\217\265\325\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\112\207\273\377\243\302\334\377\363\367\372\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\372\372\377\260\260\260\377\105\105\105\377"
|
||||
+ "\004\004\004\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\156\156\156\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377"
|
||||
+ "\205\257\321\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\115\211\274\377"
|
||||
+ "\250\305\336\377\366\371\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377"
|
||||
+ "\322\322\322\377\150\150\150\377\016\016\016\377\000\000\000\377\001\001\001\377\270\270\270\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\376\376\377\377\261\313\342\377\114\211\274\377\071\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377"
|
||||
+ "\072\175\265\377\115\211\274\377\277\324\347\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\354\354\354\377\223\223\223\377\233\233\233\377\375\375\375\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\363\367\372\377\265\316\343\377\201\254\320\377\145\231\305\377\141\227\304\377\154\236\310\377"
|
||||
+ "\217\265\325\377\305\331\351\377\367\372\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377";
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377"
|
||||
+ "\313\335\354\377\223\267\326\377\157\240\311\377\134\223\302\377\140\226\303\377\172\247\315\377\254\310\340\377\355\363\370\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377\265\316\343\377\132\222\301\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\105\205\271\377"
|
||||
+ "\241\301\334\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\374\374\377\342\352\361\377\270\317\343\377\256\311\340\377"
|
||||
+ "\243\302\334\377\230\272\330\377\214\263\323\377\201\254\317\377\156\237\310\377\075\177\266\377\072\175\265\377\072\175\265\377"
|
||||
+ "\072\175\265\377\162\242\312\377\365\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\330\330\330\377\061\061\061\377\044\044\044\377\061\061\061\377\100\100\100\377"
|
||||
+ "\122\122\122\377\145\145\145\377\164\164\164\377\217\217\217\377\367\370\370\377\254\310\337\377\073\175\265\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\171\247\315\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\376\376\376\377\150\150\150\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\266\266\266\377\376\376\376\377\206\256\321\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\256\312\341\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\323\342\356\377\341\352\362\377\050\050\050\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\002\002\002\377\336\336\336\377\377\377\377\377\365\370\373\377\133\222\301\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\364\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\354\363\370\377\144\231\305\377\327\331\333\377\005\005\005\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\044\044\044\377\376\376\376\377\377\377\377\377\377\377\377\377\300\325\347\377"
|
||||
+ "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\253\310\340\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377"
|
||||
+ "\170\246\314\377\173\247\315\377\236\236\236\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\145\145\145\377\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377"
|
||||
+ "\067\173\264\377\072\175\265\377\072\175\265\377\072\175\265\377\146\232\305\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\327\350\377"
|
||||
+ "\071\175\265\377\262\314\341\377\130\130\130\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\251\251\251\377\377\377\377\377\377\377\377\377\377\377\377\377\274\322\345\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\100\201\267\377\356\364\371\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377\132\222\301\377"
|
||||
+ "\075\177\266\377\335\345\355\377\034\034\034\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\007\007\007\377\347\347\347\377\377\377\377\377\377\377\377\377\377\377\377\377\205\256\321\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\314\336\354\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\272\322\345\377\072\175\265\377"
|
||||
+ "\127\220\277\377\320\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\063\063\063\377\375\375\375\377\377\377\377\377\377\377\377\377\373\374\375\377\120\213\275\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\261\314\342\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\312\312\312\377\067\067\067\377\141\141\141\377\242\242\242\377\335\335\335\377\344\354\363\377\261\313\341\377"
|
||||
+ "\264\315\342\377\346\346\346\377\043\043\043\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\162\162\162\377\377\377\377\377\377\377\377\377\377\377\377\377\330\345\360\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\240\300\333\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\146\146\146\377\000\000\000\377\000\000\000\377\000\000\000\377\006\006\006\377\047\047\047\377\146\146\146\377"
|
||||
+ "\324\324\324\377\377\377\377\377\366\366\366\377\320\320\320\377\227\227\227\377\136\136\136\377\047\047\047\377\004\004\004\377"
|
||||
+ "\000\000\000\377\003\003\003\377\300\300\300\377\377\377\377\377\377\377\377\377\377\377\377\377\242\301\333\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\236\277\332\377\377\377\377\377\377\377\377\377"
|
||||
+ "\373\373\373\377\045\045\045\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\134\134\134\377\377\377\377\377\352\352\352\377\217\217\217\377\265\265\265\377\351\351\351\377\375\375\375\377\347\347\347\377"
|
||||
+ "\262\262\262\377\275\275\275\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\153\235\307\377\072\175\265\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\241\301\334\377\377\377\377\377\377\377\377\377"
|
||||
+ "\333\333\333\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\203\203\203\377\377\377\377\377\137\137\137\377\000\000\000\377\000\000\000\377\013\013\013\377\067\067\067\377\166\166\166\377"
|
||||
+ "\267\267\267\377\360\360\360\377\377\377\377\377\377\377\377\377\377\377\377\377\360\365\371\377\113\210\273\377\075\177\266\377"
|
||||
+ "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\262\314\342\377\377\377\377\377\377\377\377\377"
|
||||
+ "\232\232\232\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\305\305\305\377\367\367\367\377\035\035\035\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\007\007\007\377\074\074\074\377\337\337\337\377\377\377\377\377\373\374\375\377\374\375\376\377\363\367\372\377"
|
||||
+ "\314\335\353\377\236\276\332\377\162\241\311\377\114\211\273\377\072\175\265\377\311\334\353\377\377\377\377\377\377\377\377\377"
|
||||
+ "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\017\017\017\377"
|
||||
+ "\371\371\371\377\321\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\216\216\216\377\377\377\377\377\371\371\371\377\204\204\204\377\160\160\160\377"
|
||||
+ "\260\260\260\377\352\352\352\377\377\377\377\377\371\373\374\377\334\350\362\377\366\371\374\377\377\377\377\377\377\377\377\377"
|
||||
+ "\025\025\025\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\116\116\116\377"
|
||||
+ "\377\377\377\377\221\221\221\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\273\273\273\377\377\377\377\377\236\236\236\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\004\004\004\377\057\057\057\377\160\160\160\377\260\260\260\377\346\346\346\377\376\376\376\377\377\377\377\377"
|
||||
+ "\071\071\071\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\220\220\220\377"
|
||||
+ "\377\377\377\377\115\115\115\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\020\020\020\377\360\360\360\377\377\377\377\377\132\132\132\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\011\011\011\377\062\062\062\377\261\261\261\377"
|
||||
+ "\366\366\366\377\241\241\241\377\065\065\065\377\002\002\002\377\000\000\000\377\000\000\000\377\002\002\002\377\321\321\321\377"
|
||||
+ "\365\365\365\377\023\023\023\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\105\105\105\377\376\376\376\377\370\370\370\377\035\035\035\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\053\053\053\377"
|
||||
+ "\377\377\377\377\377\377\377\377\374\374\374\377\276\276\276\377\120\120\120\377\005\005\005\377\045\045\045\377\371\371\371\377"
|
||||
+ "\302\302\302\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\206\206\206\377\377\377\377\377\322\322\322\377\001\001\001\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\103\103\103\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377\334\334\334\377\340\340\340\377\377\377\377\377"
|
||||
+ "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\001\001\001\377\310\310\310\377\377\377\377\377\216\216\216\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\210\210\210\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\337\337\337\377\051\051\051\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\030\030\030\377\365\365\365\377\377\377\377\377\112\112\112\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\317\317\317\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\361\366\372\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\371\371\371\377\265\265\265\377\113\113\113\377\006\006\006\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\122\122\122\377\377\377\377\377\370\370\370\377\020\020\020\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\034\034\034\377\370\370\370\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\206\257\321\377\220\265\325\377\352\361\367\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\333\333\333\377\170\170\170\377\033\033\033\377\000\000\000\377"
|
||||
+ "\000\000\000\377\226\226\226\377\377\377\377\377\306\306\306\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\132\132\132\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\330\351\377\072\175\265\377\103\203\270\377"
|
||||
+ "\224\270\326\377\355\363\370\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\364\364\364\377\247\247\247\377"
|
||||
+ "\205\205\205\377\364\364\364\377\377\377\377\377\206\206\206\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\235\235\235\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\373\375\377\135\224\302\377\072\175\265\377"
|
||||
+ "\072\175\265\377\106\205\271\377\230\273\330\377\357\364\371\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\233\233\233\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\005\005\005\377\335\335\335\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\305\331\351\377\073\176\266\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\236\276\332\377\362\366\372\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\373\373\373\377\216\216\216\377\045\045\045\377\001\001\001\377\000\000\000\377"
|
||||
+ "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\054\054\054\377\374\374\374\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\217\265\325\377"
|
||||
+ "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\112\207\273\377\243\302\334\377\363\367\372\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\372\372\377\260\260\260\377\105\105\105\377"
|
||||
+ "\004\004\004\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\156\156\156\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377"
|
||||
+ "\205\257\321\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\115\211\274\377"
|
||||
+ "\250\305\336\377\366\371\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377"
|
||||
+ "\322\322\322\377\150\150\150\377\016\016\016\377\000\000\000\377\001\001\001\377\270\270\270\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\376\376\377\377\261\313\342\377\114\211\274\377\071\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377"
|
||||
+ "\072\175\265\377\115\211\274\377\277\324\347\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\354\354\354\377\223\223\223\377\233\233\233\377\375\375\375\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\363\367\372\377\265\316\343\377\201\254\320\377\145\231\305\377\141\227\304\377\154\236\310\377"
|
||||
+ "\217\265\325\377\305\331\351\377\367\372\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||
+ "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377";
|
||||
|
||||
/** LWJGL Logo - 16 by 16 pixels */
|
||||
public static final ByteBuffer LWJGLIcon16x16 = loadIcon(LWJGL_ICON_DATA_16x16);
|
||||
@@ -336,9 +336,9 @@ public class LWJGLUtil {
|
||||
if (lwjgl_classloader_path != null) {
|
||||
log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path);
|
||||
possible_paths.add(
|
||||
lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator))
|
||||
+ File.separator
|
||||
+ platform_lib_name);
|
||||
lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator))
|
||||
+ File.separator
|
||||
+ platform_lib_name);
|
||||
}
|
||||
|
||||
// add Installer path
|
||||
@@ -433,7 +433,7 @@ public class LWJGLUtil {
|
||||
*/
|
||||
public static Integer getPrivilegedInteger(final String property_name, final int default_val) {
|
||||
return AccessController
|
||||
.doPrivileged((PrivilegedAction<Integer>) () -> Integer.getInteger(property_name, default_val));
|
||||
.doPrivileged((PrivilegedAction<Integer>) () -> Integer.getInteger(property_name, default_val));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -483,7 +483,7 @@ public class LWJGLUtil {
|
||||
* @return the token map
|
||||
*/
|
||||
public static Map<Integer, String> getClassTokens(final TokenFilter filter, final Map<Integer, String> target,
|
||||
final Class... tokenClasses) {
|
||||
final Class... tokenClasses) {
|
||||
return getClassTokens(filter, target, Arrays.asList(tokenClasses));
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ public class LWJGLUtil {
|
||||
* @return the token map
|
||||
*/
|
||||
public static Map<Integer, String> getClassTokens(final TokenFilter filter, Map<Integer, String> target,
|
||||
final Iterable<Class> tokenClasses) {
|
||||
final Iterable<Class> tokenClasses) {
|
||||
if (target == null) target = new HashMap<>();
|
||||
|
||||
final int TOKEN_MODIFIERS = Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL;
|
||||
@@ -536,7 +536,8 @@ public class LWJGLUtil {
|
||||
* @return the hex string representation
|
||||
*/
|
||||
public static String toHexString(final int value) {
|
||||
return "0x" + Integer.toHexString(value).toUpperCase();
|
||||
return "0x" + Integer.toHexString(value)
|
||||
.toUpperCase();
|
||||
}
|
||||
|
||||
/** Simple interface for Field filtering. */
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PointerBuffer extends org.lwjgl.PointerBuffer {
|
||||
}
|
||||
|
||||
protected PointerBuffer(long address, @Nullable ByteBuffer container, int mark, int position, int limit,
|
||||
int capacity) {
|
||||
int capacity) {
|
||||
super(address, container, mark, position, limit, capacity);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,9 @@ public abstract class PointerWrapperAbstract implements PointerWrapper {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getClass().getSimpleName() + " pointer (0x" + Long.toHexString(pointer).toUpperCase() + ")";
|
||||
return getClass().getSimpleName() + " pointer (0x"
|
||||
+ Long.toHexString(pointer)
|
||||
.toUpperCase()
|
||||
+ ")";
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,9 @@ public class Sys {
|
||||
}
|
||||
|
||||
public static boolean is64Bit() {
|
||||
return Platform.getArchitecture().toString().endsWith("64");
|
||||
return Platform.getArchitecture()
|
||||
.toString()
|
||||
.endsWith("64");
|
||||
}
|
||||
|
||||
public String getClipboard() {
|
||||
|
||||
@@ -61,7 +61,7 @@ public class Cursor {
|
||||
* @throws LWJGLException if the cursor could not be created for any reason
|
||||
*/
|
||||
public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays)
|
||||
throws LWJGLException {
|
||||
throws LWJGLException {
|
||||
// TODO
|
||||
cursors = null;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class Cursor {
|
||||
* Creates the actual cursor, using a platform specific class
|
||||
*/
|
||||
private static CursorElement[] createCursors(int width, int height, int xHotspot, int yHotspot, int numImages,
|
||||
IntBuffer images, IntBuffer delays) throws LWJGLException {
|
||||
IntBuffer images, IntBuffer delays) throws LWJGLException {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -191,13 +191,17 @@ public class Keyboard {
|
||||
try {
|
||||
for (Field field : fields) {
|
||||
if (Modifier.isStatic(field.getModifiers()) && Modifier.isPublic(field.getModifiers())
|
||||
&& Modifier.isFinal(field.getModifiers())
|
||||
&& field.getType().equals(int.class)
|
||||
&& field.getName().startsWith("KEY_")
|
||||
&& !field.getName().endsWith("WIN")) {
|
||||
&& Modifier.isFinal(field.getModifiers())
|
||||
&& field.getType()
|
||||
.equals(int.class)
|
||||
&& field.getName()
|
||||
.startsWith("KEY_")
|
||||
&& !field.getName()
|
||||
.endsWith("WIN")) {
|
||||
/* Don't use deprecated names */
|
||||
int key = field.getInt(null);
|
||||
String name = field.getName().substring(4);
|
||||
String name = field.getName()
|
||||
.substring(4);
|
||||
keyName[key] = name;
|
||||
keyCounter++;
|
||||
}
|
||||
@@ -219,12 +223,12 @@ public class Keyboard {
|
||||
}
|
||||
if (Config.DEBUG_PRINT_KEY_EVENTS) {
|
||||
Lwjgl3ify.LOG.info(
|
||||
"[DEBUG-KEY-QUEUE] queued key event key:{} action:{} state:{} charname:{} naive-char:{}",
|
||||
event.key,
|
||||
event.state,
|
||||
event.state,
|
||||
java.awt.event.KeyEvent.getKeyText(KeyCodes.lwjglToAwt(KeyCodes.glfwToLwjgl(event.key))),
|
||||
(event.key >= 32 && event.key < 127) ? ((char) event.key) : '?');
|
||||
"[DEBUG-KEY-QUEUE] queued key event key:{} action:{} state:{} charname:{} naive-char:{}",
|
||||
event.key,
|
||||
event.state,
|
||||
event.state,
|
||||
java.awt.event.KeyEvent.getKeyText(KeyCodes.lwjglToAwt(KeyCodes.glfwToLwjgl(event.key))),
|
||||
(event.key >= 32 && event.key < 127) ? ((char) event.key) : '?');
|
||||
}
|
||||
try {
|
||||
eventQueue.add(event);
|
||||
|
||||
@@ -164,9 +164,9 @@ public class Mouse {
|
||||
return;
|
||||
}
|
||||
GLFW.glfwSetInputMode(
|
||||
Display.getWindow(),
|
||||
GLFW.GLFW_CURSOR,
|
||||
grab ? GLFW.GLFW_CURSOR_DISABLED : GLFW.GLFW_CURSOR_NORMAL);
|
||||
Display.getWindow(),
|
||||
GLFW.GLFW_CURSOR,
|
||||
grab ? GLFW.GLFW_CURSOR_DISABLED : GLFW.GLFW_CURSOR_NORMAL);
|
||||
grabbed = grab;
|
||||
if (!grab) {
|
||||
// The old cursor position is sent instead of the new one in the events following mouse ungrab.
|
||||
|
||||
@@ -24,12 +24,12 @@ public class AL {
|
||||
}
|
||||
|
||||
public static void create(String deviceArguments, int contextFrequency, int contextRefresh,
|
||||
boolean contextSynchronized) {
|
||||
boolean contextSynchronized) {
|
||||
create(deviceArguments, contextFrequency, contextRefresh, contextSynchronized, true);
|
||||
}
|
||||
|
||||
public static void create(String deviceArguments, int contextFrequency, int contextRefresh,
|
||||
boolean contextSynchronized, boolean openDevice) {
|
||||
boolean contextSynchronized, boolean openDevice) {
|
||||
IntBuffer attribs = BufferUtils.createIntBuffer(16);
|
||||
|
||||
attribs.put(org.lwjgl.openal.ALC10.ALC_FREQUENCY);
|
||||
|
||||
@@ -138,7 +138,8 @@ public final class EFXUtil {
|
||||
} catch (OpenALException debugBuildException) {
|
||||
// Hack because OpenALException hides the original error code (short of parsing the
|
||||
// error message String which would break if it gets changed).
|
||||
if (debugBuildException.getMessage().contains("AL_OUT_OF_MEMORY")) {
|
||||
if (debugBuildException.getMessage()
|
||||
.contains("AL_OUT_OF_MEMORY")) {
|
||||
genError = AL_OUT_OF_MEMORY;
|
||||
} else {
|
||||
genError = AL_INVALID_OPERATION;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class AWTGLCanvas extends Canvas implements Drawable, ComponentListener,
|
||||
public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format, Drawable drawable) throws LWJGLException {}
|
||||
|
||||
public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format, Drawable drawable, ContextAttribs attribs)
|
||||
throws LWJGLException {}
|
||||
throws LWJGLException {}
|
||||
|
||||
public void addNotify() {}
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ public class ContextCapabilities {
|
||||
boolean value = field.getBoolean(cap);
|
||||
|
||||
try {
|
||||
Field f = this.getClass().getField(name);
|
||||
Field f = this.getClass()
|
||||
.getField(name);
|
||||
f.setBoolean(this, value);
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
|
||||
@@ -161,14 +161,14 @@ public class Display {
|
||||
public void invoke(long window, int key, int scancode, int action, int mods) {
|
||||
if (Config.DEBUG_PRINT_KEY_EVENTS) {
|
||||
Lwjgl3ify.LOG.info(
|
||||
"[DEBUG-KEY] key window:{} key:{} scancode:{} action:{} mods:{} charname:{} naive-char:{}",
|
||||
window,
|
||||
key,
|
||||
scancode,
|
||||
action,
|
||||
mods,
|
||||
KeyEvent.getKeyText(KeyCodes.lwjglToAwt(KeyCodes.glfwToLwjgl(key))),
|
||||
(key >= 32 && key < 127) ? ((char) key) : '?');
|
||||
"[DEBUG-KEY] key window:{} key:{} scancode:{} action:{} mods:{} charname:{} naive-char:{}",
|
||||
window,
|
||||
key,
|
||||
scancode,
|
||||
action,
|
||||
mods,
|
||||
KeyEvent.getKeyText(KeyCodes.lwjglToAwt(KeyCodes.glfwToLwjgl(key))),
|
||||
(key >= 32 && key < 127) ? ((char) key) : '?');
|
||||
}
|
||||
cancelNextChar = false;
|
||||
if (key > GLFW_KEY_SPACE && key <= GLFW_KEY_GRAVE_ACCENT) { // Handle keys have a char. Exclude space to
|
||||
@@ -185,10 +185,10 @@ public class Display {
|
||||
} else if (action > 0) { // Delay press and repeat key event to actual char input. There is ALWAYS a
|
||||
// char after them
|
||||
ingredientKeyEvent = new Keyboard.KeyEvent(
|
||||
KeyCodes.glfwToLwjgl(key),
|
||||
'\0',
|
||||
action > 1 ? Keyboard.KeyState.REPEAT : Keyboard.KeyState.PRESS,
|
||||
Sys.getNanoTime());
|
||||
KeyCodes.glfwToLwjgl(key),
|
||||
'\0',
|
||||
action > 1 ? Keyboard.KeyState.REPEAT : Keyboard.KeyState.PRESS,
|
||||
Sys.getNanoTime());
|
||||
} else { // Release event
|
||||
if (ingredientKeyEvent != null && ingredientKeyEvent.key == KeyCodes.glfwToLwjgl(key)) {
|
||||
ingredientKeyEvent.queueOutOfOrderRelease = true;
|
||||
@@ -213,11 +213,8 @@ public class Display {
|
||||
@Override
|
||||
public void invoke(long window, int codepoint) {
|
||||
if (Config.DEBUG_PRINT_KEY_EVENTS) {
|
||||
Lwjgl3ify.LOG.info(
|
||||
"[DEBUG-KEY] char window:{} codepoint:{} char:{}",
|
||||
window,
|
||||
codepoint,
|
||||
(char) codepoint);
|
||||
Lwjgl3ify.LOG
|
||||
.info("[DEBUG-KEY] char window:{} codepoint:{} char:{}", window, codepoint, (char) codepoint);
|
||||
}
|
||||
if (cancelNextChar) { // Char event being cancelled
|
||||
cancelNextChar = false;
|
||||
@@ -253,11 +250,11 @@ public class Display {
|
||||
public void invoke(long window, int button, int action, int mods) {
|
||||
if (Config.DEBUG_PRINT_MOUSE_EVENTS) {
|
||||
Lwjgl3ify.LOG.info(
|
||||
"[DEBUG-MOUSE] button window:{} button:{} action:{} mods:{}",
|
||||
window,
|
||||
button,
|
||||
action,
|
||||
mods);
|
||||
"[DEBUG-MOUSE] button window:{} button:{} action:{} mods:{}",
|
||||
window,
|
||||
button,
|
||||
action,
|
||||
mods);
|
||||
}
|
||||
Mouse.addButtonEvent(button, action == GLFW.GLFW_PRESS ? true : false);
|
||||
}
|
||||
@@ -534,7 +531,10 @@ public class Display {
|
||||
if (dimension * dimension * 4 != nativeBuffers[icon].limit()) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
glfwImages.put(icon, GLFWImage.create().set(dimension, dimension, nativeBuffers[icon]));
|
||||
glfwImages.put(
|
||||
icon,
|
||||
GLFWImage.create()
|
||||
.set(dimension, dimension, nativeBuffers[icon]));
|
||||
}
|
||||
GLFW.glfwSetWindowIcon(getWindow(), glfwImages);
|
||||
glfwImages.free();
|
||||
|
||||
@@ -122,7 +122,7 @@ interface DisplayImplementation extends InputImplementation {
|
||||
* Method to create a Pbuffer
|
||||
*/
|
||||
PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs,
|
||||
IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs) throws LWJGLException;
|
||||
IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs) throws LWJGLException;
|
||||
|
||||
void setPbufferAttrib(PeerInfo handle, int attrib, int value);
|
||||
|
||||
|
||||
@@ -13,19 +13,19 @@ import org.lwjgl.system.MemoryUtil;
|
||||
public class GL20x {
|
||||
|
||||
public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride,
|
||||
ByteBuffer buffer) {
|
||||
ByteBuffer buffer) {
|
||||
int type = unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE;
|
||||
GL20.glVertexAttribPointer(index, size, type, normalized, stride, buffer);
|
||||
}
|
||||
|
||||
public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride,
|
||||
ShortBuffer buffer) {
|
||||
ShortBuffer buffer) {
|
||||
int type = unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT;
|
||||
GL20.nglVertexAttribPointer(index, size, type, normalized, stride, MemoryUtil.memAddress(buffer));
|
||||
}
|
||||
|
||||
public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride,
|
||||
IntBuffer buffer) {
|
||||
IntBuffer buffer) {
|
||||
int type = unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT;
|
||||
GL20.nglVertexAttribPointer(index, size, type, normalized, stride, MemoryUtil.memAddress(buffer));
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public interface InputImplementation {
|
||||
|
||||
/** Native cursor handles */
|
||||
Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images,
|
||||
IntBuffer delays) throws LWJGLException;
|
||||
IntBuffer delays) throws LWJGLException;
|
||||
|
||||
void destroyCursor(Object cursor_handle);
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ public final class Pbuffer extends DrawableGL {
|
||||
* Pbuffer will share with the Display context (if created).
|
||||
*/
|
||||
public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture,
|
||||
Drawable shared_drawable) throws LWJGLException {
|
||||
Drawable shared_drawable) throws LWJGLException {
|
||||
this(width, height, pixel_format, renderTexture, shared_drawable, null);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ public final class Pbuffer extends DrawableGL {
|
||||
* @param attribs The ContextAttribs to use when creating the context. (optional, may be null)
|
||||
*/
|
||||
public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture,
|
||||
Drawable shared_drawable, ContextAttribs attribs) throws LWJGLException {
|
||||
Drawable shared_drawable, ContextAttribs attribs) throws LWJGLException {
|
||||
if (pixel_format == null) throw new NullPointerException("Pixel format must be non-null");
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
@@ -212,15 +212,16 @@ public final class Pbuffer extends DrawableGL {
|
||||
}
|
||||
|
||||
private static PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs,
|
||||
RenderTexture renderTexture) throws LWJGLException {
|
||||
RenderTexture renderTexture) throws LWJGLException {
|
||||
if (renderTexture == null) {
|
||||
// Though null is a perfectly valid argument, Matrox Parhelia drivers expect
|
||||
// a 0 terminated list, or else they crash. Supplying NULL or 0, should
|
||||
// cause the drivers to use default settings
|
||||
IntBuffer defaultAttribs = BufferUtils.createIntBuffer(1);
|
||||
return Display.getImplementation()
|
||||
.createPbuffer(width, height, pixel_format, attribs, null, defaultAttribs);
|
||||
} else return Display.getImplementation().createPbuffer(
|
||||
.createPbuffer(width, height, pixel_format, attribs, null, defaultAttribs);
|
||||
} else return Display.getImplementation()
|
||||
.createPbuffer(
|
||||
width,
|
||||
height,
|
||||
pixel_format,
|
||||
@@ -238,7 +239,8 @@ public final class Pbuffer extends DrawableGL {
|
||||
*/
|
||||
public synchronized boolean isBufferLost() {
|
||||
checkDestroyed();
|
||||
return Display.getImplementation().isBufferLost(peer_info);
|
||||
return Display.getImplementation()
|
||||
.isBufferLost(peer_info);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -247,7 +249,8 @@ public final class Pbuffer extends DrawableGL {
|
||||
* @return a bitmask of Pbuffer capabilities.
|
||||
*/
|
||||
public static int getCapabilities() {
|
||||
return Display.getImplementation().getPbufferCapabilities();
|
||||
return Display.getImplementation()
|
||||
.getPbufferCapabilities();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------
|
||||
@@ -268,7 +271,8 @@ public final class Pbuffer extends DrawableGL {
|
||||
*/
|
||||
public synchronized void setAttrib(int attrib, int value) {
|
||||
checkDestroyed();
|
||||
Display.getImplementation().setPbufferAttrib(peer_info, attrib, value);
|
||||
Display.getImplementation()
|
||||
.setPbufferAttrib(peer_info, attrib, value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -280,7 +284,8 @@ public final class Pbuffer extends DrawableGL {
|
||||
*/
|
||||
public synchronized void bindTexImage(int buffer) {
|
||||
checkDestroyed();
|
||||
Display.getImplementation().bindTexImageToPbuffer(peer_info, buffer);
|
||||
Display.getImplementation()
|
||||
.bindTexImageToPbuffer(peer_info, buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -290,7 +295,8 @@ public final class Pbuffer extends DrawableGL {
|
||||
*/
|
||||
public synchronized void releaseTexImage(int buffer) {
|
||||
checkDestroyed();
|
||||
Display.getImplementation().releaseTexImageFromPbuffer(peer_info, buffer);
|
||||
Display.getImplementation()
|
||||
.releaseTexImageFromPbuffer(peer_info, buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -91,12 +91,12 @@ public final class PixelFormat implements PixelFormatLWJGL {
|
||||
}
|
||||
|
||||
public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp,
|
||||
int accum_alpha, boolean stereo) {
|
||||
int accum_alpha, boolean stereo) {
|
||||
this(bpp, alpha, depth, stencil, samples, num_aux_buffers, accum_bpp, accum_alpha, stereo, false);
|
||||
}
|
||||
|
||||
public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp,
|
||||
int accum_alpha, boolean stereo, boolean floating_point) {
|
||||
int accum_alpha, boolean stereo, boolean floating_point) {
|
||||
this.bpp = bpp;
|
||||
this.alpha = alpha;
|
||||
this.depth = depth;
|
||||
@@ -257,10 +257,10 @@ public final class PixelFormat implements PixelFormatLWJGL {
|
||||
*/
|
||||
public PixelFormat withCoverageSamples(final int colorSamples, final int coverageSamples) {
|
||||
if (coverageSamples < 0 || colorSamples < 0
|
||||
|| (coverageSamples == 0 && 0 < colorSamples)
|
||||
|| coverageSamples < colorSamples)
|
||||
|| (coverageSamples == 0 && 0 < colorSamples)
|
||||
|| coverageSamples < colorSamples)
|
||||
throw new IllegalArgumentException(
|
||||
"Invalid number of coverage samples specified: " + coverageSamples + " - " + colorSamples);
|
||||
"Invalid number of coverage samples specified: " + coverageSamples + " - " + colorSamples);
|
||||
|
||||
final PixelFormat pf = new PixelFormat(this);
|
||||
pf.samples = coverageSamples;
|
||||
@@ -303,7 +303,7 @@ public final class PixelFormat implements PixelFormatLWJGL {
|
||||
*/
|
||||
public PixelFormat withAccumulationBitsPerPixel(final int accum_bpp) {
|
||||
if (accum_bpp < 0) throw new IllegalArgumentException(
|
||||
"Invalid number of bits per pixel in the accumulation buffer specified: " + accum_bpp);
|
||||
"Invalid number of bits per pixel in the accumulation buffer specified: " + accum_bpp);
|
||||
|
||||
final PixelFormat pf = new PixelFormat(this);
|
||||
pf.accum_bpp = accum_bpp;
|
||||
@@ -324,7 +324,7 @@ public final class PixelFormat implements PixelFormatLWJGL {
|
||||
*/
|
||||
public PixelFormat withAccumulationAlpha(final int accum_alpha) {
|
||||
if (accum_alpha < 0) throw new IllegalArgumentException(
|
||||
"Invalid number of alpha bits in the accumulation buffer specified: " + accum_alpha);
|
||||
"Invalid number of alpha bits in the accumulation buffer specified: " + accum_alpha);
|
||||
|
||||
final PixelFormat pf = new PixelFormat(this);
|
||||
pf.accum_alpha = accum_alpha;
|
||||
|
||||
@@ -172,13 +172,13 @@ public final class RenderTexture {
|
||||
* @param mipmaps - How many mipmap levels to allocate on the P-buffer.
|
||||
*/
|
||||
public RenderTexture(boolean useRGB, boolean useRGBA, boolean useDepth, boolean isRectangle, int target,
|
||||
int mipmaps) {
|
||||
int mipmaps) {
|
||||
if (useRGB && useRGBA) throw new IllegalArgumentException("A RenderTexture can't be both RGB and RGBA.");
|
||||
|
||||
if (mipmaps < 0) throw new IllegalArgumentException("The mipmap levels can't be negative.");
|
||||
|
||||
if (isRectangle && target != RENDER_TEXTURE_RECTANGLE) throw new IllegalArgumentException(
|
||||
"When the RenderTexture is rectangle the target must be RENDER_TEXTURE_RECTANGLE.");
|
||||
"When the RenderTexture is rectangle the target must be RENDER_TEXTURE_RECTANGLE.");
|
||||
|
||||
pixelFormatCaps = BufferUtils.createIntBuffer(4);
|
||||
pBufferAttribs = BufferUtils.createIntBuffer(8);
|
||||
|
||||
@@ -203,10 +203,10 @@ public final class Color implements ReadableColor, Serializable, WritableColor {
|
||||
*/
|
||||
public boolean equals(Object o) {
|
||||
return (o != null) && (o instanceof ReadableColor)
|
||||
&& (((ReadableColor) o).getRed() == this.getRed())
|
||||
&& (((ReadableColor) o).getGreen() == this.getGreen())
|
||||
&& (((ReadableColor) o).getBlue() == this.getBlue())
|
||||
&& (((ReadableColor) o).getAlpha() == this.getAlpha());
|
||||
&& (((ReadableColor) o).getRed() == this.getRed())
|
||||
&& (((ReadableColor) o).getGreen() == this.getGreen())
|
||||
&& (((ReadableColor) o).getBlue() == this.getBlue())
|
||||
&& (((ReadableColor) o).getAlpha() == this.getAlpha());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,7 +48,7 @@ public final class Display {
|
||||
* @return an array of matching display modes
|
||||
*/
|
||||
public static DisplayMode[] getAvailableDisplayModes(int minWidth, int minHeight, int maxWidth, int maxHeight,
|
||||
int minBPP, int maxBPP, int minFreq, int maxFreq) throws LWJGLException {
|
||||
int minBPP, int maxBPP, int minFreq, int maxFreq) throws LWJGLException {
|
||||
// First get the available display modes
|
||||
DisplayMode[] modes = org.lwjglx.opengl.Display.getAvailableDisplayModes();
|
||||
|
||||
@@ -147,10 +147,10 @@ public final class Display {
|
||||
int idx = param[i].indexOf('=');
|
||||
if (idx > 0) {
|
||||
accessors[i] = new FieldAccessor(
|
||||
param[i].substring(0, idx),
|
||||
0,
|
||||
Integer.parseInt(param[i].substring(idx + 1, param[i].length())),
|
||||
true);
|
||||
param[i].substring(0, idx),
|
||||
0,
|
||||
Integer.parseInt(param[i].substring(idx + 1, param[i].length())),
|
||||
true);
|
||||
} else if (param[i].charAt(0) == '-') {
|
||||
accessors[i] = new FieldAccessor(param[i].substring(1), -1, 0, false);
|
||||
} else {
|
||||
|
||||
@@ -97,7 +97,10 @@ public class WaveData {
|
||||
* @return WaveData containing data, or null if a failure occured
|
||||
*/
|
||||
public static WaveData create(String path) {
|
||||
return create(Thread.currentThread().getContextClassLoader().getResource(path));
|
||||
return create(
|
||||
Thread.currentThread()
|
||||
.getContextClassLoader()
|
||||
.getResource(path));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,9 +194,11 @@ public class WaveData {
|
||||
try {
|
||||
int available = ais.available();
|
||||
if (available <= 0) {
|
||||
available = ais.getFormat().getChannels() * (int) ais.getFrameLength()
|
||||
* ais.getFormat().getSampleSizeInBits()
|
||||
/ 8;
|
||||
available = ais.getFormat()
|
||||
.getChannels() * (int) ais.getFrameLength()
|
||||
* ais.getFormat()
|
||||
.getSampleSizeInBits()
|
||||
/ 8;
|
||||
}
|
||||
byte[] buf = new byte[ais.available()];
|
||||
int read = 0, total = 0;
|
||||
@@ -201,9 +206,9 @@ public class WaveData {
|
||||
total += read;
|
||||
}
|
||||
buffer = convertAudioBytes(
|
||||
buf,
|
||||
audioformat.getSampleSizeInBits() == 16,
|
||||
audioformat.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN);
|
||||
buf,
|
||||
audioformat.getSampleSizeInBits() == 16,
|
||||
audioformat.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN);
|
||||
} catch (IOException ioe) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -156,9 +156,9 @@ public class XPMFile {
|
||||
StringTokenizer st = new StringTokenizer(format);
|
||||
|
||||
return new int[] { Integer.parseInt(st.nextToken()), /* width */
|
||||
Integer.parseInt(st.nextToken()), /* height */
|
||||
Integer.parseInt(st.nextToken()), /* colors */
|
||||
Integer.parseInt(st.nextToken()) /* chars per pixel */
|
||||
Integer.parseInt(st.nextToken()), /* height */
|
||||
Integer.parseInt(st.nextToken()), /* colors */
|
||||
Integer.parseInt(st.nextToken()) /* chars per pixel */
|
||||
};
|
||||
}
|
||||
|
||||
@@ -201,8 +201,8 @@ public class XPMFile {
|
||||
// each iteration equals one pixel
|
||||
for (int i = 0; i < format[WIDTH]; i++) {
|
||||
String key = line.substring(
|
||||
i * format[CHARACTERS_PER_PIXEL],
|
||||
(i * format[CHARACTERS_PER_PIXEL] + format[CHARACTERS_PER_PIXEL]));
|
||||
i * format[CHARACTERS_PER_PIXEL],
|
||||
(i * format[CHARACTERS_PER_PIXEL] + format[CHARACTERS_PER_PIXEL]));
|
||||
int color = colors.get(key);
|
||||
bytes[offset + (i * 4)] = (byte) ((color & 0x00ff0000) >> 16);
|
||||
bytes[offset + ((i * 4) + 1)] = (byte) ((color & 0x0000ff00) >> 8);
|
||||
|
||||
@@ -231,7 +231,7 @@ public class GLU {
|
||||
* @param upz
|
||||
*/
|
||||
public static void gluLookAt(float eyex, float eyey, float eyez, float centerx, float centery, float centerz,
|
||||
float upx, float upy, float upz) {
|
||||
float upx, float upy, float upz) {
|
||||
|
||||
Project.gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz);
|
||||
}
|
||||
@@ -274,7 +274,7 @@ public class GLU {
|
||||
* @param win_pos
|
||||
*/
|
||||
public static boolean gluProject(float objx, float objy, float objz, FloatBuffer modelMatrix,
|
||||
FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer win_pos) {
|
||||
FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer win_pos) {
|
||||
return Project.gluProject(objx, objy, objz, modelMatrix, projMatrix, viewport, win_pos);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ public class GLU {
|
||||
* @param obj_pos
|
||||
*/
|
||||
public static boolean gluUnProject(float winx, float winy, float winz, FloatBuffer modelMatrix,
|
||||
FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer obj_pos) {
|
||||
FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer obj_pos) {
|
||||
return Project.gluUnProject(winx, winy, winz, modelMatrix, projMatrix, viewport, obj_pos);
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ public class GLU {
|
||||
* @return int
|
||||
*/
|
||||
public static int gluBuild2DMipmaps(int target, int components, int width, int height, int format, int type,
|
||||
ByteBuffer data) {
|
||||
ByteBuffer data) {
|
||||
|
||||
return MipMap.gluBuild2DMipmaps(target, components, width, height, format, type, data);
|
||||
}
|
||||
@@ -362,7 +362,7 @@ public class GLU {
|
||||
* @return int
|
||||
*/
|
||||
public static int gluScaleImage(int format, int widthIn, int heightIn, int typeIn, ByteBuffer dataIn, int widthOut,
|
||||
int heightOut, int typeOut, ByteBuffer dataOut) {
|
||||
int heightOut, int typeOut, ByteBuffer dataOut) {
|
||||
|
||||
return MipMap.gluScaleImage(format, widthIn, heightIn, typeIn, dataIn, widthOut, heightOut, typeOut, dataOut);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class MipMap extends Util {
|
||||
* @return int
|
||||
*/
|
||||
public static int gluBuild2DMipmaps(final int target, final int components, final int width, final int height,
|
||||
final int format, final int type, final ByteBuffer data) {
|
||||
final int format, final int type, final ByteBuffer data) {
|
||||
if (width < 1 || height < 1) return GLU_INVALID_VALUE;
|
||||
|
||||
final int bpp = bytesPerPixel(format, type);
|
||||
@@ -127,7 +127,7 @@ public class MipMap extends Util {
|
||||
* @return int
|
||||
*/
|
||||
public static int gluScaleImage(int format, int widthIn, int heightIn, int typein, ByteBuffer dataIn, int widthOut,
|
||||
int heightOut, int typeOut, ByteBuffer dataOut) {
|
||||
int heightOut, int typeOut, ByteBuffer dataOut) {
|
||||
|
||||
final int components = compPerPix(format);
|
||||
final int alphaIdx = formatAlphaIndex(format);
|
||||
@@ -144,31 +144,31 @@ public class MipMap extends Util {
|
||||
switch (typein) {
|
||||
case GL_UNSIGNED_BYTE -> {
|
||||
if (!stbir_resize_uint8_srgb(
|
||||
dataIn,
|
||||
widthIn,
|
||||
heightIn,
|
||||
strideIn,
|
||||
dataOut,
|
||||
widthOut,
|
||||
heightOut,
|
||||
strideOut,
|
||||
components,
|
||||
alphaIdx,
|
||||
0)) {
|
||||
dataIn,
|
||||
widthIn,
|
||||
heightIn,
|
||||
strideIn,
|
||||
dataOut,
|
||||
widthOut,
|
||||
heightOut,
|
||||
strideOut,
|
||||
components,
|
||||
alphaIdx,
|
||||
0)) {
|
||||
throw new RuntimeException("Couldn't resize image with stbir");
|
||||
}
|
||||
}
|
||||
case GL_FLOAT -> {
|
||||
if (!stbir_resize_float(
|
||||
dataIn.asFloatBuffer(),
|
||||
widthIn,
|
||||
heightIn,
|
||||
strideIn * 4,
|
||||
dataOut.asFloatBuffer(),
|
||||
widthOut,
|
||||
heightOut,
|
||||
strideOut * 4,
|
||||
components)) {
|
||||
dataIn.asFloatBuffer(),
|
||||
widthIn,
|
||||
heightIn,
|
||||
strideIn * 4,
|
||||
dataOut.asFloatBuffer(),
|
||||
widthOut,
|
||||
heightOut,
|
||||
strideOut * 4,
|
||||
components)) {
|
||||
throw new RuntimeException("Couldn't resize image with stbir");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.lwjglx.BufferUtils;
|
||||
public class Project extends Util {
|
||||
|
||||
private static final float[] IDENTITY_MATRIX = new float[] { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
|
||||
private static final FloatBuffer matrix = BufferUtils.createFloatBuffer(16);
|
||||
private static final FloatBuffer finalMatrix = BufferUtils.createFloatBuffer(16);
|
||||
@@ -65,8 +65,8 @@ public class Project extends Util {
|
||||
private static void __gluMultMatrixVecf(FloatBuffer m, float[] in, float[] out) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
out[i] = in[0] * m.get(m.position() + 0 * 4 + i) + in[1] * m.get(m.position() + 1 * 4 + i)
|
||||
+ in[2] * m.get(m.position() + 2 * 4 + i)
|
||||
+ in[3] * m.get(m.position() + 3 * 4 + i);
|
||||
+ in[2] * m.get(m.position() + 2 * 4 + i)
|
||||
+ in[3] * m.get(m.position() + 3 * 4 + i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,11 +155,11 @@ public class Project extends Util {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int j = 0; j < 4; j++) {
|
||||
r.put(
|
||||
r.position() + i * 4 + j,
|
||||
a.get(a.position() + i * 4 + 0) * b.get(b.position() + 0 * 4 + j)
|
||||
+ a.get(a.position() + i * 4 + 1) * b.get(b.position() + 1 * 4 + j)
|
||||
+ a.get(a.position() + i * 4 + 2) * b.get(b.position() + 2 * 4 + j)
|
||||
+ a.get(a.position() + i * 4 + 3) * b.get(b.position() + 3 * 4 + j));
|
||||
r.position() + i * 4 + j,
|
||||
a.get(a.position() + i * 4 + 0) * b.get(b.position() + 0 * 4 + j)
|
||||
+ a.get(a.position() + i * 4 + 1) * b.get(b.position() + 1 * 4 + j)
|
||||
+ a.get(a.position() + i * 4 + 2) * b.get(b.position() + 2 * 4 + j)
|
||||
+ a.get(a.position() + i * 4 + 3) * b.get(b.position() + 3 * 4 + j));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -211,7 +211,7 @@ public class Project extends Util {
|
||||
* @param upz
|
||||
*/
|
||||
public static void gluLookAt(float eyex, float eyey, float eyez, float centerx, float centery, float centerz,
|
||||
float upx, float upy, float upz) {
|
||||
float upx, float upy, float upz) {
|
||||
float[] forward = Project.forward;
|
||||
float[] side = Project.side;
|
||||
float[] up = Project.up;
|
||||
@@ -262,7 +262,7 @@ public class Project extends Util {
|
||||
* @param win_pos
|
||||
*/
|
||||
public static boolean gluProject(float objx, float objy, float objz, FloatBuffer modelMatrix,
|
||||
FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer win_pos) {
|
||||
FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer win_pos) {
|
||||
|
||||
float[] in = Project.in;
|
||||
float[] out = Project.out;
|
||||
@@ -304,7 +304,7 @@ public class Project extends Util {
|
||||
* @param obj_pos
|
||||
*/
|
||||
public static boolean gluUnProject(float winx, float winy, float winz, FloatBuffer modelMatrix,
|
||||
FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer obj_pos) {
|
||||
FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer obj_pos) {
|
||||
float[] in = Project.in;
|
||||
float[] out = Project.out;
|
||||
|
||||
@@ -355,9 +355,9 @@ public class Project extends Util {
|
||||
|
||||
/* Translate and scale the picked region to the entire window */
|
||||
glTranslatef(
|
||||
(viewport.get(viewport.position() + 2) - 2 * (x - viewport.get(viewport.position() + 0))) / deltaX,
|
||||
(viewport.get(viewport.position() + 3) - 2 * (y - viewport.get(viewport.position() + 1))) / deltaY,
|
||||
0);
|
||||
(viewport.get(viewport.position() + 2) - 2 * (x - viewport.get(viewport.position() + 0))) / deltaX,
|
||||
(viewport.get(viewport.position() + 3) - 2 * (y - viewport.get(viewport.position() + 1))) / deltaY,
|
||||
0);
|
||||
glScalef(viewport.get(viewport.position() + 2) / deltaX, viewport.get(viewport.position() + 3) / deltaY, 1.0f);
|
||||
}
|
||||
}
|
||||
@@ -239,9 +239,9 @@ public class GLUtessellatorImpl implements GLUtessellator {
|
||||
}
|
||||
case GLU_TESS_WINDING_RULE -> {
|
||||
assert (windingRule == GLU_TESS_WINDING_ODD || windingRule == GLU_TESS_WINDING_NONZERO
|
||||
|| windingRule == GLU_TESS_WINDING_POSITIVE
|
||||
|| windingRule == GLU_TESS_WINDING_NEGATIVE
|
||||
|| windingRule == GLU_TESS_WINDING_ABS_GEQ_TWO);
|
||||
|| windingRule == GLU_TESS_WINDING_POSITIVE
|
||||
|| windingRule == GLU_TESS_WINDING_NEGATIVE
|
||||
|| windingRule == GLU_TESS_WINDING_ABS_GEQ_TWO);
|
||||
value[value_offset] = windingRule;
|
||||
}
|
||||
case GLU_TESS_BOUNDARY_ONLY -> {
|
||||
@@ -530,12 +530,12 @@ public class GLUtessellatorImpl implements GLUtessellator {
|
||||
Mesh.__gl_meshCheckMesh(mesh);
|
||||
|
||||
if (callBegin != NULL_CB || callEnd != NULL_CB
|
||||
|| callVertex != NULL_CB
|
||||
|| callEdgeFlag != NULL_CB
|
||||
|| callBeginData != NULL_CB
|
||||
|| callEndData != NULL_CB
|
||||
|| callVertexData != NULL_CB
|
||||
|| callEdgeFlagData != NULL_CB) {
|
||||
|| callVertex != NULL_CB
|
||||
|| callEdgeFlag != NULL_CB
|
||||
|| callBeginData != NULL_CB
|
||||
|| callEndData != NULL_CB
|
||||
|| callVertexData != NULL_CB
|
||||
|| callEdgeFlagData != NULL_CB) {
|
||||
if (boundaryOnly) {
|
||||
Render.__gl_renderBoundary(this, mesh); /* output boundary contours */
|
||||
} else {
|
||||
|
||||
@@ -696,10 +696,10 @@ class Mesh {
|
||||
assert (e.Onext.Sym.Lnext == e);
|
||||
}
|
||||
assert (e.Sym.next == ePrev.Sym && e.Sym == mesh.eHeadSym
|
||||
&& e.Sym.Sym == e
|
||||
&& e.Org == null
|
||||
&& e.Sym.Org == null
|
||||
&& e.Lface == null
|
||||
&& e.Sym.Lface == null);
|
||||
&& e.Sym.Sym == e
|
||||
&& e.Org == null
|
||||
&& e.Sym.Org == null
|
||||
&& e.Lface == null
|
||||
&& e.Sym.Lface == null);
|
||||
}
|
||||
}
|
||||
@@ -386,13 +386,13 @@ class Render {
|
||||
private static final int SIGN_INCONSISTENT = 2;
|
||||
|
||||
static int ComputeNormal(GLUtessellatorImpl tess, double[] norm,
|
||||
boolean check) /*
|
||||
* If check==false, we compute the polygon normal and place it in norm[]. If check==true, we
|
||||
* check that each triangle in the fan from v0 has a consistent orientation with respect to
|
||||
* norm[]. If triangles are consistently oriented CCW, return 1; if CW, return -1; if all
|
||||
* triangles are degenerate return 0; otherwise (no consistent orientation) return
|
||||
* SIGN_INCONSISTENT.
|
||||
*/ {
|
||||
boolean check) /*
|
||||
* If check==false, we compute the polygon normal and place it in norm[]. If check==true, we
|
||||
* check that each triangle in the fan from v0 has a consistent orientation with respect to
|
||||
* norm[]. If triangles are consistently oriented CCW, return 1; if CW, return -1; if all
|
||||
* triangles are degenerate return 0; otherwise (no consistent orientation) return
|
||||
* SIGN_INCONSISTENT.
|
||||
*/ {
|
||||
CachedVertex[] v = tess.cache;
|
||||
// CachedVertex vn = v0 + tess.cacheCount;
|
||||
int vn = tess.cacheCount;
|
||||
@@ -516,7 +516,7 @@ class Render {
|
||||
}
|
||||
|
||||
tess.callBeginOrBeginData(
|
||||
tess.boundaryOnly ? GL_LINE_LOOP : (tess.cacheCount > 3) ? GL_TRIANGLE_FAN : GL_TRIANGLES);
|
||||
tess.boundaryOnly ? GL_LINE_LOOP : (tess.cacheCount > 3) ? GL_TRIANGLE_FAN : GL_TRIANGLES);
|
||||
|
||||
tess.callVertexOrVertexData(v[0].data);
|
||||
if (sign > 0) {
|
||||
|
||||
@@ -89,14 +89,14 @@ class Sweep {
|
||||
}
|
||||
|
||||
static boolean EdgeLeq(GLUtessellatorImpl tess, ActiveRegion reg1,
|
||||
ActiveRegion reg2) /*
|
||||
* Both edges must be directed from right to left (this is the canonical direction for
|
||||
* the upper edge of each region). The strategy is to evaluate a "t" value for each edge
|
||||
* at the current sweep line position, given by tess.event. The calculations are designed
|
||||
* to be very stable, but of course they are not perfect. Special case: if both edge
|
||||
* destinations are at the sweep event, we sort the edges by slope (they would otherwise
|
||||
* compare equally).
|
||||
*/ {
|
||||
ActiveRegion reg2) /*
|
||||
* Both edges must be directed from right to left (this is the canonical direction for
|
||||
* the upper edge of each region). The strategy is to evaluate a "t" value for each edge
|
||||
* at the current sweep line position, given by tess.event. The calculations are designed
|
||||
* to be very stable, but of course they are not perfect. Special case: if both edge
|
||||
* destinations are at the sweep event, we sort the edges by slope (they would otherwise
|
||||
* compare equally).
|
||||
*/ {
|
||||
GLUvertex event = tess.event;
|
||||
GLUhalfEdge e1, e2;
|
||||
double t1, t2;
|
||||
@@ -139,9 +139,9 @@ class Sweep {
|
||||
}
|
||||
|
||||
static boolean FixUpperEdge(ActiveRegion reg,
|
||||
GLUhalfEdge newEdge) /*
|
||||
* Replace an upper edge which needs fixing (see ConnectRightVertex).
|
||||
*/ {
|
||||
GLUhalfEdge newEdge) /*
|
||||
* Replace an upper edge which needs fixing (see ConnectRightVertex).
|
||||
*/ {
|
||||
assert (reg.fixUpperEdge);
|
||||
if (!Mesh.__gl_meshDelete(reg.eUp)) return false;
|
||||
reg.fixUpperEdge = false;
|
||||
@@ -183,11 +183,11 @@ class Sweep {
|
||||
}
|
||||
|
||||
static ActiveRegion AddRegionBelow(GLUtessellatorImpl tess, ActiveRegion regAbove,
|
||||
GLUhalfEdge eNewUp) /*
|
||||
* Add a new active region to the sweep line, *somewhere* below "regAbove" (according to
|
||||
* where the new edge belongs in the sweep-line dictionary). The upper edge of the new
|
||||
* region will be "eNewUp". Winding number and "inside" flag are not updated.
|
||||
*/ {
|
||||
GLUhalfEdge eNewUp) /*
|
||||
* Add a new active region to the sweep line, *somewhere* below "regAbove" (according to
|
||||
* where the new edge belongs in the sweep-line dictionary). The upper edge of the new
|
||||
* region will be "eNewUp". Winding number and "inside" flag are not updated.
|
||||
*/ {
|
||||
ActiveRegion regNew = new ActiveRegion();
|
||||
// if (regNew == null) throw new RuntimeException();
|
||||
|
||||
@@ -233,12 +233,12 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void FinishRegion(GLUtessellatorImpl tess,
|
||||
ActiveRegion reg) /*
|
||||
* Delete a region from the sweep line. This happens when the upper and lower chains of a
|
||||
* region meet (at a vertex on the sweep line). The "inside" flag is copied to the
|
||||
* appropriate mesh face (we could not do this before -- since the structure of the mesh
|
||||
* is always changing, this face may not have even existed until now).
|
||||
*/ {
|
||||
ActiveRegion reg) /*
|
||||
* Delete a region from the sweep line. This happens when the upper and lower chains of a
|
||||
* region meet (at a vertex on the sweep line). The "inside" flag is copied to the
|
||||
* appropriate mesh face (we could not do this before -- since the structure of the mesh
|
||||
* is always changing, this face may not have even existed until now).
|
||||
*/ {
|
||||
GLUhalfEdge e = reg.eUp;
|
||||
GLUface f = e.Lface;
|
||||
|
||||
@@ -248,16 +248,16 @@ class Sweep {
|
||||
}
|
||||
|
||||
static GLUhalfEdge FinishLeftRegions(GLUtessellatorImpl tess, ActiveRegion regFirst,
|
||||
ActiveRegion regLast) /*
|
||||
* We are given a vertex with one or more left-going edges. All affected edges should
|
||||
* be in the edge dictionary. Starting at regFirst.eUp, we walk down deleting all
|
||||
* regions where both edges have the same origin vOrg. At the same time we copy the
|
||||
* "inside" flag from the active region to the face, since at this point each face
|
||||
* will belong to at most one region (this was not necessarily true until this point
|
||||
* in the sweep). The walk stops at the region above regLast; if regLast is null we
|
||||
* walk as far as possible. At the same time we relink the mesh if necessary, so that
|
||||
* the ordering of edges around vOrg is the same as in the dictionary.
|
||||
*/ {
|
||||
ActiveRegion regLast) /*
|
||||
* We are given a vertex with one or more left-going edges. All affected edges should
|
||||
* be in the edge dictionary. Starting at regFirst.eUp, we walk down deleting all
|
||||
* regions where both edges have the same origin vOrg. At the same time we copy the
|
||||
* "inside" flag from the active region to the face, since at this point each face
|
||||
* will belong to at most one region (this was not necessarily true until this point
|
||||
* in the sweep). The walk stops at the region above regLast; if regLast is null we
|
||||
* walk as far as possible. At the same time we relink the mesh if necessary, so that
|
||||
* the ordering of edges around vOrg is the same as in the dictionary.
|
||||
*/ {
|
||||
ActiveRegion reg, regPrev;
|
||||
GLUhalfEdge e, ePrev;
|
||||
|
||||
@@ -299,7 +299,7 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void AddRightEdges(GLUtessellatorImpl tess, ActiveRegion regUp, GLUhalfEdge eFirst, GLUhalfEdge eLast,
|
||||
GLUhalfEdge eTopLeft, boolean cleanUp)
|
||||
GLUhalfEdge eTopLeft, boolean cleanUp)
|
||||
/*
|
||||
* Purpose: insert right-going edges into the edge dictionary, and update winding numbers and mesh connectivity
|
||||
* appropriately. All right-going edges share a common origin vOrg. Edges are inserted CCW starting at eFirst; the
|
||||
@@ -391,10 +391,10 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void SpliceMergeVertices(GLUtessellatorImpl tess, GLUhalfEdge e1,
|
||||
GLUhalfEdge e2) /*
|
||||
* Two vertices with idential coordinates are combined into one. e1.Org is kept, while
|
||||
* e2.Org is discarded.
|
||||
*/ {
|
||||
GLUhalfEdge e2) /*
|
||||
* Two vertices with idential coordinates are combined into one. e1.Org is kept, while
|
||||
* e2.Org is discarded.
|
||||
*/ {
|
||||
Object[] data = new Object[4];
|
||||
float[] weights = new float[] { 0.5f, 0.5f, 0.0f, 0.0f };
|
||||
|
||||
@@ -405,12 +405,12 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void VertexWeights(GLUvertex isect, GLUvertex org, GLUvertex dst,
|
||||
float[] weights) /*
|
||||
* Find some weights which describe how the intersection vertex is a linear combination of
|
||||
* "org" and "dest". Each of the two edges which generated "isect" is allocated 50% of the
|
||||
* weight; each edge splits the weight between its org and dst according to the relative
|
||||
* distance to "isect".
|
||||
*/ {
|
||||
float[] weights) /*
|
||||
* Find some weights which describe how the intersection vertex is a linear combination of
|
||||
* "org" and "dest". Each of the two edges which generated "isect" is allocated 50% of the
|
||||
* weight; each edge splits the weight between its org and dst according to the relative
|
||||
* distance to "isect".
|
||||
*/ {
|
||||
double t1 = Geom.VertL1dist(org, isect);
|
||||
double t2 = Geom.VertL1dist(dst, isect);
|
||||
|
||||
@@ -422,7 +422,7 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void GetIntersectData(GLUtessellatorImpl tess, GLUvertex isect, GLUvertex orgUp, GLUvertex dstUp,
|
||||
GLUvertex orgLo, GLUvertex dstLo)
|
||||
GLUvertex orgLo, GLUvertex dstLo)
|
||||
/*
|
||||
* We've computed a new intersection point, now we need a "data" pointer from the user so that we can refer to this
|
||||
* new vertex in the rendering callbacks.
|
||||
@@ -447,24 +447,24 @@ class Sweep {
|
||||
}
|
||||
|
||||
static boolean CheckForRightSplice(GLUtessellatorImpl tess,
|
||||
ActiveRegion regUp) /*
|
||||
* Check the upper and lower edge of "regUp", to make sure that the eUp.Org is above
|
||||
* eLo, or eLo.Org is below eUp (depending on which origin is leftmost). The main
|
||||
* purpose is to splice right-going edges with the same dest vertex and nearly identical
|
||||
* slopes (ie. we can't distinguish the slopes numerically). However the splicing can
|
||||
* also help us to recover from numerical errors. For example, suppose at one point we
|
||||
* checked eUp and eLo, and decided that eUp.Org is barely above eLo. Then later, we
|
||||
* split eLo into two edges (eg. from a splice operation like this one). This can change
|
||||
* the result of our test so that now eUp.Org is incident to eLo, or barely below it. We
|
||||
* must correct this condition to maintain the dictionary invariants. One possibility is
|
||||
* to check these edges for intersection again (ie. CheckForIntersect). This is what we
|
||||
* do if possible. However CheckForIntersect requires that tess.event lies between eUp
|
||||
* and eLo, so that it has something to fall back on when the intersection calculation
|
||||
* gives us an unusable answer. So, for those cases where we can't check for
|
||||
* intersection, this routine fixes the problem by just splicing the offending vertex
|
||||
* into the other edge. This is a guaranteed solution, no matter how degenerate things
|
||||
* get. Basically this is a combinatorial solution to a numerical problem.
|
||||
*/ {
|
||||
ActiveRegion regUp) /*
|
||||
* Check the upper and lower edge of "regUp", to make sure that the eUp.Org is above
|
||||
* eLo, or eLo.Org is below eUp (depending on which origin is leftmost). The main
|
||||
* purpose is to splice right-going edges with the same dest vertex and nearly identical
|
||||
* slopes (ie. we can't distinguish the slopes numerically). However the splicing can
|
||||
* also help us to recover from numerical errors. For example, suppose at one point we
|
||||
* checked eUp and eLo, and decided that eUp.Org is barely above eLo. Then later, we
|
||||
* split eLo into two edges (eg. from a splice operation like this one). This can change
|
||||
* the result of our test so that now eUp.Org is incident to eLo, or barely below it. We
|
||||
* must correct this condition to maintain the dictionary invariants. One possibility is
|
||||
* to check these edges for intersection again (ie. CheckForIntersect). This is what we
|
||||
* do if possible. However CheckForIntersect requires that tess.event lies between eUp
|
||||
* and eLo, so that it has something to fall back on when the intersection calculation
|
||||
* gives us an unusable answer. So, for those cases where we can't check for
|
||||
* intersection, this routine fixes the problem by just splicing the offending vertex
|
||||
* into the other edge. This is a guaranteed solution, no matter how degenerate things
|
||||
* get. Basically this is a combinatorial solution to a numerical problem.
|
||||
*/ {
|
||||
ActiveRegion regLo = RegionBelow(regUp);
|
||||
GLUhalfEdge eUp = regUp.eUp;
|
||||
GLUhalfEdge eLo = regLo.eUp;
|
||||
@@ -496,19 +496,19 @@ class Sweep {
|
||||
}
|
||||
|
||||
static boolean CheckForLeftSplice(GLUtessellatorImpl tess,
|
||||
ActiveRegion regUp) /*
|
||||
* Check the upper and lower edge of "regUp", to make sure that the eUp.Sym.Org is above
|
||||
* eLo, or eLo.Sym.Org is below eUp (depending on which destination is rightmost).
|
||||
* Theoretically, this should always be true. However, splitting an edge into two pieces
|
||||
* can change the results of previous tests. For example, suppose at one point we
|
||||
* checked eUp and eLo, and decided that eUp.Sym.Org is barely above eLo. Then later, we
|
||||
* split eLo into two edges (eg. from a splice operation like this one). This can change
|
||||
* the result of the test so that now eUp.Sym.Org is incident to eLo, or barely below
|
||||
* it. We must correct this condition to maintain the dictionary invariants (otherwise
|
||||
* new edges might get inserted in the wrong place in the dictionary, and bad stuff will
|
||||
* happen). We fix the problem by just splicing the offending vertex into the other
|
||||
* edge.
|
||||
*/ {
|
||||
ActiveRegion regUp) /*
|
||||
* Check the upper and lower edge of "regUp", to make sure that the eUp.Sym.Org is above
|
||||
* eLo, or eLo.Sym.Org is below eUp (depending on which destination is rightmost).
|
||||
* Theoretically, this should always be true. However, splitting an edge into two pieces
|
||||
* can change the results of previous tests. For example, suppose at one point we
|
||||
* checked eUp and eLo, and decided that eUp.Sym.Org is barely above eLo. Then later, we
|
||||
* split eLo into two edges (eg. from a splice operation like this one). This can change
|
||||
* the result of the test so that now eUp.Sym.Org is incident to eLo, or barely below
|
||||
* it. We must correct this condition to maintain the dictionary invariants (otherwise
|
||||
* new edges might get inserted in the wrong place in the dictionary, and bad stuff will
|
||||
* happen). We fix the problem by just splicing the offending vertex into the other
|
||||
* edge.
|
||||
*/ {
|
||||
ActiveRegion regLo = RegionBelow(regUp);
|
||||
GLUhalfEdge eUp = regUp.eUp;
|
||||
GLUhalfEdge eLo = regLo.eUp;
|
||||
@@ -539,13 +539,13 @@ class Sweep {
|
||||
}
|
||||
|
||||
static boolean CheckForIntersect(GLUtessellatorImpl tess,
|
||||
ActiveRegion regUp) /*
|
||||
* Check the upper and lower edges of the given region to see if they intersect. If so,
|
||||
* create the intersection and add it to the data structures. Returns true if adding the
|
||||
* new intersection resulted in a recursive call to AddRightEdges(); in this case all
|
||||
* "dirty" regions have been checked for intersections, and possibly regUp has been
|
||||
* deleted.
|
||||
*/ {
|
||||
ActiveRegion regUp) /*
|
||||
* Check the upper and lower edges of the given region to see if they intersect. If so,
|
||||
* create the intersection and add it to the data structures. Returns true if adding the
|
||||
* new intersection resulted in a recursive call to AddRightEdges(); in this case all
|
||||
* "dirty" regions have been checked for intersections, and possibly regUp has been
|
||||
* deleted.
|
||||
*/ {
|
||||
ActiveRegion regLo = RegionBelow(regUp);
|
||||
GLUhalfEdge eUp = regUp.eUp;
|
||||
GLUhalfEdge eLo = regLo.eUp;
|
||||
@@ -613,7 +613,7 @@ class Sweep {
|
||||
}
|
||||
|
||||
if ((!Geom.VertEq(dstUp, tess.event) && Geom.EdgeSign(dstUp, tess.event, isect) >= 0)
|
||||
|| (!Geom.VertEq(dstLo, tess.event) && Geom.EdgeSign(dstLo, tess.event, isect) <= 0)) {
|
||||
|| (!Geom.VertEq(dstLo, tess.event) && Geom.EdgeSign(dstLo, tess.event, isect) <= 0)) {
|
||||
/*
|
||||
* Very unusual -- the new upper or lower edge would pass on the wrong side of the sweep event, or through
|
||||
* it. This can happen due to very small numerical errors in the intersection calculation.
|
||||
@@ -685,12 +685,12 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void WalkDirtyRegions(GLUtessellatorImpl tess,
|
||||
ActiveRegion regUp) /*
|
||||
* When the upper or lower edge of any region changes, the region is marked "dirty".
|
||||
* This routine walks through all the dirty regions and makes sure that the dictionary
|
||||
* invariants are satisfied (see the comments at the beginning of this file). Of course
|
||||
* new dirty regions can be created as we make changes to restore the invariants.
|
||||
*/ {
|
||||
ActiveRegion regUp) /*
|
||||
* When the upper or lower edge of any region changes, the region is marked "dirty".
|
||||
* This routine walks through all the dirty regions and makes sure that the dictionary
|
||||
* invariants are satisfied (see the comments at the beginning of this file). Of course
|
||||
* new dirty regions can be created as we make changes to restore the invariants.
|
||||
*/ {
|
||||
ActiveRegion regLo = RegionBelow(regUp);
|
||||
GLUhalfEdge eUp, eLo;
|
||||
|
||||
@@ -735,8 +735,8 @@ class Sweep {
|
||||
}
|
||||
if (eUp.Org != eLo.Org) {
|
||||
if (eUp.Sym.Org != eLo.Sym.Org && !regUp.fixUpperEdge
|
||||
&& !regLo.fixUpperEdge
|
||||
&& (eUp.Sym.Org == tess.event || eLo.Sym.Org == tess.event)) {
|
||||
&& !regLo.fixUpperEdge
|
||||
&& (eUp.Sym.Org == tess.event || eLo.Sym.Org == tess.event)) {
|
||||
/*
|
||||
* When all else fails in CheckForIntersect(), it uses tess.event as the intersection location. To
|
||||
* make this possible, it requires that tess.event lie between the upper and lower edges, and also
|
||||
@@ -767,31 +767,31 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void ConnectRightVertex(GLUtessellatorImpl tess, ActiveRegion regUp,
|
||||
GLUhalfEdge eBottomLeft) /*
|
||||
* Purpose: connect a "right" vertex vEvent (one where all edges go left) to the
|
||||
* unprocessed portion of the mesh. Since there are no right-going edges, two
|
||||
* regions (one above vEvent and one below) are being merged into one. "regUp" is
|
||||
* the upper of these two regions. There are two reasons for doing this (adding a
|
||||
* right-going edge): - if the two regions being merged are "inside", we must add
|
||||
* an edge to keep them separated (the combined region would not be monotone). - in
|
||||
* any case, we must leave some record of vEvent in the dictionary, so that we can
|
||||
* merge vEvent with features that we have not seen yet. For example, maybe there
|
||||
* is a vertical edge which passes just to the right of vEvent; we would like to
|
||||
* splice vEvent into this edge. However, we don't want to connect vEvent to just
|
||||
* any vertex. We don''t want the new edge to cross any other edges; otherwise we
|
||||
* will create intersection vertices even when the input data had no
|
||||
* self-intersections. (This is a bad thing; if the user's input data has no
|
||||
* intersections, we don't want to generate any false intersections ourselves.) Our
|
||||
* eventual goal is to connect vEvent to the leftmost unprocessed vertex of the
|
||||
* combined region (the union of regUp and regLo). But because of unseen vertices
|
||||
* with all right-going edges, and also new vertices which may be created by edge
|
||||
* intersections, we don''t know where that leftmost unprocessed vertex is. In the
|
||||
* meantime, we connect vEvent to the closest vertex of either chain, and mark the
|
||||
* region as "fixUpperEdge". This flag says to delete and reconnect this edge to
|
||||
* the next processed vertex on the boundary of the combined region. Quite possibly
|
||||
* the vertex we connected to will turn out to be the closest one, in which case we
|
||||
* won''t need to make any changes.
|
||||
*/ {
|
||||
GLUhalfEdge eBottomLeft) /*
|
||||
* Purpose: connect a "right" vertex vEvent (one where all edges go left) to the
|
||||
* unprocessed portion of the mesh. Since there are no right-going edges, two
|
||||
* regions (one above vEvent and one below) are being merged into one. "regUp" is
|
||||
* the upper of these two regions. There are two reasons for doing this (adding a
|
||||
* right-going edge): - if the two regions being merged are "inside", we must add
|
||||
* an edge to keep them separated (the combined region would not be monotone). - in
|
||||
* any case, we must leave some record of vEvent in the dictionary, so that we can
|
||||
* merge vEvent with features that we have not seen yet. For example, maybe there
|
||||
* is a vertical edge which passes just to the right of vEvent; we would like to
|
||||
* splice vEvent into this edge. However, we don't want to connect vEvent to just
|
||||
* any vertex. We don''t want the new edge to cross any other edges; otherwise we
|
||||
* will create intersection vertices even when the input data had no
|
||||
* self-intersections. (This is a bad thing; if the user's input data has no
|
||||
* intersections, we don't want to generate any false intersections ourselves.) Our
|
||||
* eventual goal is to connect vEvent to the leftmost unprocessed vertex of the
|
||||
* combined region (the union of regUp and regLo). But because of unseen vertices
|
||||
* with all right-going edges, and also new vertices which may be created by edge
|
||||
* intersections, we don''t know where that leftmost unprocessed vertex is. In the
|
||||
* meantime, we connect vEvent to the closest vertex of either chain, and mark the
|
||||
* region as "fixUpperEdge". This flag says to delete and reconnect this edge to
|
||||
* the next processed vertex on the boundary of the combined region. Quite possibly
|
||||
* the vertex we connected to will turn out to be the closest one, in which case we
|
||||
* won''t need to make any changes.
|
||||
*/ {
|
||||
GLUhalfEdge eNew;
|
||||
GLUhalfEdge eTopLeft = eBottomLeft.Onext;
|
||||
ActiveRegion regLo = RegionBelow(regUp);
|
||||
@@ -854,10 +854,10 @@ class Sweep {
|
||||
private static final boolean TOLERANCE_NONZERO = false;
|
||||
|
||||
static void ConnectLeftDegenerate(GLUtessellatorImpl tess, ActiveRegion regUp,
|
||||
GLUvertex vEvent) /*
|
||||
* The event vertex lies exacty on an already-processed edge or vertex. Adding the new
|
||||
* vertex involves splicing it into the already-processed part of the mesh.
|
||||
*/ {
|
||||
GLUvertex vEvent) /*
|
||||
* The event vertex lies exacty on an already-processed edge or vertex. Adding the new
|
||||
* vertex involves splicing it into the already-processed part of the mesh.
|
||||
*/ {
|
||||
GLUhalfEdge e, eTopLeft, eTopRight, eLast;
|
||||
ActiveRegion reg;
|
||||
|
||||
@@ -912,16 +912,16 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void ConnectLeftVertex(GLUtessellatorImpl tess,
|
||||
GLUvertex vEvent) /*
|
||||
* Purpose: connect a "left" vertex (one where both edges go right) to the processed
|
||||
* portion of the mesh. Let R be the active region containing vEvent, and let U and L be
|
||||
* the upper and lower edge chains of R. There are two possibilities: - the normal case:
|
||||
* split R into two regions, by connecting vEvent to the rightmost vertex of U or L lying
|
||||
* to the left of the sweep line - the degenerate case: if vEvent is close enough to U or
|
||||
* L, we merge vEvent into that edge chain. The subcases are: - merging with the rightmost
|
||||
* vertex of U or L - merging with the active edge of U or L - merging with an
|
||||
* already-processed portion of U or L
|
||||
*/ {
|
||||
GLUvertex vEvent) /*
|
||||
* Purpose: connect a "left" vertex (one where both edges go right) to the processed
|
||||
* portion of the mesh. Let R be the active region containing vEvent, and let U and L be
|
||||
* the upper and lower edge chains of R. There are two possibilities: - the normal case:
|
||||
* split R into two regions, by connecting vEvent to the rightmost vertex of U or L lying
|
||||
* to the left of the sweep line - the degenerate case: if vEvent is close enough to U or
|
||||
* L, we merge vEvent into that edge chain. The subcases are: - merging with the rightmost
|
||||
* vertex of U or L - merging with the active edge of U or L - merging with an
|
||||
* already-processed portion of U or L
|
||||
*/ {
|
||||
ActiveRegion regUp, regLo, reg;
|
||||
GLUhalfEdge eUp, eLo, eNew;
|
||||
ActiveRegion tmp = new ActiveRegion();
|
||||
@@ -975,10 +975,10 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void SweepEvent(GLUtessellatorImpl tess,
|
||||
GLUvertex vEvent) /*
|
||||
* Does everything necessary when the sweep line crosses a vertex. Updates the mesh and
|
||||
* the edge dictionary.
|
||||
*/ {
|
||||
GLUvertex vEvent) /*
|
||||
* Does everything necessary when the sweep line crosses a vertex. Updates the mesh and
|
||||
* the edge dictionary.
|
||||
*/ {
|
||||
ActiveRegion regUp, reg;
|
||||
GLUhalfEdge e, eTopLeft, eBottomLeft;
|
||||
|
||||
@@ -1059,13 +1059,13 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void InitEdgeDict(
|
||||
final GLUtessellatorImpl tess) /*
|
||||
* We maintain an ordering of edge intersections with the sweep line. This
|
||||
* order is maintained in a dynamic dictionary.
|
||||
*/ {
|
||||
final GLUtessellatorImpl tess) /*
|
||||
* We maintain an ordering of edge intersections with the sweep line. This
|
||||
* order is maintained in a dynamic dictionary.
|
||||
*/ {
|
||||
/* __gl_dictListNewDict */
|
||||
tess.dict = Dict
|
||||
.dictNewDict(tess, (frame, key1, key2) -> EdgeLeq(tess, (ActiveRegion) key1, (ActiveRegion) key2));
|
||||
.dictNewDict(tess, (frame, key1, key2) -> EdgeLeq(tess, (ActiveRegion) key1, (ActiveRegion) key2));
|
||||
if (tess.dict == null) throw new RuntimeException();
|
||||
|
||||
AddSentinel(tess, -SENTINEL_COORD);
|
||||
@@ -1095,9 +1095,9 @@ class Sweep {
|
||||
}
|
||||
|
||||
static void RemoveDegenerateEdges(
|
||||
GLUtessellatorImpl tess) /*
|
||||
* Remove zero-length edges, and contours with fewer than 3 vertices.
|
||||
*/ {
|
||||
GLUtessellatorImpl tess) /*
|
||||
* Remove zero-length edges, and contours with fewer than 3 vertices.
|
||||
*/ {
|
||||
GLUhalfEdge e, eNext, eLnext;
|
||||
GLUhalfEdge eHead = tess.mesh.eHead;
|
||||
|
||||
@@ -1132,10 +1132,10 @@ class Sweep {
|
||||
}
|
||||
|
||||
static boolean InitPriorityQ(
|
||||
GLUtessellatorImpl tess) /*
|
||||
* Insert all vertices into the priority queue which determines the order in which
|
||||
* vertices cross the sweep line.
|
||||
*/ {
|
||||
GLUtessellatorImpl tess) /*
|
||||
* Insert all vertices into the priority queue which determines the order in which
|
||||
* vertices cross the sweep line.
|
||||
*/ {
|
||||
PriorityQ pq;
|
||||
GLUvertex v, vHead;
|
||||
|
||||
@@ -1163,16 +1163,16 @@ class Sweep {
|
||||
}
|
||||
|
||||
static boolean RemoveDegenerateFaces(
|
||||
GLUmesh mesh) /*
|
||||
* Delete any degenerate faces with only two edges. WalkDirtyRegions() will catch almost all
|
||||
* of these, but it won't catch degenerate faces produced by splice operations on
|
||||
* already-processed edges. The two places this can happen are in FinishLeftRegions(), when we
|
||||
* splice in a "temporary" edge produced by ConnectRightVertex(), and in CheckForLeftSplice(),
|
||||
* where we splice already-processed edges to ensure that our dictionary invariants are not
|
||||
* violated by numerical errors. In both these cases it is *very* dangerous to delete the
|
||||
* offending edge at the time, since one of the routines further up the stack will sometimes
|
||||
* be keeping a pointer to that edge.
|
||||
*/ {
|
||||
GLUmesh mesh) /*
|
||||
* Delete any degenerate faces with only two edges. WalkDirtyRegions() will catch almost all
|
||||
* of these, but it won't catch degenerate faces produced by splice operations on
|
||||
* already-processed edges. The two places this can happen are in FinishLeftRegions(), when we
|
||||
* splice in a "temporary" edge produced by ConnectRightVertex(), and in CheckForLeftSplice(),
|
||||
* where we splice already-processed edges to ensure that our dictionary invariants are not
|
||||
* violated by numerical errors. In both these cases it is *very* dangerous to delete the
|
||||
* offending edge at the time, since one of the routines further up the stack will sometimes
|
||||
* be keeping a pointer to that edge.
|
||||
*/ {
|
||||
GLUface f, fNext;
|
||||
GLUhalfEdge e;
|
||||
|
||||
@@ -1192,12 +1192,12 @@ class Sweep {
|
||||
}
|
||||
|
||||
public static boolean __gl_computeInterior(
|
||||
GLUtessellatorImpl tess) /*
|
||||
* __gl_computeInterior( tess ) computes the planar arrangement specified by the
|
||||
* given contours, and further subdivides this arrangement into regions. Each
|
||||
* region is marked "inside" if it belongs to the polygon, according to the rule
|
||||
* given by tess.windingRule. Each interior region is guaranteed be monotone.
|
||||
*/ {
|
||||
GLUtessellatorImpl tess) /*
|
||||
* __gl_computeInterior( tess ) computes the planar arrangement specified by the
|
||||
* given contours, and further subdivides this arrangement into regions. Each
|
||||
* region is marked "inside" if it belongs to the polygon, according to the rule
|
||||
* given by tess.windingRule. Each interior region is guaranteed be monotone.
|
||||
*/ {
|
||||
GLUvertex v, vNext;
|
||||
|
||||
tess.fatalError = false;
|
||||
|
||||
@@ -82,7 +82,7 @@ class TessMono {
|
||||
* progress even when some triangles are CW, given that the upper and lower chains are truly monotone.
|
||||
*/
|
||||
while (lo.Lnext != up
|
||||
&& (Geom.EdgeGoesLeft(lo.Lnext) || Geom.EdgeSign(lo.Org, lo.Sym.Org, lo.Lnext.Sym.Org) <= 0)) {
|
||||
&& (Geom.EdgeGoesLeft(lo.Lnext) || Geom.EdgeSign(lo.Org, lo.Sym.Org, lo.Lnext.Sym.Org) <= 0)) {
|
||||
GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(lo.Lnext, lo);
|
||||
if (tempHalfEdge == null) return false;
|
||||
lo = tempHalfEdge.Sym;
|
||||
@@ -90,8 +90,8 @@ class TessMono {
|
||||
lo = lo.Onext.Sym;
|
||||
} else {
|
||||
/* lo.Org is on the left. We can make CCW triangles from up.Sym.Org. */
|
||||
while (lo.Lnext != up && (Geom.EdgeGoesRight(up.Onext.Sym)
|
||||
|| Geom.EdgeSign(up.Sym.Org, up.Org, up.Onext.Sym.Org) >= 0)) {
|
||||
while (lo.Lnext != up
|
||||
&& (Geom.EdgeGoesRight(up.Onext.Sym) || Geom.EdgeSign(up.Sym.Org, up.Org, up.Onext.Sym.Org) >= 0)) {
|
||||
GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(up, up.Onext.Sym);
|
||||
if (tempHalfEdge == null) return false;
|
||||
up = tempHalfEdge.Sym;
|
||||
|
||||
@@ -294,8 +294,16 @@ public class Matrix2f extends Matrix implements Serializable {
|
||||
*/
|
||||
public String toString() {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append(m00).append(' ').append(m10).append(' ').append('\n');
|
||||
buf.append(m01).append(' ').append(m11).append(' ').append('\n');
|
||||
buf.append(m00)
|
||||
.append(' ')
|
||||
.append(m10)
|
||||
.append(' ')
|
||||
.append('\n');
|
||||
buf.append(m01)
|
||||
.append(' ')
|
||||
.append(m11)
|
||||
.append(' ')
|
||||
.append('\n');
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -317,9 +317,27 @@ public class Matrix3f extends Matrix implements Serializable {
|
||||
*/
|
||||
public String toString() {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append('\n');
|
||||
buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append('\n');
|
||||
buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append('\n');
|
||||
buf.append(m00)
|
||||
.append(' ')
|
||||
.append(m10)
|
||||
.append(' ')
|
||||
.append(m20)
|
||||
.append(' ')
|
||||
.append('\n');
|
||||
buf.append(m01)
|
||||
.append(' ')
|
||||
.append(m11)
|
||||
.append(' ')
|
||||
.append(m21)
|
||||
.append(' ')
|
||||
.append('\n');
|
||||
buf.append(m02)
|
||||
.append(' ')
|
||||
.append(m12)
|
||||
.append(' ')
|
||||
.append(m22)
|
||||
.append(' ')
|
||||
.append('\n');
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,38 @@ public class Matrix4f extends Matrix implements Serializable {
|
||||
*/
|
||||
public String toString() {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append(m30).append('\n');
|
||||
buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append(m31).append('\n');
|
||||
buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append(m32).append('\n');
|
||||
buf.append(m03).append(' ').append(m13).append(' ').append(m23).append(' ').append(m33).append('\n');
|
||||
buf.append(m00)
|
||||
.append(' ')
|
||||
.append(m10)
|
||||
.append(' ')
|
||||
.append(m20)
|
||||
.append(' ')
|
||||
.append(m30)
|
||||
.append('\n');
|
||||
buf.append(m01)
|
||||
.append(' ')
|
||||
.append(m11)
|
||||
.append(' ')
|
||||
.append(m21)
|
||||
.append(' ')
|
||||
.append(m31)
|
||||
.append('\n');
|
||||
buf.append(m02)
|
||||
.append(' ')
|
||||
.append(m12)
|
||||
.append(' ')
|
||||
.append(m22)
|
||||
.append(' ')
|
||||
.append(m32)
|
||||
.append('\n');
|
||||
buf.append(m03)
|
||||
.append(' ')
|
||||
.append(m13)
|
||||
.append(' ')
|
||||
.append(m23)
|
||||
.append(' ')
|
||||
.append(m33)
|
||||
.append('\n');
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
@@ -687,17 +715,17 @@ public class Matrix4f extends Matrix implements Serializable {
|
||||
*/
|
||||
public float determinant() {
|
||||
float f = m00 * ((m11 * m22 * m33 + m12 * m23 * m31 + m13 * m21 * m32) - m13 * m22 * m31
|
||||
- m11 * m23 * m32
|
||||
- m12 * m21 * m33);
|
||||
- m11 * m23 * m32
|
||||
- m12 * m21 * m33);
|
||||
f -= m01 * ((m10 * m22 * m33 + m12 * m23 * m30 + m13 * m20 * m32) - m13 * m22 * m30
|
||||
- m10 * m23 * m32
|
||||
- m12 * m20 * m33);
|
||||
- m10 * m23 * m32
|
||||
- m12 * m20 * m33);
|
||||
f += m02 * ((m10 * m21 * m33 + m11 * m23 * m30 + m13 * m20 * m31) - m13 * m21 * m30
|
||||
- m10 * m23 * m31
|
||||
- m11 * m20 * m33);
|
||||
- m10 * m23 * m31
|
||||
- m11 * m20 * m33);
|
||||
f -= m03 * ((m10 * m21 * m32 + m11 * m22 * m30 + m12 * m20 * m31) - m12 * m21 * m30
|
||||
- m10 * m22 * m31
|
||||
- m11 * m20 * m32);
|
||||
- m10 * m22 * m31
|
||||
- m11 * m20 * m32);
|
||||
return f;
|
||||
}
|
||||
|
||||
@@ -707,7 +735,7 @@ public class Matrix4f extends Matrix implements Serializable {
|
||||
* @return result
|
||||
*/
|
||||
private static float determinant3x3(float t00, float t01, float t02, float t10, float t11, float t12, float t20,
|
||||
float t21, float t22) {
|
||||
float t21, float t22) {
|
||||
return t00 * (t11 * t22 - t12 * t21) + t01 * (t12 * t20 - t10 * t22) + t02 * (t10 * t21 - t11 * t20);
|
||||
}
|
||||
|
||||
@@ -740,94 +768,94 @@ public class Matrix4f extends Matrix implements Serializable {
|
||||
// first row
|
||||
float t00 = determinant3x3(src.m11, src.m12, src.m13, src.m21, src.m22, src.m23, src.m31, src.m32, src.m33);
|
||||
float t01 = -determinant3x3(
|
||||
src.m10,
|
||||
src.m12,
|
||||
src.m13,
|
||||
src.m20,
|
||||
src.m22,
|
||||
src.m23,
|
||||
src.m30,
|
||||
src.m32,
|
||||
src.m33);
|
||||
src.m10,
|
||||
src.m12,
|
||||
src.m13,
|
||||
src.m20,
|
||||
src.m22,
|
||||
src.m23,
|
||||
src.m30,
|
||||
src.m32,
|
||||
src.m33);
|
||||
float t02 = determinant3x3(src.m10, src.m11, src.m13, src.m20, src.m21, src.m23, src.m30, src.m31, src.m33);
|
||||
float t03 = -determinant3x3(
|
||||
src.m10,
|
||||
src.m11,
|
||||
src.m12,
|
||||
src.m20,
|
||||
src.m21,
|
||||
src.m22,
|
||||
src.m30,
|
||||
src.m31,
|
||||
src.m32);
|
||||
src.m10,
|
||||
src.m11,
|
||||
src.m12,
|
||||
src.m20,
|
||||
src.m21,
|
||||
src.m22,
|
||||
src.m30,
|
||||
src.m31,
|
||||
src.m32);
|
||||
// second row
|
||||
float t10 = -determinant3x3(
|
||||
src.m01,
|
||||
src.m02,
|
||||
src.m03,
|
||||
src.m21,
|
||||
src.m22,
|
||||
src.m23,
|
||||
src.m31,
|
||||
src.m32,
|
||||
src.m33);
|
||||
src.m01,
|
||||
src.m02,
|
||||
src.m03,
|
||||
src.m21,
|
||||
src.m22,
|
||||
src.m23,
|
||||
src.m31,
|
||||
src.m32,
|
||||
src.m33);
|
||||
float t11 = determinant3x3(src.m00, src.m02, src.m03, src.m20, src.m22, src.m23, src.m30, src.m32, src.m33);
|
||||
float t12 = -determinant3x3(
|
||||
src.m00,
|
||||
src.m01,
|
||||
src.m03,
|
||||
src.m20,
|
||||
src.m21,
|
||||
src.m23,
|
||||
src.m30,
|
||||
src.m31,
|
||||
src.m33);
|
||||
src.m00,
|
||||
src.m01,
|
||||
src.m03,
|
||||
src.m20,
|
||||
src.m21,
|
||||
src.m23,
|
||||
src.m30,
|
||||
src.m31,
|
||||
src.m33);
|
||||
float t13 = determinant3x3(src.m00, src.m01, src.m02, src.m20, src.m21, src.m22, src.m30, src.m31, src.m32);
|
||||
// third row
|
||||
float t20 = determinant3x3(src.m01, src.m02, src.m03, src.m11, src.m12, src.m13, src.m31, src.m32, src.m33);
|
||||
float t21 = -determinant3x3(
|
||||
src.m00,
|
||||
src.m02,
|
||||
src.m03,
|
||||
src.m10,
|
||||
src.m12,
|
||||
src.m13,
|
||||
src.m30,
|
||||
src.m32,
|
||||
src.m33);
|
||||
src.m00,
|
||||
src.m02,
|
||||
src.m03,
|
||||
src.m10,
|
||||
src.m12,
|
||||
src.m13,
|
||||
src.m30,
|
||||
src.m32,
|
||||
src.m33);
|
||||
float t22 = determinant3x3(src.m00, src.m01, src.m03, src.m10, src.m11, src.m13, src.m30, src.m31, src.m33);
|
||||
float t23 = -determinant3x3(
|
||||
src.m00,
|
||||
src.m01,
|
||||
src.m02,
|
||||
src.m10,
|
||||
src.m11,
|
||||
src.m12,
|
||||
src.m30,
|
||||
src.m31,
|
||||
src.m32);
|
||||
src.m00,
|
||||
src.m01,
|
||||
src.m02,
|
||||
src.m10,
|
||||
src.m11,
|
||||
src.m12,
|
||||
src.m30,
|
||||
src.m31,
|
||||
src.m32);
|
||||
// fourth row
|
||||
float t30 = -determinant3x3(
|
||||
src.m01,
|
||||
src.m02,
|
||||
src.m03,
|
||||
src.m11,
|
||||
src.m12,
|
||||
src.m13,
|
||||
src.m21,
|
||||
src.m22,
|
||||
src.m23);
|
||||
src.m01,
|
||||
src.m02,
|
||||
src.m03,
|
||||
src.m11,
|
||||
src.m12,
|
||||
src.m13,
|
||||
src.m21,
|
||||
src.m22,
|
||||
src.m23);
|
||||
float t31 = determinant3x3(src.m00, src.m02, src.m03, src.m10, src.m12, src.m13, src.m20, src.m22, src.m23);
|
||||
float t32 = -determinant3x3(
|
||||
src.m00,
|
||||
src.m01,
|
||||
src.m03,
|
||||
src.m10,
|
||||
src.m11,
|
||||
src.m13,
|
||||
src.m20,
|
||||
src.m21,
|
||||
src.m23);
|
||||
src.m00,
|
||||
src.m01,
|
||||
src.m03,
|
||||
src.m10,
|
||||
src.m11,
|
||||
src.m13,
|
||||
src.m20,
|
||||
src.m21,
|
||||
src.m23);
|
||||
float t33 = determinant3x3(src.m00, src.m01, src.m02, src.m10, src.m11, src.m12, src.m20, src.m21, src.m22);
|
||||
|
||||
// transpose and divide by the determinant
|
||||
|
||||
@@ -330,10 +330,10 @@ public class Quaternion extends Vector implements ReadableVector4f {
|
||||
public static Quaternion mul(Quaternion left, Quaternion right, Quaternion dest) {
|
||||
if (dest == null) dest = new Quaternion();
|
||||
dest.set(
|
||||
left.x * right.w + left.w * right.x + left.y * right.z - left.z * right.y,
|
||||
left.y * right.w + left.w * right.y + left.z * right.x - left.x * right.z,
|
||||
left.z * right.w + left.w * right.z + left.x * right.y - left.y * right.x,
|
||||
left.w * right.w - left.x * right.x - left.y * right.y - left.z * right.z);
|
||||
left.x * right.w + left.w * right.x + left.y * right.z - left.z * right.y,
|
||||
left.y * right.w + left.w * right.y + left.z * right.x - left.x * right.z,
|
||||
left.z * right.w + left.w * right.z + left.x * right.y - left.y * right.x,
|
||||
left.w * right.w - left.x * right.x - left.y * right.y - left.z * right.z);
|
||||
return dest;
|
||||
}
|
||||
|
||||
@@ -352,10 +352,10 @@ public class Quaternion extends Vector implements ReadableVector4f {
|
||||
// store on stack once for aliasing-safty
|
||||
if (dest == null) dest = new Quaternion();
|
||||
dest.set(
|
||||
(left.x * right.w - left.w * right.x - left.y * right.z + left.z * right.y) * n,
|
||||
(left.y * right.w - left.w * right.y - left.z * right.x + left.x * right.z) * n,
|
||||
(left.z * right.w - left.w * right.z - left.x * right.y + left.y * right.x) * n,
|
||||
(left.w * right.w + left.x * right.x + left.y * right.y + left.z * right.z) * n);
|
||||
(left.x * right.w - left.w * right.x - left.y * right.z + left.z * right.y) * n,
|
||||
(left.y * right.w - left.w * right.y - left.z * right.x + left.x * right.z) * n,
|
||||
(left.z * right.w - left.w * right.z - left.x * right.y + left.y * right.x) * n,
|
||||
(left.w * right.w + left.x * right.x + left.y * right.y + left.z * right.z) * n);
|
||||
|
||||
return dest;
|
||||
}
|
||||
@@ -423,7 +423,7 @@ public class Quaternion extends Vector implements ReadableVector4f {
|
||||
* Private method to perform the matrix-to-quaternion conversion
|
||||
*/
|
||||
private Quaternion setFromMat(float m00, float m01, float m02, float m10, float m11, float m12, float m20,
|
||||
float m21, float m22) {
|
||||
float m21, float m22) {
|
||||
|
||||
float s;
|
||||
float tr = m00 + m11 + m22;
|
||||
|
||||
@@ -150,9 +150,9 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f,
|
||||
if (dest == null) dest = new Vector3f();
|
||||
|
||||
dest.set(
|
||||
left.y * right.z - left.z * right.y,
|
||||
right.x * left.z - right.z * left.x,
|
||||
left.x * right.y - left.y * right.x);
|
||||
left.y * right.z - left.z * right.y,
|
||||
right.x * left.z - right.z * left.x,
|
||||
left.x * right.y - left.y * right.x);
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user