Jump to content

  • Log In with Google      Sign In   
  • Create Account


CJThomas

Member Since 12 Jun 2013
Offline Last Active Today, 08:37 AM
-----

Posts I've Made

In Topic: Separating axis Theorem rotation issue

07 April 2014 - 06:35 PM


@CJThomas



It seems like you are doing vector normalization in your code. This isn't necessary and requires a lot of cpu time. Your code should work just fine even if you remove "A.Normalize();"

Thanks for the Tip.  I have removed that line and it works fine


In Topic: Separating axis Theorem rotation issue

03 April 2014 - 04:39 PM

Can you post your code.  Looks like the way you are calculating the axis is wrong.

If you look at the top it looks like the Axis is being projected on the the X plane.

This is how I calculate the Axis.

for (int x = 0; x < Points.Count; x++)

            {

                Vector3 p1 = Points[x];

                Vector3 p2 = Points[x + 1 == Points.Count ? 0 : x + 1];

                Vector3 edge = p1 - p2;

                var A = new Vector2(-edge.X, edge.Y);

                A.Normalize();

                Axis.Add(A);

            }


In Topic: Help needed debugging fx file

13 March 2014 - 10:42 PM




How do I do that ? And is it necessary when I debug with visual studio 2013 ?

 

Debug->Graphics->Directx Control Panel

 

There should be an edit list button where you add your executable.  Pretty sure you need to do that to debug a directx program.

Hope you get it sorted


In Topic: Help needed debugging fx file

13 March 2014 - 04:35 PM

I have never used the offline compiler either so am unsure.  Once more thing to check is that you executable is added to the list of applications to use the Debug runtime in the DirectX Control Panel.  No other ideas though.


In Topic: Help needed debugging fx file

12 March 2014 - 05:57 PM

When you created the device did you do so with the Debug flag?


PARTNERS