Graphics Reference
In-Depth Information
Abb. 9.1 Bildraum bei einer Zentralprojektion
Public Sub ClipGlo()
'
' Das Programm findet alle Knoten ausserhalb des Clipping-
' Bereiches. Für diese wird ihre Sichtbarkeit
' ".sicht = False" gesetzt. Wenn eine Facette nur
' unsichtbare Knoten hat, ist auch die Facette selbst
' unsichtbar.
'
Dim kanz, Ecke(3) As Short
'
' alle Knoten-Koordinaten abklappern
' 0-3 sind Knoten des Koordinaten-Systems, los ab Knoten(4)
Forj=4ToAnzKno4
With Knoten(j)
.sicht = False
If Hmin <= .x And .x <= Hmax Then
If Vmin <= .y And .y <= Vmax Then
If Tmin <= .z And .z <= Tmax Then .sicht = True
End If
End If
End With
Next j
'
' Facette auf sichtbare Knoten prüfen
Forj=1ToAnzFacet
With Facette(j)
' Dreieck oder Viereck
kanz = IIf(Mid(.Bez, 1, 4) = "DREK", 2, 3)
Ecke(0)= .P0 : Ecke(1)= .P1 : Ecke(2)= .P2 : Ecke(3)= .P3
.sicht = True
Fork=0Tokanz
If Knoten(Ecke(k)).sicht Then GoTo EndeFac
Next k
Search WWH ::




Custom Search