Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualCdrTomalak

Posted 29 August 2012 - 03:51 PM

It looks like this:

for(int c=0;c<noOfVertices;c++)
{
position[c] = SlimDX.Vector3.TransformCoordinate(position[c],spriteOrthoMatrix);
}

However, I managed to get round the issue in the end by recalculating a quad's position on the screen based on it's grid reference. My first question was poorly worded on reflection, and essentially I was looking for something to UN-transform my vectors. There doesn't seem to be anything in the SlimDX API that does this.

#4CdrTomalak

Posted 29 August 2012 - 03:51 PM

It looks like this:

for(int c=0;c<noOfVertices;c++)
{
position[c] = SlimDX.Vector3.TransformCoordinate(position[c],spriteOrthoMatrix);
}

However, I managed to get round the issue in the end by recalculating a quad's position on the screen based on it's grid reference. My first question was poorly worded on reflection, and essentially I was looking for something to UN-transform my vectors. There doesn't seem to be anything in the SlimDX API that does this.

#3CdrTomalak

Posted 29 August 2012 - 03:51 PM

It looks like this:

[source lang="csharp"]for(int c=0;c<noOfVertices;c++){ position[c] = SlimDX.Vector3.TransformCoordinate(position[c],spriteOrthoMatrix);}[/source]

However, I managed to get round the issue in the end by recalculating a quad's position on the screen based on it's grid reference. My first question was poorly worded on reflection, and essentially I was looking for something to UN-transform my vectors. There doesn't seem to be anything in the SlimDX API that does this.

#2CdrTomalak

Posted 29 August 2012 - 03:50 PM

It looks like this:

[source lang="csharp"] for(int c=0;c<noOfVertices;c++) { position[c] = SlimDX.Vector3.TransformCoordinate(position[c],spriteOrthoMatrix); }[/source]

However, I managed to get round the issue in the end by recalculating a quad's position on the screen based on it's grid reference. My first question was poorly worded on reflection, and essentially I was looking for something to UN-transform my vectors. There doesn't seem to be anything in the SlimDX API that does this.

#1CdrTomalak

Posted 29 August 2012 - 03:50 PM

It looks like this:

[source lang="csharp"] for(int c=0;c<noOfVertices;c++) { position[c] = SlimDX.Vector3.TransformCoordinate(position[c],spriteOrthoMatrix); }[/source]

However, I managed to get round the issue in the end by recalculating a quad's position on the screen based on it's grid reference. My first question was poorly worded on reflection, and essentially I was looking for something to UN-transform my vectors. There doesn't seem to be anything in the SlimDX API that does this.

PARTNERS