Sign in to follow this  

assign name to a loaded mesh?

This topic is 4076 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
(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

This topic is 4076 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this