0

Hello All,

Well this is not exactly a C++ question. More of a math one. But I've seen many guys work on GameDev in this forum. So, posting it here.

Here it goes:
I was reading an article to check if a point in view frustum and i read some DX article and i read the following:

DotProductPlane

This article mentions:
*Computes the dot product of a plane and a 3D vector. *

Now, i'm not able to understand what's the dot product between a plane and a vector.
Can anyone please explain this?

Thanks!
PS: Sorry for posting it in the C++ forum

3
Contributors
3
Replies
16
Views
3 Years
Discussion Span
Last Post by myk45
0

The page says exactly what it is...

Which translates into human readable text as: the dot product gives the distance between points in space.
In this case that's the distance between a point and a plane.

1

Planes are represented in the general linear form. This form can be understood as a normal vector n = (a,b,c) and a distance d between the plane and the origin, along the normal vector. So, for any point (x,y,z), you can compute the following:

a*x + b*y + c*z + d

which will be 0 if the point is on the plane, and it will be positive or negative, depending on whether the point is above or below the plane. This is the operation that DX calls "dot product of a plane and a vector". It is essentially the dot product of the vector with the normal of the plane, and then, offsetted by the distance of the plane to the origin, such that you get these negative (below), zero (on plane) and positive (above) values.

0

@mike_2000_17

This is the operation that DX calls "dot product of a plane and a vector". It is essentially the dot product of the vector with the normal of the plane, and then, offsetted by the distance of the plane to the origin, such that you get these negative (below), zero (on plane) and positive (above) values.

That was precisely what i was looking for. Thanks!

Edited by myk45

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.