Jump to content
  • Advertisement
Sign in to follow this  

Translating a plane

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

I have these bounding plane and I want to give them a path, is there anyway I can multiple the plane's information (A,B,C,D) by a matrix to move it properly, or am I better off just multiplying the one point used creation of the Plane by a translation matrix then recreating the plane with the normal and the new translated vertex? -THACO

Share this post

Link to post
Share on other sites
Well, you have:
x.A + y.B + z.C = D
(where (x,y,z) is the old origin)

The new equation will be (assuming (A,B,C) is the normalized plane normal):
(x+tx).A + (y+ty).B + (z+tz).C = D'
(where (tx,ty,tz) is the translation, D' the new D, normal is unaffected by translation, so A, B and C remain the same)

x.A + y.B + z.C + tx.A + ty.B + tz.C = D'
D + tx.A + ty.B + tz.C = D'

so in the new equation (A', B', C', D'):
A' = A
B' = B
C' = C
D' = D + tx.A + ty.B + tz.C

Feel free to correct me if I'm wrong...


Edit: I would suggest going for the vertex/normal implementation anyway. That would allow you to rotate as well. I'm not sure if that is possible with just the equation.

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!