The plane constant is part of the plane equation…
Normal * Vector + pc = 0
The * is a dot product so it can also be seen as…
Normal.xVector.x + Normal.yVector.y + Normal.z*Vector.z + pc = 0
The Normal points away from the plane, the pc is the plane constant and the Vector points to the camera, but to do this the camera needs to be set relative to one of the vertices of a face (a point on the plane), so you have to subtract one of vertices from the cameras transformed position in object space to get this vector, if you are not doing it you should be to get better results, you may be drawing more polygons then you need to. If we normalize the Vector pointing to the camera we can then retrieve the cosine value between the normal and vector…
cosine = Dot (Vector, Normalize (Camera - Vertex[1]);
If the cosine value is greater then or equal to 0 (less then 90 degrees between Vector and Normal) then the polygon/plane is facing the camera, if it is less then 0 (greater then 90 degrees) then the polygon/plane is facing away.
To eliminate the need for subtracting a vertex from the camera position (in object space), you can store the plane constant which can be calculated by…
pc = -Dot(Normal, Vector);
The idea here is to make negative the dot product of a Normal times a point on the plane which happens to be one of the vertices of the face.
Once we have the dot product we can then use this equation to find out which side the camera is of the polygon…
if( Dot(Vector, Normal) + pc >= 0)
//its facing
else
//its not facing
I hope this was not to complicated an explanation , I could not find a good source for this info, I learned it from the book by Brian Hook “Building a 3d game engine in C++”.
Another interesting thing to note on the topic of matrices. A matrix is simply an set of 3 vectors (each pointing in diffrent directions of the axi x, y, and z) and a position of origin. So a matrix set to identity is…
X_Axis (1,0,0,0)
Y_Axis (0,1,0,0)
Z_Axis (0,0,1,0)
Origin (0,0,0,1)
The numbers represent X,Y,Z,W. W sets whether the X,Y,Z are a point or a vector, so if you notice Origin is a point (1), while X_Axis and the others are vectors (0), this has to do with the fact that vectors are not supposed to be translated while points are supposed to be. Anyway if you think about it this way you can create a short cut equation to calculate an inverse Origin instead of the entire inverse matrix, and if your camera is always at Origin (in camera space) then you can simply do an inverse Origin to place the camera in object space. Anway its interesting stuff, it would still be nice to have this ability, this would make a performance diffrence where you have huge objects where perforance is lowered by the polygon density.