Le 04/07/2012 06:06, Kevin Fishburne a écrit :
> I need to create a 2D array of a structure like this:
> ...
By the way, Kevin, did you try the jit compiler for your game?
--
Benoît Minisini
--
Live Security Virtual
As Benoît says,
Dim Normals As New Tile_Normals[TileGrid.Size, TileGrid.Size]
only gives an array where you can store references to Tile_Normals.
You also have to do:
Dim I As Integer
Dim J As Integer
For I = 0 To TileGrid.Size - 1
For J = 0 To TileGrid.Size - 1
Normals[I, J] = New Tile_Norm
Le 04/07/2012 06:06, Kevin Fishburne a écrit :
> I need to create a 2D array of a structure like this:
>
> Public Struct Tile_Normals
> A[3] As Single ' Normal for quad subsurface A.
> B[3] As Single ' Normal for quad subsurface B.
> End Struct
>
> Dim Normals As New Tile_Normals[TileGrid
On Wed, 04 Jul 2012, Kevin Fishburne wrote:
> On 07/04/2012 05:42 AM, Emil Lenngren wrote:
> > When you are declaring the array by writing
> > A[3] As Single
> > you declare an inline array, i.e. NOT a reference to an array.
> > So you cannot write
> > ThatStruct.A = AnArray.
> > Instead you have t
On 07/04/2012 05:42 AM, Emil Lenngren wrote:
> When you are declaring the array by writing
> A[3] As Single
> you declare an inline array, i.e. NOT a reference to an array.
> So you cannot write
> ThatStruct.A = AnArray.
> Instead you have to copy the contents from AnArray into A.
>
I'm not sure h
When you are declaring the array by writing
A[3] As Single
you declare an inline array, i.e. NOT a reference to an array.
So you cannot write
ThatStruct.A = AnArray.
Instead you have to copy the contents from AnArray into A.
2012/7/4 Kevin Fishburne
> On 07/04/2012 12:06 AM, Kevin Fishburne wrot
On 07/04/2012 12:06 AM, Kevin Fishburne wrote:
> I need to create a 2D array of a structure like this:
>
> Public Struct Tile_Normals
> A[3] As Single ' Normal for quad subsurface A.
> B[3] As Single ' Normal for quad subsurface B.
> End Struct
>
> Dim Normals As New Tile_Normals[TileGrid
I need to create a 2D array of a structure like this:
Public Struct Tile_Normals
A[3] As Single ' Normal for quad subsurface A.
B[3] As Single ' Normal for quad subsurface B.
End Struct
Dim Normals As New Tile_Normals[TileGrid.Size, TileGrid.Size]
When I try to assign a value to an array