Jump to content
  • Advertisement
Sign in to follow this  
Narf the Mouse

Two different types of planes?

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

My understanding is, there's two different types of 3D planes. One uses a triangle (A, B, C) and then the plane lies along the triangle. That's comprehensible. The other uses a Normal and Distance along that normal? Which doesn't seem to make sense, as all the results would be perpendicular to the (0, 0, 0) vector.

I must be missing something. Google doesn't want to cough up an info page, either (although my search skills are notoriously lousy).

Thanks.

Edit: Wait, there's one defined by a triangle, one defined by a position and normal...Then why does SlimDX define theirs by a Normal vector and scalar Distance?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Narf the Mouse
Edit: Wait, there's one defined by a triangle, one defined by a position and normal...Then why does SlimDX define theirs by a Normal vector and scalar Distance?
If you represent a plane as a position and a normal, you are picking an arbitrary position on the plane. Given that the plane is by definition infinite, you can find a point on the plane so that it lies along the normal from the origin (i.e. the closest point on the plane to the origin). If you take that point, you can just calculate the distance between the point and the origin, since you can find the point again by multiplying the normal by the distance.

As such, it is just an alternate way to store a plane in point + normal form, and it saves a few bytes of data, as well as simplifying a few plane operations.

Share this post


Link to post
Share on other sites
Quote:
Original post by swiftcoder
Quote:
Original post by Narf the Mouse
Edit: Wait, there's one defined by a triangle, one defined by a position and normal...Then why does SlimDX define theirs by a Normal vector and scalar Distance?
If you represent a plane as a position and a normal, you are picking an arbitrary position on the plane. Given that the plane is by definition infinite, you can find a point on the plane so that it lies along the normal from the origin (i.e. the closest point on the plane to the origin). If you take that point, you can just calculate the distance between the point and the origin, since you can find the point again by multiplying the normal by the distance.

As such, it is just an alternate way to store a plane in point + normal form, and it saves a few bytes of data, as well as simplifying a few plane operations.

Ah, thanks. Makes sense.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!