Jump to content
  • Advertisement
Sign in to follow this  
sixteen

assign name to a loaded mesh?

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

Ok, I know how to load a mesh in with DirectX, but I don't know how to assign a name to it in order to move it around. In Actionscript for Flash, when you loaded an object, you could also assign an instance name to it in the same command. Is this done through classes? If so, I would like to know how. I was also wondering if DirectX had some thing to put at the end of the name in order to move it on an axis. For instance, in Actionscript for Flash, you would go myObject._x = 5; and that would move it to that place on the x axis.

Share this post


Link to post
Share on other sites
Advertisement
(Disclaimer: I'm not familiar with exactly how DX does this stuff.) I think a Mesh isn't the object itself; you'd typically have a displayable object:
class Object {
Mesh mesh;
Vector3 position; // or Matrix33 orientation;
// ... etc
}

... and when you pass the mesh to DirectX for rendering you tell it where to put it using the orientation matrix.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!