DGL
https://delphigl.com/forum/

how to define clipping planes?
https://delphigl.com/forum/viewtopic.php?f=19&t=2439
Seite 1 von 1

Autor:  noeska [ Mi Jan 28, 2004 19:46 ]
Betreff des Beitrags:  how to define clipping planes?

I know you can do 0,-1,0,0
and even 0,0,-1,0.

But how do i make a clipping plane at 6 units high?

Autor:  Sascha Willems [ Mi Jan 28, 2004 20:28 ]
Betreff des Beitrags: 

I haven't made too much with clipping planes, but I'm quite sure that you can translate and even rotate them how you want (I think it's mentioned somewhere in the redbook).

Autor:  LarsMiddendorf [ Mi Jan 28, 2004 20:46 ]
Betreff des Beitrags: 

The 4 floats (a,b,c,d) define the plane equation:
for all (x,y,z) in R³: a*x+b*y+c*z+d=0

Autor:  noeska [ Mi Jan 28, 2004 23:00 ]
Betreff des Beitrags: 

erm... math is not my strongest point. If i know x, y, z how do i get a, b, c and d? Is there a clever way to calculate them?

Autor:  Flash [ Mi Jan 28, 2004 23:23 ]
Betreff des Beitrags: 

You have allready writen your a,b,c,d ! (0,-1,0,0)

a*x+b*y+c*z+d=0 (In German this is called "Ebenengleichung")

x,y,z just stand for the direction.

I hope it is now a little bit clearer.

Autor:  noeska [ Do Jan 29, 2004 19:34 ]
Betreff des Beitrags: 

I know i already have the result. But i always like to how things actualy work, not the trick. Using the 0,-1,0,0 for me feels like using a trick.

What i always thought wrong was that filling in a,b,c,d had to do something with placing the clipping plane. But as sos said you can use gltranslatef and glrotatef for that.

I assume that the direction made with x,y,z can be represented by drawing a line from 0,0,0 to x,y,z
I i want to create a clipping plane using my camera point i should give that into a*x+b*y+c*z+d=0 so if the camera point is 1,6,1 that would make:
a*1+b*6+c*1+d=0
What steps to i take to get the unknown a,b,c, and d. Of Course i could fill them all with zero's but that would be dumb :-)

Autor:  McCLaw [ Di Feb 03, 2004 09:42 ]
Betreff des Beitrags:  Clipping Planes

Hi Noeska

It looks like what you are trying to do is scale your clipping plane.

As far as I remember a plane is infinite ( In 2 of 3 dimensions), e.g.: it has no borders and thus it has no height/width depending on its orientation.

It does have a direction though.

It should be possible (Haven’t tested it yet :D ) to scale the clipping plane, but all you are going to do is move it to a different position.

Does this make sense, or am I speaking complete BS?

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/