Hilfe

LightConeAngles

B3D

Aufruf

LightConeAngles licht%, innen#, aussen#

Parameter

licht% Identität einer Lichtquelle
innen# Innenwinkel des Lichtkegels (in Grad)
aussen# Außenwinkel des Lichtkegels (in Grad)


Rückgabewert

-


Beschreibung

Die Anweisung LightConeAngles stellt die Kegelwinkel einer Lichtquelle ein. Diese Lichtquelle muss bereits vorher mit CreateLight erstellt worden sein (Lichtart 3). Normalerweise ist der Innenwinkel 0 Grad und Außenwinkel 90 Grad.


Beispiel

Standardbeispiel:

Graphics3D 640, 480
SetBuffer BackBuffer()
camera = CreateCamera()
sphere = CreateSphere(32)
light = CreateLight(3)
cone = CreateCone(32)
RotateEntity light, 90, 0, 0
PositionEntity light, 0, 10, 3
PositionEntity sphere, - 2, 0, 5
PositionEntity cone, 2, 0, 5
AmbientLight 100, 100, 100
ang1# = 0
ang2# = 45

While Not KeyHit(1)
   If KeyDown(2) = 1 And ang1#>0 Then ang1# = ang1# - 1
   If KeyDown(3) = 1 And ang1#<45 Then ang1# = ang1# + 1
   If KeyDown(4) = 1 And ang2#>0 Then ang2# = ang2# - 1
   If KeyDown(5) = 1 And ang2#<45 Then ang2# = ang2# + 1
   LightConeAngles light, ang1#, ang2#
   RenderWorld
   Text 0, 0, "Drücke 1-4, um die Winkel zu ändern"
   Text 0, 20, "innen: " + ang1#
   Text 0, 40, "außen: " + ang2#
   Flip
Wend
End


Siehe auch

AmbientLight, CreateLight, LightColor, LightMesh, LightRange

Übersicht 3D Grafik Licht