Jump to content
  • Advertisement
Sign in to follow this  
Hawkblood

How to get .x file info

This topic is 2096 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an x file with several subsets in the mesh object. I would like to reference each subset by its name, but I can't find a reliable way to do that. I thought when I loaded it, there would be some kind of information saved that would include the string name.... Maybe I'm smok'n something.

 

Does anyone know what I mean and how to do it?

Share this post


Link to post
Share on other sites
Advertisement

Seriously? No one can point me in the right direction? I know it can be done, I just don't know a good way to do it.......

 

-BUMP-

Share this post


Link to post
Share on other sites

D3DXFRAME frame;

frame.name;

 

If you don't mean frames then subsets are usually ID'ed by a DWORD.

Edited by EddieV223

Share this post


Link to post
Share on other sites

Hello.

 

Its the frame name in the .x file its like this here.

 

Frame Wheel05 {

 

FrameTransformMatrix {

-0.000001,0.000000,-2.116935,0.000000,-2.116935,0.000000,0.000000,0.000000,0.000000,2.116935,0.000000,0.000000,7.810452,-18.614912,387.071350,1.000000;;

}

Mesh {//here is your mesh for this frame name

4416;//number of vertices .

28.135689;0.000000;0.000000;,

26.438898;18.357489;9.622972;,

26.438898;0.000000;9.622972;,

26.438898;18.357489;9.622972;,

28.135689;0.000000;0.000000;,

28.135689;18.357489;0.000000;,

Share this post


Link to post
Share on other sites

Is there no way to get that without going through the file as text?

 

I have tried to read the file like a text file, but I keep getting EOF before the end; resulting in an incomplete list.....

Share this post


Link to post
Share on other sites

If the number is 10 or 13, you are at the end and start of a new line. I believe the order is 13 then 10 for Windows, 13 for Linux, and 10 for Mac*, depending on if it is using an actual newline (read: Enter style keypress) or if the program is just writing out a newline (which could vary).

 

* I may have Linux and Mac flipped.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!