#N canvas 354 229 717 634 10;
#X declare -lib Gem;
#X text 54 30 Class: geometric object;
#X obj 463 87 cnv 15 240 530 empty empty empty 20 12 0 14 #dce4fc #404040 0;
#X text 467 67 Example:;
#X obj 7 67 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 8 226 cnv 15 450 230 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X text 9 248 Inlets:;
#X obj 8 182 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X text 17 181 Arguments:;
#X text 452 8 GEM object;
#X obj 474 96 cnv 15 220 430 empty empty empty 20 12 0 14 #64fc64 #404040 0;
#X obj 474 533 cnv 15 80 30 empty empty empty 20 12 0 14 #14e814 #404040 0;
#X obj 477 103 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000;
#X obj 477 121 openpanel;
#X msg 477 142 read \$1;
#X text 27 268 Inlet 1: message: read <filename.obj>;
#X msg 511 429 backend OBJ;
#X msg 520 449 backend ASSIMP3;
#X msg 565 474 backend;
#X obj 477 192 t a;
#X text 602 491 query backends;
#N canvas 484 243 450 300 META 0;
#X obj 10 25 declare -lib Gem;
#X text 10 135 AUTHOR IOhannes m zmölnig;
#X text 10 155 LICENSE GPL-2.0-or-later;
#X text 10 45 DESCRIPTION load an Alias/Wavefront-Model to various tables.;
#X text 10 65 KEYWORDS Gem openGL;
#X text 20 85 INLET_0 read position color normal texture backend ...;
#X text 20 115 OUTLET_0 vertices;
#X restore 558 8 pd META;
#X obj 8 464 cnv 15 450 30 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 41 467 _backendinfo \$0 model;
#N canvas 393 109 534 459 properties 0;
#X msg 39 175 enumProps;
#X text 107 177 print available properties (for reading and/or writing);
#X msg 61 214 get texheight texwidth;
#X msg 84 245 set usematerial 1;
#X text 209 246 set an (available) named properties;
#X text 208 215 get (available) named properties;
#X msg 84 310 setProps usematerial 1;
#X text 232 309 store a named property for applying LATER;
#X msg 84 340 applyProps;
#X text 162 340 apply stored properties;
#X msg 84 370 clearProps;
#X text 161 366 clear stored properties;
#X text 26 35 ==========================;
#X text 26 22 getting/setting properties;
#X text 26 68 depending on the used backend for loading a model \, different properties might be available., f 61;
#X text 30 104 properties can only be enumerated after a model has been loaded (and thus the loader-backend has been determined);
#X obj 39 405 s \$0-ctl;
#X connect 0 0 16 0;
#X connect 2 0 16 0;
#X connect 3 0 16 0;
#X connect 6 0 16 0;
#X connect 8 0 16 0;
#X connect 10 0 16 0;
#X restore 353 468 pd properties;
#X msg 621 474 loader;
#X obj 13 508 table table_posX;
#X obj 13 528 table table_posY;
#X obj 13 548 table table_posZ;
#X obj 116 508 table table_normalX;
#X obj 116 528 table table_normalY;
#X obj 238 508 table table_colorR;
#X obj 238 528 table table_colorG;
#X obj 238 548 table table_colorB;
#X obj 477 574 print;
#X obj 518 505 r \$0-ctl;
#X text 13 411 Outlets:;
#X obj 238 568 table table_colorA;
#X obj 354 508 table table_texU;
#X obj 354 528 table table_texV;
#X text 7 79 Description: loads a 3D model into a table;
#X text 33 14 Synopsis: [modelfiler];
#X msg 501 244 symbol table_pos;
#X msg 501 264 position \$1X \$1Y \$1Z;
#X msg 513 292 symbol table_color;
#X msg 513 312 color \$1R \$1G \$1B \$1A;
#X msg 520 336 symbol table_normal;
#X msg 520 356 normal \$1X \$1Y \$1Z;
#X msg 530 380 symbol table_tex;
#X msg 530 400 texture \$1U \$1V;
#X text 45 607 see also:;
#X obj 113 605 gemvertexbuffer;
#X obj 13 568 table table_pos;
#X msg 491 216 position table_pos;
#X text 27 293 Inlet 1: message: position <table> or <tableX> <tableY> <tableZ>, f 66;
#X text 27 309 Inlet 1: message: color <table> or <tableR> <tableG> <tableB> <tableA>, f 71;
#X text 27 325 Inlet 1: message: normal <table> or <tableX> <tableY> <tableZ>, f 63;
#X text 27 341 Inlet 1: message: texture <table> or <tableU> <tableV>;
#X obj 477 424 t a;
#X obj 477 499 t a;
#X text 633 247 separate tables, f 8;
#X text 612 211 interleaved values, f 11;
#X obj 116 548 table table_normalZ;
#X msg 495 168 read examples/data/venus.obj;
#X text 16 96 The [modelfiler] object loads the data from a 3D model into tables \, so they can be used e.g. with VBOs (e.g. [gemvertexbuffer]). Set tables first \, data is written when reading a file. Single table arg yields interleaved values (e.g. x y z x y z... per vertex) \, multiple args write to separate tables., f 67;
#X text 63 192 <none>;
#X obj 477 539 modelfiler;
#X text 29 430 Outlet 1: vertices float: number of vertices copied to tables, f 63;
#X text 27 369 Inlet 1: message: backend <symbol>: choose which backend to use first to read the model, f 69;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 13 0 18 0;
#X connect 15 0 58 0;
#X connect 16 0 58 0;
#X connect 17 0 58 0;
#X connect 18 0 57 0;
#X connect 24 0 58 0;
#X connect 34 0 65 0;
#X connect 41 0 42 0;
#X connect 42 0 57 0;
#X connect 43 0 44 0;
#X connect 44 0 57 0;
#X connect 45 0 46 0;
#X connect 46 0 57 0;
#X connect 47 0 48 0;
#X connect 48 0 57 0;
#X connect 52 0 57 0;
#X connect 57 0 58 0;
#X connect 58 0 65 0;
#X connect 62 0 18 0;
#X connect 65 0 33 0;
