• Advertisement
Sign in to follow this  

3d mesh editor

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

Hello guys, I am trying to make a 3d mesh editor. In which i need to select a single vertex and move it around intutively. The problem is with moving selected vertex in a 2D plane when the camera or mesh have been rotated. I can select the vertex but i dont know which plane i should move it in or in other words which coordinates of the mesh vertex to modify once the vertex has been selected and mouse is being used to place it somewhere. Is there any way i can find the plane in which the vertex should be moved when camera is pointed in a particular direction Thanks

Share this post


Link to post
Share on other sites
Advertisement
Every modelling tool I have seen chooses the plane orthogonal to the camera's orientation. In geometrical terms, this means that the camera's viewing vector is the normal to the plane in which motion is allowed. It's that simple.

So to form an orthonormal basis for the plane of motion, take:

vertical_basis_vector = Normalise(camera_up_vector)
horizontal_basis_vector = Normalise(CrossProduct(camera_up_vector, camera_view_vector))

Admiral

Share this post


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

  • Advertisement