I dont know what Im doing wrong... I make a new project and add these classes below and use
Dim ct as new CustomTerrain
but I dont see anything ?
Public Class CustomTerrain
Dim Squares(20, 20) As GridSquare
Sub New()
For x = 0 To 19
For z = 0 To 19
Dim Position1 As New Math.Vector3
Position1.Set(x * 10, 20, z * 10)
Dim Position2 As New Math.Vector3
Position1.Set((x + 1) * 10, 20, z * 10)
Dim Position3 As New Math.Vector3
Position1.Set(x * 10, 20, (z + 1) * 10)
Dim Position4 As New Math.Vector3
Position1.Set((x + 1) * 10, 20, (z + 1) * 10)
Squares(x, z) = New GridSquare(Position1, Position2, Position3, Position4)
Next
Next
End Sub
End Class
Public Class GridSquare
Dim triangle1 As DarkGDK.Basic3D.Triangle
Dim triangle2 As DarkGDK.Basic3D.Triangle
Dim Corner1Pos As New DarkGDK.Math.Vector3
Dim Corner2Pos As New DarkGDK.Math.Vector3
Dim Corner3Pos As New DarkGDK.Math.Vector3
Dim Corner4Pos As New DarkGDK.Math.Vector3
Sub New(ByVal c1 As DarkGDK.Math.Vector3, ByVal c2 As DarkGDK.Math.Vector3, ByVal c3 As DarkGDK.Math.Vector3, ByVal c4 As DarkGDK.Math.Vector3)
triangle1 = New DarkGDK.Basic3D.Triangle(c1.X, c1.Y, c1.Z, c2.X, c2.Y, c2.Z, c3.X, c3.Y, c3.Z, Color.White)
triangle2 = New DarkGDK.Basic3D.Triangle(c2.X, c2.Y, c2.Z, c3.X, c3.Y, c3.Z, c4.X, c4.Y, c4.Z, Color.White)
Corner1Pos = c1
Corner2Pos = c2
Corner3Pos = c3
Corner4Pos = c4
End Sub
Public Property CornerPosition1() As DarkGDK.Math.Vector3
Get
Return Corner1Pos
End Get
Set(ByVal value As DarkGDK.Math.Vector3)
Corner1Pos = value
Reset()
End Set
End Property
Public Property CornerPosition2() As DarkGDK.Math.Vector3
Get
Return Corner2Pos
End Get
Set(ByVal value As DarkGDK.Math.Vector3)
Corner2Pos = value
Reset()
End Set
End Property
Public Property CornerPosition3() As DarkGDK.Math.Vector3
Get
Return Corner3Pos
End Get
Set(ByVal value As DarkGDK.Math.Vector3)
Corner3Pos = value
Reset()
End Set
End Property
Public Property CornerPosition4() As DarkGDK.Math.Vector3
Get
Return Corner4Pos
End Get
Set(ByVal value As DarkGDK.Math.Vector3)
Corner4Pos = value
Reset()
End Set
End Property
Private Sub Reset()
triangle1 = New DarkGDK.Basic3D.Triangle(Corner1Pos.X, Corner1Pos.Y, Corner1Pos.Z, Corner2Pos.X, Corner2Pos.Y, Corner2Pos.Z, Corner3Pos.X, Corner3Pos.Y, Corner3Pos.Z, Color.White)
triangle2 = New DarkGDK.Basic3D.Triangle(Corner2Pos.X, Corner2Pos.Y, Corner2Pos.Z, Corner3Pos.X, Corner3Pos.Y, Corner3Pos.Z, Corner4Pos.X, Corner4Pos.Y, Corner4Pos.Z, Color.White)
End Sub
End Class
Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.