Jump to content
  • Advertisement
Sign in to follow this  

How to compare two GUIDS

This topic is 4303 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

Advertisement
x.GetType() == typeof(Mesh) checks if x is an instance of the Mesh class (it cannot, however, be another class that is derived from Mesh).

Also, simpler:


Mesh mesh = x as Mesh;
if (mesh != null) {
// x can be cast to a Mesh
}
else {
// x cannot be cast to a Mesh
}

Share this post


Link to post
Share on other sites
what i meant was that i was trying to load a mesh from an XFILE, and the X File was generated with a Maya Plugin. Im trying to cycle through that X File looking for mesh objects. But when i get the guid of the object in the X File, what should i compare that guid to, to figure out if its a mesh or not.
Thanx for the answers

Share this post


Link to post
Share on other sites
I've never really messed with X files, but from what I can tell from the d3dx headers, the GUID for a mesh object is defined as TID_D3DRMMesh. I could be totally wrong, and there may be a much better way to find mesh objects in an X file.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!