View Full Version : Finding lines in a text File

11-16-2002, 03:04 AM
I have a model in .ase, I want to make a program to convert the .ase to .cpp so that i can use the model readily. 3 Things to this question.
#1, Is there any way to "search" the text file for a word? such as "MESH_NUMVERTEX", or do i have to bring in each character specifically and parse them together?
#2, If i Do have to parse, can someone give me an example of the code to do this?
#3, I was planning to put each of the verticies into a big matrix. But, there are 2001 verticies, 3840 faces. As far as I know, these wont fit... Any suggestions?

11-16-2002, 04:54 AM
Have you checked out how ASE model loaders work?

Here is a nice one with source:



11-16-2002, 05:53 AM
Reading it now, thanks a bunch!!!

11-16-2002, 07:13 AM
#3. It should fit, I've been working with something well in excess of 12000 triangles

11-16-2002, 12:43 PM
ImpactDNI: let us know how you get on!

11-16-2002, 07:09 PM
Heh, see the problem is, I'm looking through that ASE loader, and I'm not all that good at C++, (never taken a class, just been teaching myself) so most of the stuff in there is all new to me...
I wanna do it as simply as possible (even if it takes a long time to run), I want it to run, when it runs, it takes a ase, and turns it into a cpp, but the cpp is in my own format, so that i can easily link to that cpp in other code..