Initial commit

This commit is contained in:
FantaX1911 2017-02-22 12:18:53 +02:00
parent b15749cc82
commit 5f31433c27
5 changed files with 72 additions and 0 deletions

View File

@ -98,6 +98,8 @@
Public Shared DoubleFloorModel As DoubleFloorModel = New DoubleFloorModel()
Public Shared PyramidModel As PyramidModel = New PyramidModel()
Public Shared StairsModel As StairsModel = New StairsModel()
Public Shared DiagonalWallModel As DiagonalWallModel = New DiagonalWallModel()
Public Shared HalfDiagonalWallModel As HalfDiagonalWallModel = New HalfDiagonalWallModel()
Public Shared Function getModelbyID(ByVal ID As Integer) As BaseModel
Select Case ID
@ -135,6 +137,10 @@
Return PyramidModel
Case 16
Return StairsModel
Case 17
Return DiagonalWallModel
Case 18
Return HalfDiagonalWallModel
Case Else
Return BlockModel
End Select

View File

@ -0,0 +1,33 @@
Public Class DiagonalWallModel
Inherits BaseModel
Public Sub New()
vertexData.Clear()
'This wall will start from 1 point and end at the opposite point diagonally
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), New Vector3(0, 0, 1), New Vector2(0.0, 1.0))) 'A
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 0.0))) 'H
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0.5), New Vector3(0, 0, 1), New Vector2(0.0, 0.0))) 'C
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), New Vector3(0, 0, 1), New Vector2(0.0, 1.0))) 'A
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 1.0))) 'F
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 0.0))) 'H
'These will be the same triangles but from the opposite direction, this way it can be rendered from both directions or just from one direction
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), New Vector3(0, 0, -1), New Vector2(0.0, 1.0))) 'A
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0.5), New Vector3(0, 0, -1), New Vector2(0.0, 0.0))) 'C
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 0.0))) 'H
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), New Vector3(0, 0, -1), New Vector2(0.0, 1.0))) 'A
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 0.0))) 'H
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 1.0))) 'F
Me.ID = 17
Setup()
End Sub
End Class

View File

@ -0,0 +1,33 @@
Public Class HalfDiagonalWallModel
Inherits BaseModel
Public Sub New()
vertexData.Clear()
'This wall will start from 1 point and end at the opposite middle point diagonally
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), New Vector3(0, 0, 1), New Vector2(0.0, 1.0))) 'AB
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 0.0))) 'H
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0), New Vector3(0, 0, 1), New Vector2(0.0, 0.0))) 'CD
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), New Vector3(0, 0, 1), New Vector2(0.0, 1.0))) 'AB
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 1.0))) 'F
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, 1), New Vector2(1.0, 0.0))) 'H
'These will be the same triangles but from the opposite direction, this way it can be rendered from both directions or just from one direction
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), New Vector3(0, 0, -1), New Vector2(0.0, 1.0))) 'AB
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0), New Vector3(0, 0, -1), New Vector2(0.0, 0.0))) 'CD
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 0.0))) 'H
vertexData.Add(New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), New Vector3(0, 0, -1), New Vector2(0.0, 1.0))) 'AB
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, -0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 0.0))) 'H
vertexData.Add(New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), New Vector3(0, 0, -1), New Vector2(1.0, 1.0))) 'F
Me.ID = 18
Setup()
End Sub
End Class

Binary file not shown.