Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Fr Jul 18, 2025 18:20

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 7 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: how to define clipping planes?
BeitragVerfasst: Mi Jan 28, 2004 19:46 
Offline
DGL Member
Benutzeravatar

Registriert: Di Jul 01, 2003 18:59
Beiträge: 887
Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
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?

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Jan 28, 2004 20:28 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
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).

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Jan 28, 2004 20:46 
Offline
DGL Member
Benutzeravatar

Registriert: Sa Dez 28, 2002 11:13
Beiträge: 2244
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


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Jan 28, 2004 23:00 
Offline
DGL Member
Benutzeravatar

Registriert: Di Jul 01, 2003 18:59
Beiträge: 887
Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
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?

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Jan 28, 2004 23:23 
Offline
Guitar Hero
Benutzeravatar

Registriert: Do Sep 25, 2003 15:56
Beiträge: 7810
Wohnort: Sachsen - ERZ / C
Programmiersprache: Java (, Pascal)
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.

_________________
Blog: kevin-fleischer.de und fbaingermany.com


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Jan 29, 2004 19:34 
Offline
DGL Member
Benutzeravatar

Registriert: Di Jul 01, 2003 18:59
Beiträge: 887
Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
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 :-)

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Clipping Planes
BeitragVerfasst: Di Feb 03, 2004 09:42 
Offline
DGL Member
Benutzeravatar

Registriert: Do Dez 11, 2003 13:23
Beiträge: 25
Wohnort: South Africa
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?

_________________
Im out of my mind but please leave a message...
www.sulaco.co.za


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 7 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.008s | 15 Queries | GZIP : On ]