Hilfe
VertexCoords
Aufruf
Parameter
Rückgabewert
Beschreibung
Beispiel
Siehe auch
VertexCoords surface%, vertex%, x#, y#, z#
Parameter
surface% | Identität einer Gitteroberfläche (surface) |
vertex% | Indexnummer eines Vertexpunktes |
x# | Lokale X-Koordinate von Objektmitte |
y# | Lokale Y-Koordinate von Objektmitte |
z# | Lokale Z-Koordinate von Objektmitte |
Rückgabewert
-
Beschreibung
Die Anweisung VertexCoords ändert die Koordinate eines Vertexpunkts.
VertexCoords wird üblicherweise für "dynamische mesh deformationen" benutzt. Dazu wird Vertexpunkt eines Gitterobjekts verschoben. Alle Dreiecke, die mit dem Punkt verbunden sind, werden automatisch geändert. Dadurch entsteht der Eindruck, dass das Objekt deformiert wird.
Die Anweisung VertexNormal ändert dagegen Normal-Koordinaten (für Lichtschattierungen).
Beispiel
Standardbeispiel:
Graphics3D 640, 480, 0, 2
WireFrame 1
SetBuffer BackBuffer()
camera = CreateCamera()
light = CreateLight(1)
RotateEntity light, 90, 0, 0
cone = CreateCone(16)
EntityColor cone, 100, 100, 255
PositionEntity cone, 0, 0, 5
RotateEntity cone, - 20, 0, 0
surface = GetSurface(cone, 1)
While Not KeyDown(1)
a = (a + 2) Mod 360
x# = Cos(a) * 2
For i = 0 To 15
VertexCoords surface, i, x#, 1, 0
Next
RenderWorld
Flip
Wend
End
WireFrame 1
SetBuffer BackBuffer()
camera = CreateCamera()
light = CreateLight(1)
RotateEntity light, 90, 0, 0
cone = CreateCone(16)
EntityColor cone, 100, 100, 255
PositionEntity cone, 0, 0, 5
RotateEntity cone, - 20, 0, 0
surface = GetSurface(cone, 1)
While Not KeyDown(1)
a = (a + 2) Mod 360
x# = Cos(a) * 2
For i = 0 To 15
VertexCoords surface, i, x#, 1, 0
Next
RenderWorld
Flip
Wend
End
Siehe auch

