Changeset 6309 in orxonox.OLD for trunk/src/lib/graphics/importer
- Timestamp:
- Dec 27, 2005, 2:28:15 AM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/Makefile.am
r6308 r6309 2 2 include $(MAINSRCDIR)/defs/include_paths.am 3 3 4 noinst_LIBRARIES = libORXimporter.a 4 noinst_LIBRARIES = libORXimporter.a libtc.a 5 5 6 6 libORXimporter_a_SOURCES = model.cc \ 7 tc.c \8 7 vertex_array_model.cc \ 9 8 static_model.cc \ … … 16 15 height_map.cc 17 16 17 libtc_a_SOURCES = tc.c 18 18 19 19 -
trunk/src/lib/graphics/importer/vertex_array_model.cc
r6308 r6309 52 52 this->setClassID(CL_MODEL, "VertexArrayModel"); 53 53 this->bFinalized = false; 54 55 // The acTC object generating this Model. // 56 ACTCData *tc; 57 tc = actcNew(); 58 if(tc == NULL) { 59 /* memory allocation failed */ 60 /* print error here and exit or whatever */ 61 } 62 63 // inputing the data of model to the tc 64 actcBeginInput(tc); 65 for(unsigned int i = 0; i < model.getTriangleCount(); i++) 66 actcAddTriangle(tc, model.getTriangles()[i].indexToVertices[0], model.getTriangles()[i].indexToVertices[1], model.getTriangles()[i].indexToVertices[2]); 67 actcEndInput(tc); 68 69 // importing the data to the new Model. 54 70 this->newStripe(); 55 71 … … 61 77 this->addTexCoor(model.getTexCoordArray()[i], model.getTexCoordArray()[i+1]); 62 78 63 // The acTC object generating this Model. // 64 ACTCData *tc; 65 tc = actcNew(); 66 if(tc == NULL) { 67 /* memory allocation failed */ 68 /* print error here and exit or whatever */ 69 } 70 71 // inputing the data of model to the tc 72 actcBeginInput(tc); 73 for(unsigned int i = 0; i < model.getTriangleCount(); i++) 74 actcAddTriangle(tc, model.getTriangles()[i].indexToVertices[0], model.getTriangles()[i].indexToVertices[1], model.getTriangles()[i].indexToVertices[2]); 75 actcEndInput(tc); 76 77 // importing the data to the new Model. 79 78 80 int prim; 79 81 unsigned int v1, v2, v3; … … 84 86 this->addIndice(v1); 85 87 this->addIndice(v2); 88 printf("%d\n", v1); 89 printf("%d\n", v2); 86 90 /* start a primitive of type "prim" with v1 and v2 */ 87 91 while(actcGetNextVert(tc, &v3) != ACTC_PRIM_COMPLETE) … … 89 93 /* continue primitive using v3 */ 90 94 this->addIndice(v3); 95 printf("%d\n", v3); 91 96 } 92 97 this->newStripe(); … … 96 101 this->finalize(); 97 102 } 103 98 104 99 105 /**
Note: See TracChangeset
for help on using the changeset viewer.