Hilfe

VertexTexCoords

B3D

Aufruf

VertexTexCoords surface%, vertex%, u#, v# [, w#] [, set%]

Parameter

surface% Identität einer Gitteroberfläche (surface)
vertex% Indexnummer eines Vertexpunktes
u# Texturkoordinate U (0-1)
v# Texturkoordinate V (0-1)
w# Texturkoordinate W (reserviert; Standard=1)
set% Koordinaten-Set - kann nur 0 oder 1 sein (Standard=0)


Rückgabewert

-


Beschreibung

Die Anweisung VertexTexCoords ändert die Texturkoordinate eines Vertexpunktes.

Die Koordinate u# und v# können nur Werte 0 bis 1 sein. Koordinate w# ist für später reserviert. Parameter "set%" gibt den Koordinaten-Set an - sollte nur 0 oder 1 sein.


Beispiel

Standardbeispiel:

Graphics3D 640, 480, 0, 2
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)
t = LoadTexture("c:\003.bmp")
EntityTexture cone, t

While Not KeyDown(1)
   a = (a + 2) Mod 360
   x# = Cos(a) * 2
   For i = 0 To 15
      VertexCoords surface, i, x#, 1, 5
      VertexTexCoords surface, i, x#, x#
   Next
   RenderWorld
   Flip
Wend
End


Siehe auch

VertexU, VertexV, VertexW

Übersicht 3D Grafik Surface