You can define a plane in 3D by a normal and one point; so if your normal is up (0, 1, 0), you just need one point in 3D to define the plane.
The concept of a plane in 2D is beyond me though. I’m also not sure to understand how the viewpoint position is a variable.
If you’re looking for a 3D plane that intersects the XZ plane along the line defined by your two 2D points (let’s call them (x1,z1) and (x2,z2), then you can create it from these 3 points for example:
The map data I’m using is 2D (Doom engine) and I want to set up a clip plane aligned with a given line. The reason for this is I am implementing mirrors (ala Duke3D) and want to set up a clipping plane so only things on the far side of the mirror are drawn. http://members.shaw.ca/timstump/images/zdoomgl_37.jpg (kinda dark, but you get the idea)
How the mirror works is I basically just move the viewpoint to the virtual location/orientation in the mirror and draw the scene again.
The problem is, sometimes I get things coming through the mirror (mostly due to mapping errors, since the same bizarre things happen in software mode).
Not a big deal, really, since the problems aren’t really the engines fault, but I’d still like to minimize them.
Originally posted by timmie:
[b]Hmm, a bit of elaboration, I guess…
The map data I’m using is 2D (Doom engine) and I want to set up a clip plane aligned with a given line. The reason for this is I am implementing mirrors (ala Duke3D) and want to set up a clipping plane so only things on the far side of the mirror are drawn. http://members.shaw.ca/timstump/images/zdoomgl_37.jpg (kinda dark, but you get the idea)
How the mirror works is I basically just move the viewpoint to the virtual location/orientation in the mirror and draw the scene again.
The problem is, sometimes I get things coming through the mirror (mostly due to mapping errors, since the same bizarre things happen in software mode).
Not a big deal, really, since the problems aren’t really the engines fault, but I’d still like to minimize them.[/b]