Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Property PointCoordinates() As Vector3
- Get
- Dim x As Single = 0, y As Single = 0, z As Single = 0
- Single.TryParse(xcor.Text, x)
- Single.TryParse(ycor.Text, y)
- Single.TryParse(zcor.Text, z)
- Return New Vector3(x, y, z)
- End Get
- Set(value As Vector3)
- xcor.Text = value.X.ToString()
- ycor.Text = value.Y.ToString()
- zcor.Text = value.Z.ToString()
- End Set
- Dim vectorlist as New List(Of Vector3) 'instantiate a new generic list of type Vector3
- Dim vectorvariable as New Vector3(x,y,z) 'instantiate your new Vector3 structure
- vectorlist.Add(vectorvariable) 'add the newly created Vector3 structure to your list
- ForEach vectoritem in vectorlist
- MessageBox.Show(String.Format("X: {0}, Y: {1}, Z: {2}",vectoritem.X, vectoritem.Y, vectoritem.Z))
- Next
- For i As Integer = 0 to vectorlist.Count-1
- MessageBox.Show(String.Format("X: {0}, Y: {1}, Z: {2}",vectorlist(i).X, vectorlist(i).Y, vectorlist(i).Z))
- Next
- Public Coordinates As New List( Of Vector3 );
- Coordinates.Add( PointCoordinates )
- Imports System.Collections.Generic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement