Drawing a Plane

BlitzMax Forums/OpenGL Module/Drawing a Plane

Vertex(Posted 2006) [#1]
Hi!
I working on a bsp compiler and need a function to draw a plane with the fallowing equation
N*P - d = 0

Also there is the type TPlane with this members:
Type TVector
	Field X : Float
	Field Y : Float
	Field Z : Float

	...

End Type

Type TPlane
	Field Normal   : TVector
	Field Distance : Float

	...

End Type


I know, a plane has a infinity size, but I need only to draw a part of it. Like 100 * 100 unions.

My first advisement was, to convert from

to

set lambda and mu to
-50;50, 50;50, 50;-50 and -50;-50
and draw it with GL_QUADS.

But I haven't a equation to convert or know if this will working with lambda and mu.

cu olli


JoshK(Posted 2006) [#2]
You could probably just create a matrix for the normal of the plane, load it, then draw a flat quad.


Vertex(Posted 2006) [#3]
Thats a idea, but how? How I can create a matrix from a vector? I can build a matrix by using a quanternion by using a vector but in addition a angle.

cu olli