Jump to content
  • Advertisement
Sign in to follow this  

Transform point by direction and axis

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

Hy. I have a function that transform 3d point of a solid from the 3d axis and 3d direction. The core of the function is:
C3DMatrix R;		
R.m_Z = vAxisY;
R.m_Y = (vAxisY ^ vDirection).Normalize();
R.m_X = R.m_Y ^ R.m_Z;

then multiply all points for this matrix. it works. My problem is that now i must transform the 2d points of a poliline from 2d axis amd 2d direction. Is possible to use the same tecnicque? Thanks

Share this post

Link to post
Share on other sites
The 2-d version of what you posted doesn't need an axis and a direction, just one or the other. For example:
matrix22 m;
m.x = axis;
m.y = perp(m.x);
Is that what you're looking for?

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!