boyamer
04-03-2009 11:10:04
FFT Noise is a Fast Fourier Transform?
Why do you use the twoface pointer to modify the indexbuffer?
I'd like to port Hydrax to c#,anybode know how can i do this?
Why do you use the twoface pointer to modify the indexbuffer?
I'd like to port Hydrax to c#,anybode know how can i do this?
for (int k = 0; k < mOptions.Steps; k++)
{
indexbuffer[k*3+2] = 0;
indexbuffer[k*3+1] = k+1;
if (k != mOptions.Steps-1)
{
indexbuffer[k*3] = k+2;
}
else
{
indexbuffer[k*3] = 1;
}
}
for(int y=0; y<mOptions.Circles-1; y++)
{
for(int x=0; x<mOptions.Steps; x++)
{
unsigned int *twoface = indexbuffer + (y*mOptions.Steps+x)*6 + 3 * mOptions.Steps;
int p0 = 1+y * mOptions.Steps + x ;
int p1 = 1+y * mOptions.Steps + x + 1 ;
int p2 = 1+(y+1)* mOptions.Steps + x ;
int p3 = 1+(y+1)* mOptions.Steps + x + 1 ;
if (x == mOptions.Steps-1)
{
p1 -= x+1;
p3 -= x+1;
}
// First triangle
twoface[0]=p0;
twoface[1]=p1;
twoface[2]=p2;
// Second triangle
twoface[3]=p1;
twoface[4]=p3;
twoface[5]=p2;
}
}